Skip to content

Commit 6c6388c

Browse files
committed
Document, that some lint have to be expected on the crate level (RFC 2383)
Examples: NON_ASCII_IDENTS, UNCOMMON_CODEPOINTS, CONFUSABLE_IDENTS, MIXED_SCRIPT_CONFUSABLES
1 parent 10f4ce3 commit 6c6388c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+5
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,11 @@ declare_lint! {
519519
/// The `expect` attribute can be removed if this is intended behavior otherwise
520520
/// it should be investigated why the expected lint is no longer issued.
521521
///
522+
/// In rare cases, the expectation might be emitted at a different location than
523+
/// shown in the shown code snippet. In most cases, the `#[expect]` attribute
524+
/// works when added to the outer scope. A few lints can only be expected
525+
/// on a crate level.
526+
///
522527
/// Part of RFC 2383. The progress is being tracked in [#54503]
523528
///
524529
/// [#54503]: https://github.com/rust-lang/rust/issues/54503

0 commit comments

Comments
 (0)