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

Advent of tests/ui (misc cleanups and improvements) [3/N] #134418

Merged
merged 7 commits into from
Dec 19, 2024

Conversation

jieyouxu
Copy link
Member

Part of #133895.

Misc improvements to some ui tests immediately under tests/ui/.

Best reviewed commit-by-commit. Each commit's commit message contains further elaboration and rationale for changes.

r? compiler

- Move `tests/ui/attr-bad-crate-attr.rs` to `tests/ui/attributes/`.
- Briefly document test intent add link to relevant Reference docs.
- Move `tests/ui/attr-shebang.rs` to `tests/ui/attributes/`.
- Downgrade test to `check-pass`, this would fail very early if the
  parser did not accept `#![..]` attributes.
- Briefly document test intent.
@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 Dec 17, 2024
- Move `tests/ui/attr-usage-inline.rs` to `tests/ui/attributes/inline/`.
- Briefly document test intent.
- Drop unnecessary `#[allow(dead_code)]` as this is allowed-by-default
  for ui test suite.
- Move `tests/ui/attrs-resolution-errors.rs` to `tests/ui/resolve/`.
- Document test intent.
- Rename test to `attr-macros-positional-rejection.rs` to better reflect
  test intent.
- Move `tests/ui/attrs-resolution.rs` to `tests/ui/resolve/`.
- Document test intent.
- Rename test to `non-macro-attrs-accepted.rs` to better reflect test
  intent.
@jieyouxu
Copy link
Member Author

jieyouxu commented Dec 17, 2024

Probably should group tests/ui/{attrs-resolution-errors,attrs-resolutions}.rs together, naming suggestions / organization advice welcomed.

Note that I didn't use differential revisions for these two tests and merge them into one because

#[cfg_attr(rev_name, non_macro_attr)]

is IMO significantly different from

#[non_macro_attr]

@jieyouxu jieyouxu added the A-testsuite Area: The testsuite used to check the correctness of rustc label Dec 17, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#20 exporting to docker image format
#20 sending tarball 28.0s done
#20 DONE 41.6s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
  Downloaded boml v0.3.1
   Compiling boml v0.3.1
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished `release` profile [optimized] target(s) in 3.90s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --mini-tests --std-tests`
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc

@jieyouxu jieyouxu 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 Dec 17, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Dec 17, 2024

... Blocked on making the bootstrap test not use a random ui test in #134423.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 17, 2024
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Dec 17, 2024
…nur-ozkan

bootstrap: use specific-purpose ui test path for `test_valid` self-test

I wanted to move some ui tests around in rust-lang#134418, which broke `test_valid` since it was referencing two non-specific-purpose ui tests. This PR instead adds two dummy tests under `tests/ui/bootstrap/self-test/`, for that purpose specifically.

r? bootstrap
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Dec 17, 2024
…nur-ozkan

bootstrap: use specific-purpose ui test path for `test_valid` self-test

I wanted to move some ui tests around in rust-lang#134418, which broke `test_valid` since it was referencing two non-specific-purpose ui tests. This PR instead adds two dummy tests under `tests/ui/bootstrap/self-test/`, for that purpose specifically.

r? bootstrap
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 17, 2024
…nur-ozkan

bootstrap: use specific-purpose ui test path for `test_valid` self-test

I wanted to move some ui tests around in rust-lang#134418, which broke `test_valid` since it was referencing two non-specific-purpose ui tests. This PR instead adds two dummy tests under `tests/ui/bootstrap/self-test/`, for that purpose specifically.

r? bootstrap
@jieyouxu jieyouxu closed this Dec 18, 2024
@jieyouxu jieyouxu reopened this Dec 18, 2024
@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Dec 18, 2024
@jieyouxu
Copy link
Member Author

Unblocked as #134423 merged.

@jieyouxu
Copy link
Member Author

@rustbot ready

@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 Dec 18, 2024
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 18, 2024

📌 Commit 47ad3b2 has been approved by compiler-errors

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 Dec 18, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 18, 2024
…errors

Advent of `tests/ui` (misc cleanups and improvements) [3/N]

Part of rust-lang#133895.

Misc improvements to some ui tests immediately under `tests/ui/`.

Best reviewed commit-by-commit. Each commit's commit message contains further elaboration and rationale for changes.

r? compiler
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 18, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#132056 (Stabilize `#[diagnostic::do_not_recommend]`)
 - rust-lang#133643 (-Znext-solver: modify candidate preference rules)
 - rust-lang#134418 (Advent of `tests/ui` (misc cleanups and improvements) [3/N])
 - rust-lang#134432 (Fix intra doc links not generated inside footnote definitions)
 - rust-lang#134473 (chore: fix some typos)
 - rust-lang#134474 (Forbid overwriting types in typeck)
 - rust-lang#134477 (move lint_unused_mut into sub-fn)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2024
Rollup of 8 pull requests

Successful merges:

 - rust-lang#132056 (Stabilize `#[diagnostic::do_not_recommend]`)
 - rust-lang#133643 (-Znext-solver: modify candidate preference rules)
 - rust-lang#134388 (Update books)
 - rust-lang#134418 (Advent of `tests/ui` (misc cleanups and improvements) [3/N])
 - rust-lang#134473 (chore: fix some typos)
 - rust-lang#134481 (Point at lint name instead of whole attr for gated lints)
 - rust-lang#134484 (Add nnethercote to the `triagebot.toml` vacation list.)
 - rust-lang#134490 (Fix typo in ptr/mod.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 871c2d8 into rust-lang:master Dec 19, 2024
10 of 12 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2024
Rollup merge of rust-lang#134418 - jieyouxu:ui-cleanup-3, r=compiler-errors

Advent of `tests/ui` (misc cleanups and improvements) [3/N]

Part of rust-lang#133895.

Misc improvements to some ui tests immediately under `tests/ui/`.

Best reviewed commit-by-commit. Each commit's commit message contains further elaboration and rationale for changes.

r? compiler
@jieyouxu jieyouxu deleted the ui-cleanup-3 branch December 19, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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