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.
This commit is contained in:
parent
e8ada6ab25
commit
2cff3e90bc
22 changed files with 228 additions and 209 deletions
|
@ -567,7 +567,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue