diff options
| author | Georg Semmler <github@weiznich.de> | 2024-05-10 14:12:30 +0200 |
|---|---|---|
| committer | Georg Semmler <github@weiznich.de> | 2024-05-21 13:14:41 +0200 |
| commit | 2cff3e90bcd162964546ca9936c209aa952c1af4 (patch) | |
| tree | 78e26281013d0cdc5d9c4403729c082938b6adf6 /compiler/rustc_trait_selection/src/solve | |
| parent | e8ada6ab253b510ac88edda131021d9878f2984f (diff) | |
| download | rust-2cff3e90bcd162964546ca9936c209aa952c1af4.tar.gz rust-2cff3e90bcd162964546ca9936c209aa952c1af4.zip | |
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.
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/fulfill.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/fulfill.rs b/compiler/rustc_trait_selection/src/solve/fulfill.rs index 4933080451d..7291eb00e72 100644 --- a/compiler/rustc_trait_selection/src/solve/fulfill.rs +++ b/compiler/rustc_trait_selection/src/solve/fulfill.rs @@ -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()); } |
