Skip to content

Attribute docs deprecated , warn, allow, cfg, deny, and forbid #158244

Open
kantnero wants to merge 1 commit into
rust-lang:mainfrom
kantnero:attribute-docs-deprecated-warn
Open

Attribute docs deprecated , warn, allow, cfg, deny, and forbid #158244
kantnero wants to merge 1 commit into
rust-lang:mainfrom
kantnero:attribute-docs-deprecated-warn

Conversation

@kantnero

@kantnero kantnero commented Jun 22, 2026

Copy link
Copy Markdown

View all comments

Added documentation for built-in deprecated , warn, allow, cfg, deny, and forbid attributes using the #[doc(attribute = "...")] mechanism.

Part of #157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 22, 2026
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

Comment thread library/std/src/attribute_docs.rs
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs Outdated
Comment thread library/std/src/attribute_docs.rs
Comment thread library/std/src/attribute_docs.rs
Comment thread library/std/src/attribute_docs.rs
Comment thread library/std/src/attribute_docs.rs
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 22, 2026
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@kantnero kantnero changed the title Attribute docs deprecated and warn Attribute docs deprecated , warn, allow, cfg, deny, and forbid Jun 22, 2026
@kantnero

Copy link
Copy Markdown
Author

@GuillaumeGomez I have addressed it. Please have a look at it

rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
Rollup of 3 pull requests

Successful merges:

 - #152225 (Add supertrait item shadowing for type-level path resolution)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158399 (std: truncate thread names on NetBSD)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 26, 2026
…-warn, r=GuillaumeGomez,traviscross

Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`

Added documentation for built-in `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`  attributes using the #[doc(attribute = "...")] mechanism.

Part of rust-lang#157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
Rollup of 3 pull requests

Successful merges:

 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 26, 2026
…-warn, r=GuillaumeGomez,traviscross

Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`

Added documentation for built-in `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`  attributes using the #[doc(attribute = "...")] mechanism.

Part of rust-lang#157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 26, 2026
…-warn, r=GuillaumeGomez,traviscross

Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`

Added documentation for built-in `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`  attributes using the #[doc(attribute = "...")] mechanism.

Part of rust-lang#157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 26, 2026
…-warn, r=GuillaumeGomez,traviscross

Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`

Added documentation for built-in `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`  attributes using the #[doc(attribute = "...")] mechanism.

Part of rust-lang#157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158430 (Guard clone suggestion against empty obligation errors)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 26, 2026
…-warn, r=GuillaumeGomez,traviscross

Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`

Added documentation for built-in `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`  attributes using the #[doc(attribute = "...")] mechanism.

Part of rust-lang#157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 26, 2026
…-warn, r=GuillaumeGomez,traviscross

Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`

Added documentation for built-in `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid`  attributes using the #[doc(attribute = "...")] mechanism.

Part of rust-lang#157604

@rustbot r? @GuillaumeGomez
cc @fmease
cc @mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #158438 (Use rigidness marker in fast_reject)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158185 (perf: Make stable_crate_ids reads lock-free after crate loading)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158382 (Add safety section for SliceIndex::get_unchecked(mut))
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158446 (Update Enzyme submodule)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang-docs Relevant to the lang-docs team. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants