Skip to content

Conversation

@Bryntet
Copy link
Contributor

@Bryntet Bryntet commented Dec 27, 2025

this fixes #143799

@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2025

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Bryntet
Copy link
Contributor Author

Bryntet commented Dec 27, 2025

r? @JonathanBrouwer

@rustbot rustbot assigned JonathanBrouwer and unassigned jackh726 Dec 27, 2025
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Dec 27, 2025

@rustbot author
This approach may not work because the test attribute has already expanded at this stage

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 27, 2025
@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from 77c382f to 67ad2c3 Compare December 31, 2025 15:53
@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2025

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from 67ad2c3 to ff45852 Compare December 31, 2025 15:57
@rust-log-analyzer

This comment has been minimized.

@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from ff45852 to 93b3210 Compare December 31, 2025 16:06
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 1, 2026
add FCW to `#[should_panic]`  on fn without `#[test]` attribute
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 1, 2026
#[primary_span]
pub attr_span: Span,
#[warning]
pub warning: bool,
Copy link
Contributor

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)

Copy link
Contributor Author

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

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 1, 2026

☀️ Try build successful (CI)
Build commit: bcd914a (bcd914a802a15c7ff31dde1b27ac69f61014233e, parent: b49c7d784e96216e1cb709824629f5d53bc73201)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bcd914a): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking 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 @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.1%, 0.5%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-1.9%, -1.9%] 1

Cycles

Results (primary -8.5%, secondary -15.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.8% [5.8%, 5.8%] 1
Improvements ✅
(primary)
-8.5% [-13.0%, -2.6%] 10
Improvements ✅
(secondary)
-17.0% [-27.5%, -3.0%] 11
All ❌✅ (primary) -8.5% [-13.0%, -2.6%] 10

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 476.873s -> 475.466s (-0.30%)
Artifact size: 390.81 MiB -> 390.85 MiB (0.01%)

@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from ac80560 to df376a5 Compare January 6, 2026 15:41
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from df376a5 to 48614c4 Compare January 6, 2026 17:26
@rust-log-analyzer

This comment has been minimized.

@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from 48614c4 to 5597cc4 Compare January 6, 2026 18:16
@Bryntet Bryntet changed the title add FCW to #[should_panic] on fn without #[test] attribute add FCW to invalid #[should_panic] and #[ignore] Jan 6, 2026
@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from 5597cc4 to 0b4383b Compare January 8, 2026 13:09
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2026

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.

@Bryntet Bryntet force-pushed the fix_dangling_should_panic branch from 0b4383b to 1102efa Compare January 8, 2026 13:12
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 8, 2026
@JonathanBrouwer
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 8, 2026
add FCW to invalid `#[should_panic]` and `#[ignore]`
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 8, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 8, 2026

☀️ Try build successful (CI)
Build commit: cb3537c (cb3537c51779b496b81be46d14459b1e56e59c21, parent: bca37a20bd376ce3fd138e7cdee7fe704e0f8814)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cb3537c): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking 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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This 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.

mean range count
Regressions ❌
(primary)
1.9% [1.3%, 2.8%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-5.1%, -0.9%] 6
All ❌✅ (primary) 1.9% [1.3%, 2.8%] 3

Cycles

Results (secondary -2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.924s -> 474.267s (-0.35%)
Artifact size: 390.87 MiB -> 390.86 MiB (-0.00%)

@rustbot rustbot removed perf-regression Performance regression. S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jan 8, 2026
}
}
scope 18 (inlined <std::alloc::Global as Allocator>::deallocate) {
let mut _9: *mut u8;
Copy link
Contributor

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)));
Copy link
Contributor

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?

@JonathanBrouwer
Copy link
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should_panic can be applied to non-tests

6 participants