diff options
| author | bors <bors@rust-lang.org> | 2024-05-22 04:14:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-22 04:14:08 +0000 |
| commit | b54dd08a84f3c07efbc2aaf63c3df219ae680a03 (patch) | |
| tree | 698b43cd20f9dfa17f47d596cee409c1f3b0b842 /compiler/rustc_resolve/src | |
| parent | 54cdc13542ef548e7d7f71cd48cc9e4f239e0e25 (diff) | |
| parent | 2cff3e90bcd162964546ca9936c209aa952c1af4 (diff) | |
| download | rust-b54dd08a84f3c07efbc2aaf63c3df219ae680a03.tar.gz rust-b54dd08a84f3c07efbc2aaf63c3df219ae680a03.zip | |
Auto merge of #125326 - weiznich:move/do_not_recommend_to_diganostic_namespace, r=compiler-errors
Move `#[do_not_recommend]` to the `#[diagnostic]` namespace This commit moves the `#[do_not_recommend]` attribute to the `#[diagnostic]` namespace. It still requires `#![feature(do_not_recommend)]` to work. r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/macros.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index 092eb1ce2ee..268e7f06d04 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -578,7 +578,9 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { if res == Res::NonMacroAttr(NonMacroAttrKind::Tool) && let [namespace, attribute, ..] = &*path.segments && namespace.ident.name == sym::diagnostic - && attribute.ident.name != sym::on_unimplemented + && !(attribute.ident.name == sym::on_unimplemented + || (attribute.ident.name == sym::do_not_recommend + && self.tcx.features().do_not_recommend)) { let distance = edit_distance(attribute.ident.name.as_str(), sym::on_unimplemented.as_str(), 5); |
