Skip to content
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

Further cleanup cfgs in the UI test suite #123702

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Apr 9, 2024

This PR does more cleanup of cfgs in our UI test suite, in preparation for adding automatic always on check-cfg (but is IMO worth landing even without that follow up).

To be more specific this PR:

  • replaces (the last remaining) never true cfgs by the FALSE cfg
  • fix proc-macro/derive-helper-configured.rs (typo in directive)
  • and comment some current unused #[cfg_attr] (missing revisions)

Follow-up to #123577.

This commit does three things:
 1. replaces (the last remaining) never true cfgs by the FALSE cfg
 2. fix derive-helper-configured.rs (typo in directive)
 3. and comment some current unused #[cfg_attr] (missing revisions)
@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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

@rustbot rustbot added 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 Apr 9, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks! Feel free to r=me after CI is green.

@@ -1,17 +1,15 @@
// Derive helpers are resolved successfully inside `cfg_attr`.

//@ check-pass
// compile-flats:--cfg TRUE
Copy link
Member

Choose a reason for hiding this comment

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

lol

@jieyouxu
Copy link
Member

jieyouxu commented Apr 9, 2024

@bors delegate+

@bors
Copy link
Contributor

bors commented Apr 9, 2024

✌️ @Urgau, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@jieyouxu
Copy link
Member

jieyouxu commented Apr 9, 2024

@bors rollup

@@ -2,8 +2,8 @@
// we use a single revision because this should have a `full` revision
// but right now that ICEs and I(@BoxyUwU) could not get stderr normalization to work

#![cfg_attr(full, feature(generic_const_exprs))]
#![cfg_attr(full, allow(incomplete_features))]
// #![cfg_attr(full, feature(generic_const_exprs))]
Copy link
Member

Choose a reason for hiding this comment

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

Probably remove these instead of commenting them out? Here and in another file.

Copy link
Member

@jieyouxu jieyouxu Apr 9, 2024

Choose a reason for hiding this comment

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

I'm fine either way, I can see the justification for leaving them in because they should work but they don't because of currently unresolved bugs and limitations.

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer to let them since they are supposed to be used and will potentially to be used in future but aren't due to bugs and limitations.

In particular if you look at the top of this file you can see a lengthy explanation of why there is currently no "full" revision (spoiler: ICE messed up things).

@Urgau
Copy link
Member Author

Urgau commented Apr 10, 2024

@bors r=@jieyouxu

@bors
Copy link
Contributor

bors commented Apr 10, 2024

📌 Commit 0c3f5cc has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors 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 Apr 10, 2024
@BoxyUwU BoxyUwU assigned jieyouxu and unassigned BoxyUwU Apr 10, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#118391 (Add `REDUNDANT_LIFETIMES` lint to detect lifetimes which are semantically redundant)
 - rust-lang#123534 (Windows: set main thread name without re-encoding)
 - rust-lang#123659 (Add support to intrinsics fallback body)
 - rust-lang#123689 (Add const generics support for pattern types)
 - rust-lang#123701 (Only assert for child/parent projection compatibility AFTER checking that theyre coming from the same place)
 - rust-lang#123702 (Further cleanup cfgs in the UI test suite)
 - rust-lang#123706 (rustdoc: reduce per-page HTML overhead)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7a29d39 into rust-lang:master Apr 10, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2024
Rollup merge of rust-lang#123702 - Urgau:prep-work-for-compiletest-check-cfg-2, r=jieyouxu

Further cleanup cfgs in the UI test suite

This PR does more cleanup of cfgs in our UI test suite, in preparation for adding automatic always on check-cfg (but is IMO worth landing even without that follow up).

To be more specific this PR:
 - replaces (the last remaining) never true cfgs by the `FALSE` cfg
 - fix `proc-macro/derive-helper-configured.rs` *(typo in directive)*
 - and comment some current unused `#[cfg_attr]` *(missing revisions)*

Follow-up to rust-lang#123577.
@Urgau Urgau deleted the prep-work-for-compiletest-check-cfg-2 branch April 10, 2024 16:52
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 25, 2024
…youxu

Enable `--check-cfg` by default in UI tests

This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable.

To do so this PR does 2 main things:
 - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests)
 - it updates the _remaining_[^1] UI tests by either:
     - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense
     - give the appropriate check-cfg args
     - or expect the lint, when it useful

[^1]: some preparation work was done in rust-lang#123577 rust-lang#123702

I highly recommend reviewing this PR commit-by-commit.

r? `@jieyouxu`
fmease added a commit to fmease/rust that referenced this pull request May 2, 2024
…youxu

Enable `--check-cfg` by default in UI tests

This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable.

To do so this PR does 2 main things:
 - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests)
 - it updates the _remaining_[^1] UI tests by either:
     - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense
     - give the appropriate check-cfg args
     - or expect the lint, when it useful

[^1]: some preparation work was done in rust-lang#123577 rust-lang#123702

I highly recommend reviewing this PR commit-by-commit.

r? `@jieyouxu`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 2, 2024
…youxu

Enable `--check-cfg` by default in UI tests

This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable.

To do so this PR does 2 main things:
 - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests)
 - it updates the _remaining_[^1] UI tests by either:
     - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense
     - give the appropriate check-cfg args
     - or expect the lint, when it useful

[^1]: some preparation work was done in rust-lang#123577 rust-lang#123702

I highly recommend reviewing this PR commit-by-commit.

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2024
Enable `--check-cfg` by default in UI tests

This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable.

To do so this PR does 2 main things:
 - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests)
 - it updates the _remaining_[^1] UI tests by either:
     - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense
     - give the appropriate check-cfg args
     - or expect the lint, when it useful

[^1]: some preparation work was done in rust-lang#123577 rust-lang#123702

I highly recommend reviewing this PR commit-by-commit.

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2024
Enable `--check-cfg` by default in UI tests

This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable.

To do so this PR does 2 main things:
 - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests)
 - it updates the _remaining_[^1] UI tests by either:
     - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense
     - give the appropriate check-cfg args
     - or expect the lint, when it useful

[^1]: some preparation work was done in rust-lang#123577 rust-lang#123702

I highly recommend reviewing this PR commit-by-commit.

r? `@jieyouxu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants