-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Advent of tests/ui
(misc cleanups and improvements) [4/N]
#140036
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
Conversation
pub fn main() { | ||
println!("{}", f(Triple {x: 3, y: 4, z: 5}, 4).a.x); | ||
println!("{}", f(5, 6).a); | ||
} |
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.
Discussion: this test is also kinda exercising a bunch of things tho -- e.g. I think it also exercises {integer} -> isize
coercion. That return Pair { a: x, b: y };
can also be materially different from Pair { a: x, b: y }
in terms of which HIR typeck path we take. lmw if u have a better wording for the intention of this test.
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
//! Check that certain target *requires* the user to specify a target CPU via `-C target-cpu`. | ||
|
||
//@ revisions: amdgcn_nocpu amdgcn_cpu | ||
|
||
//@[amdgcn_nocpu] compile-flags: --target=amdgcn-amd-amdhsa | ||
//@[amdgcn_nocpu] needs-llvm-components: amdgpu | ||
//@[amdgcn_nocpu] build-fail | ||
|
||
//@[amdgcn_cpu] compile-flags: --target=amdgcn-amd-amdhsa | ||
//@[amdgcn_cpu] needs-llvm-components: amdgpu | ||
//@[amdgcn_cpu] compile-flags: -Ctarget-cpu=gfx900 | ||
//@[amdgcn_cpu] build-pass | ||
|
||
//@ revisions: avr_nocpu avr_cpu | ||
//@[avr_nocpu] compile-flags: --target=avr-none | ||
//@[avr_nocpu] needs-llvm-components: avr | ||
//@[avr_nocpu] build-fail | ||
|
||
//@[avr_cpu] compile-flags: --target=avr-none | ||
//@[avr_cpu] needs-llvm-components: avr | ||
//@[avr_cpu] compile-flags: -Ctarget-cpu=atmega328p | ||
//@[avr_cpu] build-pass |
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.
- Reworked the test as a *centralized* version of checking that certain targets correctly require `-C target-cpu` being specified. - Document test intention. - Move `amdgpu-require-explicit-cpu.rs` under new dir `tests/ui/target-cpu/` - No other ui subdir really fits this "requires `-Ctarget-cpu`" check.
- `tests/ui/augmented-assignment-feature-gate-cross.rs`: - This was *originally* to feature-gate overloaded OpAssign cross-crate, but now let's keep it as a smoke test. - Renamed as `augmented-assignment-cross-crate.rs`. - Relocated under `tests/ui/binop/`. - `tests/ui/augmented-assignments.rs`: - Documented test intent. - Moved under `tests/ui/borrowck/`. - `tests/ui/augmented-assignment-rpass.rs`: - Renamed to drop the `-rpass` suffix, since this was leftover from when `run-pass` test suite was a thing. - Moved under `tests/ui/binop/`.
- Reformat the test. - Document test intention. - Move test under `tests/ui/inference/`.
@rustbot ready |
r? compiler-errors @bors r+ rollup |
…errors Advent of `tests/ui` (misc cleanups and improvements) [4/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895. ### Review advice - Best reviewed commit-by-commit. - I can squash commits before merge, commits are separate to make it easier to review.
Rollup of 11 pull requests Successful merges: - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#139946 (fix missing word in comment) - rust-lang#139982 (SystemTime doc tweaks) - rust-lang#140009 (docs(LocalKey<T>): clarify that T's Drop shouldn't panic) - rust-lang#140021 (Don't ICE on pending obligations from deep normalization in a loop) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140081 (Update `libc` to 0.2.172) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#139946 (fix missing word in comment) - rust-lang#139982 (SystemTime doc tweaks) - rust-lang#140009 (docs(LocalKey<T>): clarify that T's Drop shouldn't panic) - rust-lang#140021 (Don't ICE on pending obligations from deep normalization in a loop) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140081 (Update `libc` to 0.2.172) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#139946 (fix missing word in comment) - rust-lang#139982 (SystemTime doc tweaks) - rust-lang#140009 (docs(LocalKey<T>): clarify that T's Drop shouldn't panic) - rust-lang#140021 (Don't ICE on pending obligations from deep normalization in a loop) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140081 (Update `libc` to 0.2.172) r? `@ghost` `@rustbot` modify labels: rollup
…errors Advent of `tests/ui` (misc cleanups and improvements) [4/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895. ### Review advice - Best reviewed commit-by-commit. - I can squash commits before merge, commits are separate to make it easier to review.
Rollup of 12 pull requests Successful merges: - rust-lang#134213 (Stabilize `naked_functions`) - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#139981 (Don't compute name of associated item if it's an RPITIT) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140077 (Construct OutputType using macro and print [=FILENAME] help info) - rust-lang#140081 (Update `libc` to 0.2.172) - rust-lang#140091 (build_helper: try to rename dir before delete) - rust-lang#140107 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…enton Rollup of 11 pull requests Successful merges: - rust-lang#134213 (Stabilize `naked_functions`) - rust-lang#139711 (Hermit: Unify `std::env::args` with Unix) - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140107 (rustc-dev-guide subtree update) - rust-lang#140111 (cleanup redundant pattern instances) - rust-lang#140118 ({B,C}Str: minor cleanup) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#140036 - jieyouxu:ui-cleanup-4, r=compiler-errors Advent of `tests/ui` (misc cleanups and improvements) [4/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895. ### Review advice - Best reviewed commit-by-commit. - I can squash commits before merge, commits are separate to make it easier to review.
…enton Rollup of 11 pull requests Successful merges: - rust-lang#134213 (Stabilize `naked_functions`) - rust-lang#139711 (Hermit: Unify `std::env::args` with Unix) - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140107 (rustc-dev-guide subtree update) - rust-lang#140111 (cleanup redundant pattern instances) - rust-lang#140118 ({B,C}Str: minor cleanup) r? `@ghost` `@rustbot` modify labels: rollup
Some
tests/ui/
housekeeping, to trim down number of tests directly undertests/ui/
. Part of #133895.Review advice