Skip to content

improve target feature diagnostic#153676

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:target-feature-plus-diagnostic
Mar 11, 2026
Merged

improve target feature diagnostic#153676
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:target-feature-plus-diagnostic

Conversation

@folkertdev
Copy link
Contributor

And convert the test to use minicore so that it runs regardless of the target. This is the only test for many of these target feature diagnostics, so it's nice that it runs anywhere.

r? JonathanBrouwer

The test here is mostly for legal places for the attribute, is that still how that should be tested?

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2026

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` 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 Mar 10, 2026
@@ -236,6 +236,8 @@ impl_marker_trait!(
]
);

impl Sync for () {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

() does not work with the macro right above. So this will have to do.

@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Mar 11, 2026

The test here is mostly for legal places for the attribute, is that still how that should be tested?

These kind of tests are less important now because target checking is done in a central and consistent way.
This seems like a reasonable place to put this test, yeah

Copy link
Contributor

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

📌 Commit de94c5c has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 11, 2026
…uwer

Rollup of 2 pull requests

Successful merges:

 - #153460 (rustdoc: rename `--emit` names)
 - #153676 (improve target feature diagnostic)
@rust-bors rust-bors bot merged commit 4b1bcac into rust-lang:main Mar 11, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

3 participants