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`
This commit is contained in:
@@ -380,7 +380,10 @@ impl<'tcx> ProofTreeVisitor<'tcx> for BestObligation<'tcx> {
|
||||
source: CandidateSource::Impl(impl_def_id),
|
||||
result: _,
|
||||
} = candidate.kind()
|
||||
&& goal.infcx().tcx.has_attr(impl_def_id, sym::do_not_recommend)
|
||||
&& goal
|
||||
.infcx()
|
||||
.tcx
|
||||
.has_attrs_with_path(impl_def_id, &[sym::diagnostic, sym::do_not_recommend])
|
||||
{
|
||||
return ControlFlow::Break(self.obligation.clone());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user