-
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
Improve the error messages for missing stability attributes #58276
Improve the error messages for missing stability attributes #58276
Conversation
This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
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.
LGTM. Minor nit below, feel free to fix or just r=me.
src/librustc/middle/stability.rs
Outdated
_ => self.check_missing_stability(i.id, i.span) | ||
hir::ItemKind::Mod(..) => self.check_missing_stability(i.id, i.span, "module"), | ||
|
||
_ => self.check_missing_stability(i.id, i.span, "node") |
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.
Using i.node.descriptive_variant()
might be better than specifying a name manually. Not sure if there is an equivalent for the other functions.
@bors r=davidtwco |
📌 Commit bb1eed0 has been approved by |
…evel, r=davidtwco Improve the error messages for missing stability attributes This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
…evel, r=davidtwco Improve the error messages for missing stability attributes This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
…evel, r=davidtwco Improve the error messages for missing stability attributes This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
Rollup of 10 pull requests Successful merges: - #58110 (libpanic_unwind => 2018) - #58167 (HirId-ify hir::BodyId) - #58202 (Ignore future deprecations in #[deprecated]) - #58272 (Cut down on number formating code size) - #58276 (Improve the error messages for missing stability attributes) - #58354 (Fix ICE and invalid filenames in MIR printing code) - #58381 (Only suggest imports if not imported.) - #58386 (Fix #54242) - #58400 (Fix rustc_driver swallowing errors when compilation is stopped) - #58420 (target/uefi: clarify documentation) Failed merges: r? @ghost
This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).