about summary refs log tree commit diff
path: root/tests/ui
AgeCommit message (Collapse)AuthorLines
2025-07-08Auto merge of #134628 - estebank:const-default, r=oli-obkbors-143/+154
Make `Default` const and add some `const Default` impls Full list of `impl const Default` types: - () - bool - char - std::ascii::Char - usize - u8 - u16 - u32 - u64 - u128 - i8 - i16 - i32 - i64 - i128 - f16 - f32 - f64 - f128 - std::marker::PhantomData<T> - Option<T> - std::iter::Empty<T> - std::ptr::Alignment - &[T] - &mut [T] - &str - &mut str - String - Vec<T>
2025-07-08Auto merge of #143621 - matthiaskrgr:rollup-p1ce8l7, r=matthiaskrgrbors-11/+181
Rollup of 7 pull requests Successful merges: - rust-lang/rust#142098 (Implement `int_format_into` feature) - rust-lang/rust#143567 (Point to correct argument in Func Call when Self type fails trait bound) - rust-lang/rust#143570 (consider nested cases for duplicate RPITIT) - rust-lang/rust#143571 (remove `has_nested` from builtin candidates) - rust-lang/rust#143586 (Fix wrong cache event query key) - rust-lang/rust#143589 (const-block-as-pattern: do not refer to no-longer-existing nightly feature) - rust-lang/rust#143608 (Fix in std::String docs) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-08Rollup merge of #143589 - RalfJung:const-pat, r=compiler-errorsMatthias Krüger-3/+3
const-block-as-pattern: do not refer to no-longer-existing nightly feature Surely everyone who used this nightly feature has fixed their code by now. So let's not confused people on stable that try to use a const block as a pattern by referring to some dead nightly feature.
2025-07-08Rollup merge of #143570 - bvanjoi:issue-143560, r=compiler-errorsMatthias Krüger-1/+138
consider nested cases for duplicate RPITIT Fixes rust-lang/rust#143560 r? `@compiler-errors` cc `@Zoxc`
2025-07-08Rollup merge of #143567 - xizheyin:143336, r=compiler-errorsMatthias Krüger-7/+40
Point to correct argument in Func Call when Self type fails trait bound Fixes rust-lang/rust#143336 When a trait bound fails due to the `Self` type parameter, `adjust_fulfillment_errors` now correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. This is because `Call` may also need to handle the `self` parameter, and not just `MethodCall` needs to be handled, as rust-lang/rust#143336. r? compiler
2025-07-08Auto merge of #143433 - oli-obk:ty_span_qry, r=compiler-errorsbors-8/+39
Add `ty_span` query r? `@compiler-errors` fixes diagnostic regressions from https://github.com/rust-lang/rust/pull/142030 Also uses the new query in `check_const_item`
2025-07-07Make `Default` const and add some `const Default` implsEsteban Küber-143/+154
Full list of `impl const Default` types: - () - bool - char - Cell - std::ascii::Char - usize - u8 - u16 - u32 - u64 - u128 - i8 - i16 - i32 - i64 - i128 - f16 - f32 - f64 - f128 - std::marker::PhantomData<T> - Option<T> - std::iter::Empty<T> - std::ptr::Alignment - &[T] - &mut [T] - &str - &mut str - String - Vec<T>
2025-07-07Rollup merge of #143583 - folkertdev:loop-match-no-terminator-on-block, r=bjorn3Matthias Krüger-0/+31
`loop_match`: fix 'no terminator on block' tracking issue: https://github.com/rust-lang/rust/issues/132306 fixes https://github.com/rust-lang/rust/issues/143435 The argument `block` was not properly closed on an error path. r? `@bjorn3`
2025-07-07Rollup merge of #143539 - JonathanBrouwer:ice-regression-tests, r=oli-obkMatthias Krüger-0/+57
Regression tests for repr ICEs Closes https://github.com/rust-lang/rust/issues/143522 Closes https://github.com/rust-lang/rust/issues/143479 Both issues were already (accidentally) fixed in this PR, but having the tests is nice https://github.com/rust-lang/rust/pull/143252 r? `@jdonszelmann`
2025-07-07Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865Matthias Krüger-1/+1
awhile -> a while where appropriate
2025-07-07Rollup merge of #132469 - estebank:issue-132041, r=NadrierilMatthias Krüger-0/+92
Do not suggest borrow that is already there in fully-qualified call When encountering `&str::from("value")` do not suggest `&&str::from("value")`. Fix #132041.
2025-07-07const-block-as-pattern: do not refer to no-longer-existing nightly featureRalf Jung-3/+3
2025-07-07`loop_match`: fix 'no terminator on block'Folkert de Vries-0/+31
2025-07-07Rollup merge of #143464 - workingjubilee:make-debug-rs-cross-compile, r=oli-obk许杰友 Jieyou Xu (Joe)-12/+1007
Make tests/ui/abi/debug.rs cross-compile Resumption of rust-lang/rust#141979, making the test cross-compile.
2025-07-07consider nested cases for duplicate RPITITbohan-1/+138
2025-07-07Point to correct argument in Func Call when Self type fails trait boundxizheyin-11/+17
When a trait bound fails due to the Self type parameter, adjust_fulfillment_errors now correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07Add test tests/ui/trait-bounds/false-span-in-trait-bound-label.rsxizheyin-0/+27
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07Add `ty_span` queryOli Scherer-8/+39
2025-07-07Rollup merge of #143344 - JonathanBrouwer:path-parser, r=jdonszelmannJacob Pratt-35/+46
Port `#[path]` to the new attribute parsing infrastructure Ports `#[path]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 This PR duplicates a change from https://github.com/rust-lang/rust/pull/143237 Draft until that one is merged
2025-07-07Rollup merge of #143206 - Jules-Bertholet:align-attr-fixes, r=workingjubileeJacob Pratt-2/+98
Align attr fixes - Remove references to the superseded `repr(align)` syntax - Allow the attribute on fn items in `extern` blocks - Test attribute in combination with `async fn` and `dyn` r? workingjubilee Tracking issue: https://github.com/rust-lang/rust/issues/82232 `@rustbot` label A-attributes F-fn_align T-compiler
2025-07-06Skip `align` tests on wasmJules Bertholet-0/+1
2025-07-06Add more tests for invalid alignmentsJules Bertholet-5/+52
2025-07-06Add test for `dyn` alignmentJules Bertholet-0/+15
2025-07-06Remove `repr(align)` codeJules Bertholet-1/+34
2025-07-06Port `#[path]` to the new attribute parsing infrastructureJonathan Brouwer-35/+46
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06Regression tests for repr ICEsJonathan Brouwer-0/+57
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06Auto merge of #143509 - cjgillot:copy-prop-noborrow, r=tmiaskobors-189/+472
Do not unify borrowed locals in CopyProp. Instead of trying yet another scheme to unify borrowed locals in CopyProp, let's just stop trying. We had already enough miscompilations because of this. I'm convinced it's possible to have both unification of some borrowed locals and soundness, but I don't have a simple and convincing formulation yet. Fixes https://github.com/rust-lang/rust/issues/143491
2025-07-06Do not optimize stable-mir ui tests.Camille GILLOT-189/+472
2025-07-06Rollup merge of #143514 - joshtriplett:macro-test-organization, r=jieyouxuMatthias Krüger-11/+11
Organize macro tests a bit more - Move some macro parsing tests from `tests/ui/parser` to `tests/ui/parser/macro`. - Most macro tests use `macro` in the name, making it easy to find and run tests relevant to macros. However, a few use `mbe` instead. Rename those to say `macro`.
2025-07-06Rollup merge of #143252 - JonathanBrouwer:rewrite_empty_attribute, ↵Matthias Krüger-108/+114
r=jdonszelmann Rewrite empty attribute lint for new attribute parser cc `@jdonszelmann`
2025-07-06Rollup merge of #143484 - bvanjoi:issue-140796, r=compiler-errorsMatthias Krüger-0/+83
distinguish the duplicate item of rpitit Fixes rust-lang/rust#140796 r? compiler cc `@Zoxc`
2025-07-06Fix line break after ":" in unpretty attribute printJonathan Brouwer-9/+6
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06Rewrite empty attribute lintJonathan Brouwer-101/+110
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06distinguish the duplicate item of rpititbohan-0/+83
2025-07-06Auto merge of #143507 - matthiaskrgr:rollup-lpg7t12, r=matthiaskrgrbors-50/+65
Rollup of 6 pull requests Successful merges: - rust-lang/rust#143238 (Port `#[ignore]` to the new attribute parsing infrastructure) - rust-lang/rust#143441 (Stop using `Key` trait unnecessarily) - rust-lang/rust#143478 (Miri subtree update) - rust-lang/rust#143486 (remove armv5te-unknown-linux-gnueabi target maintainer) - rust-lang/rust#143489 (Complete rustc_ast::mut_visit for spans.) - rust-lang/rust#143494 (Remove yields_in_scope from the scope tree.) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-05Rename tests named with `mbe` to use `macro` insteadJosh Triplett-11/+11
Most macro tests use `macro` in the name, making it easy to find and run tests relevant to macros. However, a few use `mbe` instead. Rename those to say `macro`.
2025-07-06Auto merge of #143126 - dianqk:update-llvm, r=nikicbors-0/+24
Update LLVM submodule Fixes rust-lang/rust#140686, fixes rust-lang/rust#141913, fixes rust-lang/rust#142752, fixes rust-lang/rust#143399.
2025-07-05Move macro tests in `parser` into `macro` directoryJosh Triplett-0/+0
The `macro` directory contains most of the macro tests, but not all of them; move the remainder into `macro`.
2025-07-05Rollup merge of #143441 - compiler-errors:no-key, r=petrochenkovMatthias Krüger-13/+12
Stop using `Key` trait unnecessarily Few places where the `Key` trait was being used but not really for a useful reason. This fixes those usages. Namely, `<Ty as Key>::default_span()` is `DUMMY_SP` anyways.
2025-07-05Rollup merge of #143238 - JonathanBrouwer:ignore_parser, r=jdonszelmannMatthias Krüger-37/+53
Port `#[ignore]` to the new attribute parsing infrastructure Ports `ignore` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 This PR duplicates a change from https://github.com/rust-lang/rust/pull/143237 Draft until that one is merged
2025-07-05Port `#[ignore]` to the new attribute parsing infrastructureJonathan Brouwer-37/+53
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-05Stop using Key trait randomlyMichael Goulet-13/+12
2025-07-05Auto merge of #143473 - workingjubilee:rollup-bxie7zg, r=scottmcmbors-682/+973
Rollup of 11 pull requests Successful merges: - rust-lang/rust#142440 (`tests/ui`: A New Order [14/N]) - rust-lang/rust#143040 (Add `const Rem`) - rust-lang/rust#143086 (Update poison.rs to fix the typo (sys->sync)) - rust-lang/rust#143202 (`tests/ui`: A New Order [18/N]) - rust-lang/rust#143296 (`tests/ui`: A New Order [21/N]) - rust-lang/rust#143297 (`tests/ui`: A New Order [22/N]) - rust-lang/rust#143299 (`tests/ui`: A New Order [24/N]) - rust-lang/rust#143300 (`tests/ui`: A New Order [25/N]) - rust-lang/rust#143397 (test passing a `VaList` from rust to C) - rust-lang/rust#143410 (Block SIMD in transmute_immediate; delete `OperandValueKind`) - rust-lang/rust#143452 (Fix CLI completion check in `tidy`) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-05Auto merge of #139598 - compiler-errors:no-bound-var-symbol, r=WaffleLapkinbors-33/+34
Remove `Symbol` from `Named` variant of `BoundRegionKind`/`LateParamRegionKind` The `Symbol` is redundant, since we already store a `DefId` in the region variant. Instead, load the name via `item_name` when needed (which is almost always on the diagnostic path). This introduces a `BoundRegionKind::NamedAnon` which is used for giving anonymous bound regions names, but which should only be used during pretty printing and error reporting.
2025-07-04Rollup merge of #143300 - Kivooeo:tf25, r=tgross35Jubilee-97/+155
`tests/ui`: A New Order [25/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-07-04Rollup merge of #143299 - Kivooeo:tf24, r=tgross35Jubilee-204/+264
`tests/ui`: A New Order [24/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-07-04Rollup merge of #143297 - Kivooeo:tf22, r=tgross35Jubilee-60/+57
`tests/ui`: A New Order [22/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-07-04Rollup merge of #143296 - Kivooeo:tf21, r=tgross35Jubilee-55/+70
`tests/ui`: A New Order [21/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-07-04Rollup merge of #143202 - Kivooeo:tf18, r=tgross35Jubilee-133/+224
`tests/ui`: A New Order [18/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-07-04Rollup merge of #142440 - Kivooeo:tf14, r=tgross35Jubilee-133/+203
`tests/ui`: A New Order [14/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@jieyouxu`