-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move #[do_not_recommend]
to the #[diagnostic]
namespace
#125326
Move #[do_not_recommend]
to the #[diagnostic]
namespace
#125326
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
.get_attrs_by_path(impl_def_id, &[sym::diagnostic, sym::do_not_recommend]) | ||
.next() | ||
.is_some() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth to introduce a .has_attrs()
method for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, could you do that? has_attrs_by_path
? (or has_attrs_with_path
)?
compiler/rustc_ast/src/attr/mod.rs
Outdated
pub fn name_or_empty(&self) -> Symbol { | ||
self.ident().unwrap_or_else(Ident::empty).name | ||
} | ||
|
||
pub fn path(&self) -> Vec<Symbol> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use a SmallVec<[Symbol; 1]>
sym::target_feature => self.check_target_feature(hir_id, attr, span, target, attrs), | ||
sym::thread_local => self.check_thread_local(attr, span, target), | ||
sym::track_caller => { | ||
match attr.path().as_slice() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just be a nested match? 🤷
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Let's test it in this state tho |
…ganostic_namespace, r=<try> 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`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (347462c): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -0.1%, secondary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 671.145s -> 671.106s (-0.01%) |
This commit moves the `#[do_not_recommend]` attribute to the `#[diagnostic]` namespace. It still requires `#![feature(do_not_recommend)]` to work.
7bdea9a
to
2cff3e9
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (b54dd08): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 2.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 673.377s -> 672.666s (-0.11%) |
This commit moves the
#[do_not_recommend]
attribute to the#[diagnostic]
namespace. It still requires#![feature(do_not_recommend)]
to work.r? @compiler-errors