-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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?
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| use super::prelude::*; | ||
|
|
||
| pub(crate) struct TestTraceParser; | ||
|
|
||
| impl<S: Stage> NoArgsAttributeParser<S> for TestTraceParser { | ||
| const PATH: &[Symbol] = &[sym::test_trace]; | ||
|
|
||
| const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Ignore; | ||
|
|
||
| const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Fn)]); | ||
|
|
||
| const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::TestTrace; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1360,3 +1360,13 @@ pub(crate) struct FunctionNamesDuplicated { | |
| #[primary_span] | ||
| pub spans: Vec<Span>, | ||
| } | ||
|
|
||
| #[derive(Diagnostic)] | ||
| #[diag(passes_attr_must_be_applied_to_test_or_bench)] | ||
| pub(crate) struct MustBeAppliedToTest { | ||
| #[primary_span] | ||
| pub attr_span: Span, | ||
| #[warning] | ||
| pub warning: bool, | ||
|
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. Is there a reason (you can do this by applying
Contributor
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. this is what all the other FCW in
JonathanBrouwer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| pub attr_name: Symbol, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,17 +25,21 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () { | |
| } | ||
| } | ||
| scope 18 (inlined <std::alloc::Global as Allocator>::deallocate) { | ||
| let mut _9: *mut u8; | ||
|
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. Why did these mir-opt tests change? |
||
| scope 19 (inlined Layout::size) { | ||
| } | ||
| scope 20 (inlined NonNull::<u8>::as_ptr) { | ||
| } | ||
| scope 21 (inlined std::alloc::dealloc) { | ||
| let mut _10: usize; | ||
| scope 22 (inlined Layout::size) { | ||
| } | ||
| scope 23 (inlined Layout::align) { | ||
| scope 24 (inlined std::ptr::Alignment::as_usize) { | ||
| scope 19 (inlined std::alloc::Global::deallocate_impl) { | ||
| scope 20 (inlined std::alloc::Global::deallocate_impl_runtime) { | ||
| let mut _9: *mut u8; | ||
| scope 21 (inlined Layout::size) { | ||
| } | ||
| scope 22 (inlined NonNull::<u8>::as_ptr) { | ||
| } | ||
| scope 23 (inlined std::alloc::dealloc) { | ||
| let mut _10: usize; | ||
| scope 24 (inlined Layout::size) { | ||
| } | ||
| scope 25 (inlined Layout::align) { | ||
| scope 26 (inlined std::ptr::Alignment::as_usize) { | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
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?