-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Report CONST_ERR
lint in external macros
#65320
Conversation
use external_macro::static_assert; | ||
|
||
fn main() { | ||
static_assert!(2 + 2 == 5); //~ ERROR |
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.
This works outside "expression" scope too, right? Can we test it there? I seem to recall some differences, but maybe that was a transient state...
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.
Something like the following? which now works too with the param set.
static_assert!(false); //~ ERROR
fn main() { /* ... */ }
@bors r+ rollup |
📌 Commit 95a65cd has been approved by |
Report `CONST_ERR` lint in external macros fixes rust-lang#65300 fixes rust-lang#61058 r? @oli-obk
Rollup of 13 pull requests Successful merges: - #65039 (Document missing deny by default lints) - #65069 (Implement Clone::clone_from for VecDeque) - #65165 (Improve docs on some char boolean methods) - #65248 (Suggest `if let` on `let` refutable binding) - #65250 (resolve: fix error title regarding private constructors) - #65295 (Move diagnostics code out of the critical path) - #65320 (Report `CONST_ERR` lint in external macros) - #65327 (replace the hand-written binary search with the library one) - #65339 (do not reference LLVM for our concurrency memory model) - #65357 (syntax: simplify maybe_annotate_with_ascription) - #65358 (simplify maybe_stage_features) - #65359 (simplify integer_lit) - #65360 (mbe: reduce panictry! uses.) Failed merges: r? @ghost
fixes #65300
fixes #61058
r? @oli-obk