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_trait_selection/src/solve | |
| 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_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()); } |
