-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
add FCW to invalid #[should_panic] and #[ignore]
#150416
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
base: main
Are you sure you want to change the base?
Conversation
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
This comment has been minimized.
This comment has been minimized.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
77c382f to
67ad2c3
Compare
|
Some changes occurred in compiler/rustc_hir/src/attrs Some changes occurred in compiler/rustc_attr_parsing |
67ad2c3 to
ff45852
Compare
This comment has been minimized.
This comment has been minimized.
ff45852 to
93b3210
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
add FCW to `#[should_panic]` on fn without `#[test]` attribute
This comment has been minimized.
This comment has been minimized.
| #[primary_span] | ||
| pub attr_span: Span, | ||
| #[warning] | ||
| pub warning: bool, |
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.
Is there a reason #[warning] is configurable here?
I think this can just always be a warning
(you can do this by applying #[warning] to the struct)
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 is what all the other FCW in rustc_passes/messages.ftl do AFAICT
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.
Afaik you should just be able to put #[warning] on the struct for the same effect
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (bcd914a): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.9%, secondary 3.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -8.5%, secondary -15.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 476.873s -> 475.466s (-0.30%) |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
add FCW to invalid `#[should_panic]` and `#[ignore]`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (cb3537c): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 1.9%, secondary -2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 475.924s -> 474.267s (-0.35%) |
| } | ||
| } | ||
| scope 18 (inlined <std::alloc::Global as Allocator>::deallocate) { | ||
| let mut _9: *mut u8; |
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.
Why did these mir-opt tests change?
| // Add a trace to the originating test function, so that we can | ||
| // check if attributes that have `#[test]` or `#[bench]` as a requirement | ||
| // actually are annotated with said attributes | ||
| item.attrs.push(cx.attr_word(sym::test_trace, cx.with_def_site_ctxt(attr_sp))); |
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.
The crater run in #150727 (comment) had a bunch of failures (such as https://crater-reports.s3.amazonaws.com/pr-150727/try%2366388cc165a6c4ac98c074dc9f0281ff23528c55/gh/0958436455sarayut.master/log.txt) because this creates an attribute without a TokenStream. Can you look into this and make a regression test if easily possible?
|
@rustbot author |
|
☔ The latest upstream changes (presumably #150957) made this pull request unmergeable. Please resolve the merge conflicts. |
1102efa to
743533b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ebfd98b to
f7c9cb2
Compare
f7c9cb2 to
ef0ba7b
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
☔ The latest upstream changes (presumably #151325) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Crater results of #150727 (comment) Sadly quite a few real regressions. #[test]
#[ignore]
#[serial_test::serial]
fn test_invalid_authentication() { ... }Where the test macro rewrites the test function, which removes the trace attribute. This is quite unfortunate and I don't feel good about merging this, but I don't see a good way to fix this either. This can be fixed neither by the caller (because it does not control the macro) nor by the macro author (because it can't see the test trace attr, so it can't preserve it) |
this fixes #143799