about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-07-08Expose nested bodies in rustc_borrowck::consumersNico Lehmann-8/+18
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 #143551 - compiler-errors:root-sub, r=cjgillot许杰友 Jieyou Xu (Joe)-0/+127
Dont resolve instance of root in `mir_callgraph_cyclic` `Instance::try_resolve` on a default trait body method will always fail, since it's still possible to further substitute. This leads to a cycle, since in `tests/mir-opt/inline_default_trait_body.rs`, both `Trait::a` and `Trait::b` need to consider the other to be cyclical, but since we couldn't resolve a body, we'd just consider *nothing* to be cyclical. The root instance we care about when computing `mir_callgraph_cyclic` is trivial to compute (it's just `InstanceKind::Item`), so just replace it with a call to `Instance::new_raw`. r? `@cjgillot` `@oli-obk` Fixes rust-lang/rust#143534
2025-07-07Rollup merge of #143524 - makai410:smir-move-back, r=oli-obk许杰友 Jieyou Xu (Joe)-53/+43
Move `stable_mir` back to its own crate We've finished the refactoring, so it's time to move `stable_mir` back to its own crate. This PR leaves an empty `rustc_internal` module with a `#[deprecated]` attribute in `rustc_smir` to let users know we just moved it to `stable_mir`.
2025-07-07Rollup merge of #143482 - ia0:fix, r=fee1-dead许杰友 Jieyou Xu (Joe)-4/+25
Fix short linker error output This PR does 2 things: - It removes the braces when there's a single element. This is required since brace expansion (at least in bash and zsh) only triggers if there's at least 2 elements. - It removes the extra `.rlib` suffixes of the elements. See https://github.com/rust-lang/rust/pull/135707#discussion_r2185212393 for context. Running `cargo +stage1 build` on the following program: ```rust unsafe extern "C" { fn foo() -> libc::c_int; } fn main() { let x = unsafe { foo() } as u32; // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes())); } ``` Gives the following diff before and after the PR: ```diff -/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib +/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib ``` Running on the same program with the additional dependency, we get the following diff: ```diff -/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib +/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib ```
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-07remove `rustc_smir` from testsMakai-53/+43
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-8/+128
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-06Dont resolve instance of root in mir_callgraph_cyclicMichael Goulet-0/+127
2025-07-06Skip `align` tests on wasmJules Bertholet-6/+9
2025-07-06Add more tests for invalid alignmentsJules Bertholet-5/+52
2025-07-06Add FIXME for gen et alJules Bertholet-0/+1
2025-07-06Add test for `dyn` alignmentJules Bertholet-0/+15
2025-07-06Test `async fn`Jules Bertholet-0/+7
2025-07-06Support `#[align(…)]` on fns in `extern` blocksJules Bertholet-0/+14
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-281/+830
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-06Update run-make testia0-4/+25
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-110/+116
r=jdonszelmann Rewrite empty attribute lint for new attribute parser cc `@jdonszelmann`
2025-07-06Do not unify borrowed locals in CopyProp.Camille GILLOT-92/+358
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-103/+112
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.