-
Notifications
You must be signed in to change notification settings - Fork 14k
Add {ignore,needs}-{rustc,std}-debug-assertions directive support
#131913
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,8 @@ | |
| // known to be `1` after inlining). | ||
|
|
||
| //@ compile-flags: -C no-prepopulate-passes -Zinline-mir=no | ||
| //@ ignore-debug: precondition checks in ptr::read make them a bad candidate for MIR inlining | ||
| //@ ignore-std-debug-assertions | ||
| // Reason: precondition checks in ptr::read make them a bad candidate for MIR inlining | ||
|
Comment on lines
-7
to
+8
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't the comment format be the same (without newline) as it was before? Or is it due to the tidy length check?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh it definitely can be, but it gets quite long and I found it a bit easier to read on a different line.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (and yes it would hit the tidy line length check lol) |
||
| //@ needs-deterministic-layouts | ||
|
|
||
| #![crate_type = "lib"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| //@ compile-flags: -O -C no-prepopulate-passes | ||
| //@ only-x86_64 (to not worry about usize differing) | ||
| //@ ignore-debug: precondition checks make mem::replace not a candidate for MIR inlining | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to check: we have some lint or w/e that will fail CI if someone adds a test with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. compiletest (currently) has an allowlist of known directives, I've removed ignore-debug from that so compiletest will error if someone writes ignore-debug (should be in the first commit) which will fail locally and in CI. (This is current stopgap solution before fixing how directives are handled)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will fail looking like (I know it's not super user friendly) |
||
| //@ ignore-std-debug-assertions | ||
| // Reason: precondition checks make mem::replace not a candidate for MIR inlining | ||
|
|
||
| #![crate_type = "lib"] | ||
|
|
||
|
|
||
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.
I did not change the
config.tomluser-facing toml name.