From 09882ef10bb0083619f7dda61b9f5c08c47ac419 Mon Sep 17 00:00:00 2001 From: Tim Vilgot Mikael Fredenberg Date: Mon, 13 Jul 2026 19:41:25 +0200 Subject: [PATCH 1/8] inline Once wait and wait_force --- library/std/src/sync/once.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/std/src/sync/once.rs b/library/std/src/sync/once.rs index 2556d1897b642..d37e57e399660 100644 --- a/library/std/src/sync/once.rs +++ b/library/std/src/sync/once.rs @@ -296,6 +296,7 @@ impl Once { /// If this [`Once`] has been poisoned because an initialization closure has /// panicked, this method will also panic. Use [`wait_force`](Self::wait_force) /// if this behavior is not desired. + #[inline] #[stable(feature = "once_wait", since = "1.86.0")] #[rustc_should_not_be_called_on_const_items] pub fn wait(&self) { @@ -309,6 +310,7 @@ impl Once { /// /// If this [`Once`] has been poisoned, this function blocks until it /// becomes completed, unlike [`Once::wait()`], which panics in this case. + #[inline] #[stable(feature = "once_wait", since = "1.86.0")] #[rustc_should_not_be_called_on_const_items] pub fn wait_force(&self) { From 9561a5236924cf3ebd13129be2f767f58ffc1195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 13 Jul 2026 22:43:16 +0200 Subject: [PATCH 2/8] Bump rustc-perf submodule --- src/tools/rustc-perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rustc-perf b/src/tools/rustc-perf index dec492af8eb74..a134d7f67336c 160000 --- a/src/tools/rustc-perf +++ b/src/tools/rustc-perf @@ -1 +1 @@ -Subproject commit dec492af8eb74903879bd356648fc42d7aaf8555 +Subproject commit a134d7f67336c1178aa28b09063f86e28bb42cd6 From 5f35fc8b8f466c0112b833e6dc375289f986cc4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Mon, 13 Jul 2026 22:48:25 +0000 Subject: [PATCH 3/8] Replace shortened type with `_` instead of `...` as placeholder --- compiler/rustc_middle/src/ty/print/pretty.rs | 2 +- tests/ui/codegen/overflow-during-mono.stderr | 4 ++-- ...hr_alias_normalization_leaking_vars.stderr | 2 +- tests/ui/diagnostic-width/E0271.ascii.stderr | 6 +++--- .../ui/diagnostic-width/E0271.unicode.stderr | 6 +++--- tests/ui/diagnostic-width/binop.rs | 4 ++-- tests/ui/diagnostic-width/binop.stderr | 8 ++++---- .../diagnostic-width/long-E0308.ascii.stderr | 20 +++++++++---------- .../long-E0308.unicode.stderr | 20 +++++++++---------- tests/ui/diagnostic-width/long-E0529.rs | 4 ++-- tests/ui/diagnostic-width/long-E0529.stderr | 4 ++-- tests/ui/diagnostic-width/long-E0609.rs | 2 +- tests/ui/diagnostic-width/long-E0609.stderr | 2 +- tests/ui/diagnostic-width/long-E0614.rs | 2 +- tests/ui/diagnostic-width/long-E0614.stderr | 2 +- tests/ui/diagnostic-width/long-E0618.rs | 4 ++-- tests/ui/diagnostic-width/long-E0618.stderr | 4 ++-- tests/ui/diagnostic-width/long-e0277.rs | 2 +- tests/ui/diagnostic-width/long-e0277.stderr | 4 ++-- .../non-copy-type-moved.stderr | 2 +- .../secondary-label-with-long-type.rs | 4 ++-- .../secondary-label-with-long-type.stderr | 6 +++--- .../dropck_no_diverge_on_nonregular_1.stderr | 2 +- tests/ui/error-codes/E0275.stderr | 4 ++-- .../hang-on-deeply-nested-dyn.stderr | 2 +- ...inding-without-sufficient-type-info.stderr | 2 +- ...te-instantiation-struct-tail-ice-114484.rs | 2 +- ...nstantiation-struct-tail-ice-114484.stderr | 8 ++++---- .../ui/infinite/infinite-instantiation.stderr | 2 +- .../issue-37311.stderr | 2 +- .../inherent-impls-overflow.current.stderr | 6 +++--- .../inherent-impls-overflow.rs | 6 +++--- .../type-length-limit-enforcement.stderr | 2 +- .../ui/methods/inherent-bound-in-probe.stderr | 2 +- .../probe-error-on-infinite-deref.stderr | 2 +- .../mismatch-sugg-for-shorthand-field.stderr | 2 +- .../dyn-trait-ice-153366.stderr | 2 +- ...inite-function-recursion-error-8727.stderr | 2 +- tests/ui/recursion/issue-23122-2.stderr | 4 ++-- ...-38591-non-regular-dropck-recursion.stderr | 2 +- tests/ui/recursion/issue-83150.stderr | 2 +- tests/ui/recursion/recursion.stderr | 2 +- ...ve-impl-trait-iterator-by-ref-67552.stderr | 2 +- .../box-future-wrong-output.stderr | 2 +- .../expected-boxed-future-isnt-pinned.stderr | 6 +++--- tests/ui/suggestions/issue-107860.stderr | 2 +- ...associated-error-bound-issue-145586.stderr | 2 +- tests/ui/traits/issue-68295.stderr | 2 +- .../issue-91949-hangs-on-recursion.stderr | 2 +- .../next-solver/overflow/global-cache.stderr | 2 +- .../traits/on_unimplemented_long_types.stderr | 6 +++--- ...pl-overflow-with-where-clause-20413.stderr | 6 +++--- tests/ui/trimmed-paths/doc-hidden.rs | 4 ++-- tests/ui/trimmed-paths/doc-hidden.stderr | 4 ++-- tests/ui/typeck/issue-107775.stderr | 2 +- 55 files changed, 107 insertions(+), 107 deletions(-) diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 2d45b6feb59f0..e26c448cb75ee 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -2357,7 +2357,7 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> { { // We only truncate types that we know are likely to be much longer than 3 chars. // There's no point in replacing `i32` or `!`. - write!(self, "...")?; + write!(self, "_")?; Ok(()) } _ => { diff --git a/tests/ui/codegen/overflow-during-mono.stderr b/tests/ui/codegen/overflow-during-mono.stderr index 1559de757e7ba..4d631e255afe5 100644 --- a/tests/ui/codegen/overflow-during-mono.stderr +++ b/tests/ui/codegen/overflow-during-mono.stderr @@ -3,8 +3,8 @@ error[E0275]: overflow evaluating the requirement `for<'a> {closure@$DIR/overflo = help: consider increasing the recursion limit by adding a `#![recursion_limit = "64"]` attribute to your crate (`overflow_during_mono`) = note: required for `Filter, {closure@overflow-during-mono.rs:14:41}>` to implement `Iterator` = note: 31 redundant requirements hidden - = note: required for `Filter, ...>, ...>, ...>, ...>` to implement `Iterator` - = note: required for `Filter, ...>, ...>, ...>, ...>` to implement `IntoIterator` + = note: required for `Filter, _>, _>, _>, _>, _>` to implement `Iterator` + = note: required for `Filter, _>, _>, _>, _>, _>` to implement `IntoIterator` = note: the full name for the type has been written to '$TEST_BUILD_DIR/overflow-during-mono.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/coercion/hr_alias_normalization_leaking_vars.stderr b/tests/ui/coercion/hr_alias_normalization_leaking_vars.stderr index 54da352c65039..c549748f2d0d1 100644 --- a/tests/ui/coercion/hr_alias_normalization_leaking_vars.stderr +++ b/tests/ui/coercion/hr_alias_normalization_leaking_vars.stderr @@ -16,7 +16,7 @@ error[E0308]: mismatched types --> $DIR/hr_alias_normalization_leaking_vars.rs:34:36 | LL | LendingIterator::for_each(&(), f); - | ------------------------- ^ expected `Box`, found fn item + | ------------------------- ^ expected `Box`, found fn item | | | arguments to this function are incorrect | diff --git a/tests/ui/diagnostic-width/E0271.ascii.stderr b/tests/ui/diagnostic-width/E0271.ascii.stderr index ad5f53e44beab..f1e9a9366925a 100644 --- a/tests/ui/diagnostic-width/E0271.ascii.stderr +++ b/tests/ui/diagnostic-width/E0271.ascii.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving ` as Future>::Error == Foo` +error[E0271]: type mismatch resolving ` as Future>::Error == Foo` --> $DIR/E0271.rs:19:5 | LL | / Box::new( @@ -7,14 +7,14 @@ LL | | Err::<(), _>( LL | | Ok::<_, ()>( ... | LL | | ) - | |_____^ type mismatch resolving ` as Future>::Error == Foo` + | |_____^ type mismatch resolving ` as Future>::Error == Foo` | note: expected this to be `Foo` --> $DIR/E0271.rs:9:18 | LL | type Error = E; | ^ - = note: required for the cast from `Box>` to `Box<...>` + = note: required for the cast from `Box>` to `Box<_>` = note: the full name for the type has been written to '$TEST_BUILD_DIR/E0271.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/diagnostic-width/E0271.unicode.stderr b/tests/ui/diagnostic-width/E0271.unicode.stderr index 91adf83410163..ecb09c53a76c6 100644 --- a/tests/ui/diagnostic-width/E0271.unicode.stderr +++ b/tests/ui/diagnostic-width/E0271.unicode.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving ` as Future>::Error == Foo` +error[E0271]: type mismatch resolving ` as Future>::Error == Foo` ╭▸ $DIR/E0271.rs:19:5 │ LL │ ┏ Box::new( @@ -7,14 +7,14 @@ LL │ ┃ Err::<(), _>( LL │ ┃ Ok::<_, ()>( ‡ ┃ LL │ ┃ ) - │ ┗━━━━━┛ type mismatch resolving ` as Future>::Error == Foo` + │ ┗━━━━━┛ type mismatch resolving ` as Future>::Error == Foo` ╰╴ note: expected this to be `Foo` ╭▸ $DIR/E0271.rs:9:18 │ LL │ type Error = E; │ ━ - ├ note: required for the cast from `Box>` to `Box<...>` + ├ note: required for the cast from `Box>` to `Box<_>` ├ note: the full name for the type has been written to '$TEST_BUILD_DIR/E0271.long-type-$LONG_TYPE_HASH.txt' ╰ note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/diagnostic-width/binop.rs b/tests/ui/diagnostic-width/binop.rs index 9e4e837f38698..fc6e47b0fdecc 100644 --- a/tests/ui/diagnostic-width/binop.rs +++ b/tests/ui/diagnostic-width/binop.rs @@ -5,11 +5,11 @@ type C = (B, B, B, B); type D = (C, C, C, C); fn foo(x: D) { - x + x; //~ ERROR cannot add `(... + x + x; //~ ERROR cannot add `((_ } fn bar(x: D) { - !x; //~ ERROR cannot apply unary operator `!` to type `(... + !x; //~ ERROR cannot apply unary operator `!` to type `((_ } fn main() {} diff --git a/tests/ui/diagnostic-width/binop.stderr b/tests/ui/diagnostic-width/binop.stderr index 92723df5a9b35..adf168ffb06f1 100644 --- a/tests/ui/diagnostic-width/binop.stderr +++ b/tests/ui/diagnostic-width/binop.stderr @@ -1,15 +1,15 @@ -error[E0369]: cannot add `(..., ..., ..., ...)` to `(..., ..., ..., ...)` +error[E0369]: cannot add `((_, _, _, _), _, _, _)` to `((_, _, _, _), _, _, _)` --> $DIR/binop.rs:8:7 | LL | x + x; - | - ^ - (..., ..., ..., ...) + | - ^ - ((_, _, _, _), _, _, _) | | - | (..., ..., ..., ...) + | ((_, _, _, _), _, _, _) | = note: the full name for the type has been written to '$TEST_BUILD_DIR/binop.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console -error[E0600]: cannot apply unary operator `!` to type `(..., ..., ..., ...)` +error[E0600]: cannot apply unary operator `!` to type `((_, _, _, _), _, _, _)` --> $DIR/binop.rs:12:5 | LL | !x; diff --git a/tests/ui/diagnostic-width/long-E0308.ascii.stderr b/tests/ui/diagnostic-width/long-E0308.ascii.stderr index d1fdd6c443352..3acf3829c352e 100644 --- a/tests/ui/diagnostic-width/long-E0308.ascii.stderr +++ b/tests/ui/diagnostic-width/long-E0308.ascii.stderr @@ -16,10 +16,10 @@ LL | | Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok... LL | | Ok("") LL | | )))))))))))))))))))))))))))))) LL | | )))))))))))))))))))))))))))))); - | |__________________________________^ expected `Atype, i32>, i32>`, found `Result, _>, _>` + | |__________________________________^ expected `Atype, i32>, i32>`, found `Result, _>, _>` | - = note: expected struct `Atype, i32>` - found enum `Result, _>` + = note: expected struct `Atype, i32>` + found enum `Result, _>` = note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console @@ -32,10 +32,10 @@ LL | | Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(... LL | | Ok(Ok(Ok(Ok(Ok(Ok(Ok(""))))))) LL | | )))))))))))))))))))))))))))))) LL | | )))))))))))))))))))))))); - | |____________________________^ expected `Option>, _>>`, found `Result, _>, _>` + | |____________________________^ expected `Option>, _>>`, found `Result, _>, _>` | - = note: expected enum `Option, _>>` - found enum `Result, _>` + = note: expected enum `Option, _>>` + found enum `Result, _>` = note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console @@ -50,11 +50,11 @@ LL | | Atype< ... | LL | | i32 LL | | > = (); - | | - ^^ expected `Atype, i32>, i32>`, found `()` + | | - ^^ expected `Atype, i32>, i32>`, found `()` | |_____| | expected due to this | - = note: expected struct `Atype, i32>` + = note: expected struct `Atype, i32>` found unit type `()` = note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console @@ -70,10 +70,10 @@ LL | | Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(... LL | | Ok(Ok(Ok(Ok(Ok(Ok(Ok(""))))))) LL | | )))))))))))))))))))))))))))))) LL | | )))))))))))))))))))))))); - | |____________________________^ expected `()`, found `Result, _>, _>` + | |____________________________^ expected `()`, found `Result, _>, _>` | = note: expected unit type `()` - found enum `Result, _>` + found enum `Result, _>` = note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/diagnostic-width/long-E0308.unicode.stderr b/tests/ui/diagnostic-width/long-E0308.unicode.stderr index 69e5ca100671e..4cd09b66eee90 100644 --- a/tests/ui/diagnostic-width/long-E0308.unicode.stderr +++ b/tests/ui/diagnostic-width/long-E0308.unicode.stderr @@ -16,10 +16,10 @@ LL │ ┃ Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(O… LL │ ┃ Ok("") LL │ ┃ )))))))))))))))))))))))))))))) LL │ ┃ )))))))))))))))))))))))))))))); - │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `Atype, i32>, i32>`, found `Result, _>, _>` + │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `Atype, i32>, i32>`, found `Result, _>, _>` │ - ├ note: expected struct `Atype, i32>` - │ found enum `Result, _>` + ├ note: expected struct `Atype, i32>` + │ found enum `Result, _>` ├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' ╰ note: consider using `--verbose` to print the full type name to the console @@ -32,10 +32,10 @@ LL │ ┃ Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok… LL │ ┃ Ok(Ok(Ok(Ok(Ok(Ok(Ok(""))))))) LL │ ┃ )))))))))))))))))))))))))))))) LL │ ┃ )))))))))))))))))))))))); - │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `Option>, _>>`, found `Result, _>, _>` + │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `Option>, _>>`, found `Result, _>, _>` │ - ├ note: expected enum `Option, _>>` - │ found enum `Result, _>` + ├ note: expected enum `Option, _>>` + │ found enum `Result, _>` ├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' ╰ note: consider using `--verbose` to print the full type name to the console @@ -50,11 +50,11 @@ LL │ │ Atype< ‡ │ LL │ │ i32 LL │ │ > = (); - │ │ │ ━━ expected `Atype, i32>, i32>`, found `()` + │ │ │ ━━ expected `Atype, i32>, i32>`, found `()` │ └─────┤ │ expected due to this │ - ├ note: expected struct `Atype, i32>` + ├ note: expected struct `Atype, i32>` │ found unit type `()` ├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' ╰ note: consider using `--verbose` to print the full type name to the console @@ -70,10 +70,10 @@ LL │ ┃ Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok… LL │ ┃ Ok(Ok(Ok(Ok(Ok(Ok(Ok(""))))))) LL │ ┃ )))))))))))))))))))))))))))))) LL │ ┃ )))))))))))))))))))))))); - │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `()`, found `Result, _>, _>` + │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `()`, found `Result, _>, _>` │ ├ note: expected unit type `()` - │ found enum `Result, _>` + │ found enum `Result, _>` ├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt' ╰ note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/diagnostic-width/long-E0529.rs b/tests/ui/diagnostic-width/long-E0529.rs index 4146d3be40fe0..3930c1aa303d8 100644 --- a/tests/ui/diagnostic-width/long-E0529.rs +++ b/tests/ui/diagnostic-width/long-E0529.rs @@ -7,8 +7,8 @@ type C = (B, B, B, B); type D = (C, C, C, C); fn foo(x: D) { - let [] = x; //~ ERROR expected an array or slice, found `(... - //~^ NOTE pattern cannot match with input type `(... + let [] = x; //~ ERROR expected an array or slice, found `((_ + //~^ NOTE pattern cannot match with input type `((_ } fn main() {} diff --git a/tests/ui/diagnostic-width/long-E0529.stderr b/tests/ui/diagnostic-width/long-E0529.stderr index e5b82b592712f..bd0ba90fa930e 100644 --- a/tests/ui/diagnostic-width/long-E0529.stderr +++ b/tests/ui/diagnostic-width/long-E0529.stderr @@ -1,8 +1,8 @@ -error[E0529]: expected an array or slice, found `(..., ..., ..., ...)` +error[E0529]: expected an array or slice, found `((_, _, _, _), _, _, _)` --> $DIR/long-E0529.rs:10:9 | LL | let [] = x; - | ^^ pattern cannot match with input type `(..., ..., ..., ...)` + | ^^ pattern cannot match with input type `((_, _, _, _), _, _, _)` | = note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0529.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/diagnostic-width/long-E0609.rs b/tests/ui/diagnostic-width/long-E0609.rs index a26d16ad12e78..d9c4417ad93cc 100644 --- a/tests/ui/diagnostic-width/long-E0609.rs +++ b/tests/ui/diagnostic-width/long-E0609.rs @@ -6,7 +6,7 @@ type C = (B, B, B, B); type D = (C, C, C, C); fn foo(x: D) { - x.field; //~ ERROR no field `field` on type `(... + x.field; //~ ERROR no field `field` on type `((_ } fn main() {} diff --git a/tests/ui/diagnostic-width/long-E0609.stderr b/tests/ui/diagnostic-width/long-E0609.stderr index 70092ea34bc13..894f7ef131eef 100644 --- a/tests/ui/diagnostic-width/long-E0609.stderr +++ b/tests/ui/diagnostic-width/long-E0609.stderr @@ -1,4 +1,4 @@ -error[E0609]: no field `field` on type `(..., ..., ..., ...)` +error[E0609]: no field `field` on type `((_, _, _, _), _, _, _)` --> $DIR/long-E0609.rs:9:7 | LL | x.field; diff --git a/tests/ui/diagnostic-width/long-E0614.rs b/tests/ui/diagnostic-width/long-E0614.rs index 5e8b3324dd17d..81e1a5cb4a4c3 100644 --- a/tests/ui/diagnostic-width/long-E0614.rs +++ b/tests/ui/diagnostic-width/long-E0614.rs @@ -6,7 +6,7 @@ type C = (B, B, B, B); type D = (C, C, C, C); fn foo(x: D) { - *x; //~ ERROR type `(... + *x; //~ ERROR type `((_ } fn main() {} diff --git a/tests/ui/diagnostic-width/long-E0614.stderr b/tests/ui/diagnostic-width/long-E0614.stderr index 18da20da9453e..16c2f0f567a32 100644 --- a/tests/ui/diagnostic-width/long-E0614.stderr +++ b/tests/ui/diagnostic-width/long-E0614.stderr @@ -1,4 +1,4 @@ -error[E0614]: type `(..., ..., ..., ...)` cannot be dereferenced +error[E0614]: type `((_, _, _, _), _, _, _)` cannot be dereferenced --> $DIR/long-E0614.rs:9:5 | LL | *x; diff --git a/tests/ui/diagnostic-width/long-E0618.rs b/tests/ui/diagnostic-width/long-E0618.rs index 247061d17f836..c6ee331ba2387 100644 --- a/tests/ui/diagnostic-width/long-E0618.rs +++ b/tests/ui/diagnostic-width/long-E0618.rs @@ -6,8 +6,8 @@ type B = (A, A, A, A); type C = (B, B, B, B); type D = (C, C, C, C); -fn foo(x: D) { //~ NOTE `x` has type `(... - x(); //~ ERROR expected function, found `(... +fn foo(x: D) { //~ NOTE `x` has type `((_ + x(); //~ ERROR expected function, found `((_ } fn main() {} diff --git a/tests/ui/diagnostic-width/long-E0618.stderr b/tests/ui/diagnostic-width/long-E0618.stderr index 7d92b94faf8fe..2a2d13db35332 100644 --- a/tests/ui/diagnostic-width/long-E0618.stderr +++ b/tests/ui/diagnostic-width/long-E0618.stderr @@ -1,8 +1,8 @@ -error[E0618]: expected function, found `(..., ..., ..., ...)` +error[E0618]: expected function, found `((_, _, _, _), _, _, _)` --> $DIR/long-E0618.rs:10:5 | LL | fn foo(x: D) { - | - `x` has type `(..., ..., ..., ...)` + | - `x` has type `((_, _, _, _), _, _, _)` LL | x(); | ^-- | | diff --git a/tests/ui/diagnostic-width/long-e0277.rs b/tests/ui/diagnostic-width/long-e0277.rs index 369fd8daea78c..7c6a3f56c313f 100644 --- a/tests/ui/diagnostic-width/long-e0277.rs +++ b/tests/ui/diagnostic-width/long-e0277.rs @@ -9,5 +9,5 @@ trait Trait {} fn require_trait() {} fn main() { - require_trait::(); //~ ERROR the trait bound `(... + require_trait::(); //~ ERROR the trait bound `((_ } diff --git a/tests/ui/diagnostic-width/long-e0277.stderr b/tests/ui/diagnostic-width/long-e0277.stderr index ff8971511653c..130ff1228aa7d 100644 --- a/tests/ui/diagnostic-width/long-e0277.stderr +++ b/tests/ui/diagnostic-width/long-e0277.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `(..., ..., ..., ...): Trait` is not satisfied +error[E0277]: the trait bound `((_, _, _, _), _, _, _): Trait` is not satisfied --> $DIR/long-e0277.rs:12:21 | LL | require_trait::(); | ^ unsatisfied trait bound | - = help: the trait `Trait` is not implemented for `(..., ..., ..., ...)` + = help: the trait `Trait` is not implemented for `((_, _, _, _), _, _, _)` help: this trait has no implementations, consider adding one --> $DIR/long-e0277.rs:7:1 | diff --git a/tests/ui/diagnostic-width/non-copy-type-moved.stderr b/tests/ui/diagnostic-width/non-copy-type-moved.stderr index 16c01c858b7d0..a9b7685299e8e 100644 --- a/tests/ui/diagnostic-width/non-copy-type-moved.stderr +++ b/tests/ui/diagnostic-width/non-copy-type-moved.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/non-copy-type-moved.rs:14:14 | LL | fn foo(x: D) { - | - move occurs because `x` has type `(..., ..., ..., ...)`, which does not implement the `Copy` trait + | - move occurs because `x` has type `((_, _, _, _), _, _, _)`, which does not implement the `Copy` trait LL | let _a = x; | - value moved here LL | let _b = x; diff --git a/tests/ui/diagnostic-width/secondary-label-with-long-type.rs b/tests/ui/diagnostic-width/secondary-label-with-long-type.rs index 13fe967ba5f8c..c72ab77dfffd4 100644 --- a/tests/ui/diagnostic-width/secondary-label-with-long-type.rs +++ b/tests/ui/diagnostic-width/secondary-label-with-long-type.rs @@ -7,8 +7,8 @@ type D = (C, C, C, C); fn foo(x: D) { let () = x; //~ ERROR mismatched types - //~^ NOTE this expression has type `((..., - //~| NOTE expected `((..., + //~^ NOTE this expression has type `(((_, + //~| NOTE expected `(((_, //~| NOTE expected tuple //~| NOTE the full name for the type has been written to //~| NOTE consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/diagnostic-width/secondary-label-with-long-type.stderr b/tests/ui/diagnostic-width/secondary-label-with-long-type.stderr index a99657ca113ff..58974cec57564 100644 --- a/tests/ui/diagnostic-width/secondary-label-with-long-type.stderr +++ b/tests/ui/diagnostic-width/secondary-label-with-long-type.stderr @@ -2,11 +2,11 @@ error[E0308]: mismatched types --> $DIR/secondary-label-with-long-type.rs:9:9 | LL | let () = x; - | ^^ - this expression has type `((..., ..., ..., ...), ..., ..., ...)` + | ^^ - this expression has type `(((_, _, _, _), _, _, _), _, _, _)` | | - | expected `((..., ..., ..., ...), ..., ..., ...)`, found `()` + | expected `(((_, _, _, _), _, _, _), _, _, _)`, found `()` | - = note: expected tuple `((..., ..., ..., ...), ..., ..., ...)` + = note: expected tuple `(((_, _, _, _), _, _, _), _, _, _)` found unit type `()` = note: the full name for the type has been written to '$TEST_BUILD_DIR/secondary-label-with-long-type.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr index 330a40d925bb1..e8e3bfd1dd816 100644 --- a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr +++ b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr @@ -4,7 +4,7 @@ error[E0320]: overflow while adding drop-check rules for `FingerTree` LL | let ft = | ^^ | - = note: overflowed on `FingerTree>>>>>>>>>` + = note: overflowed on `FingerTree>>>>>>>>>` = note: the full name for the type has been written to '$TEST_BUILD_DIR/dropck_no_diverge_on_nonregular_1.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/error-codes/E0275.stderr b/tests/ui/error-codes/E0275.stderr index 755404c1e1698..36175f636d6fb 100644 --- a/tests/ui/error-codes/E0275.stderr +++ b/tests/ui/error-codes/E0275.stderr @@ -1,11 +1,11 @@ -error[E0275]: overflow evaluating the requirement `Bar>>>>>>: Foo` +error[E0275]: overflow evaluating the requirement `Bar>>>>>>: Foo` --> $DIR/E0275.rs:6:33 | LL | impl Foo for T where Bar: Foo {} | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`) -note: required for `Bar>>>>>>>>>>>>` to implement `Foo` +note: required for `Bar>>>>>>>>>>>>` to implement `Foo` --> $DIR/E0275.rs:6:9 | LL | impl Foo for T where Bar: Foo {} diff --git a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr index 00a5948bdd472..716278f4036e3 100644 --- a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr @@ -11,7 +11,7 @@ LL | | ), LL | | ) { | |_- expected `&dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn Fn(u32) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a))` because of return type LL | f - | ^ expected `&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&...))))`, found `&dyn Fn(u32)` + | ^ expected `&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&_))))`, found `&dyn Fn(u32)` | = note: expected reference `&dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn Fn(u32) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a))` found reference `&dyn Fn(u32)` diff --git a/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr b/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr index 5c4a1a7582931..d697829c55c95 100644 --- a/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr +++ b/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr @@ -1,4 +1,4 @@ -error[E0282]: type annotations needed for `Result<_, (((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)>` +error[E0282]: type annotations needed for `Result<_, ((((i32, i32, i32, i32), _, _, _), _, _, _), _, _, _)>` --> $DIR/really-long-type-in-let-binding-without-sufficient-type-info.rs:8:9 | LL | let y = Err(x); diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs index b8ea353df9385..1abfd88b6bf41 100644 --- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs +++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs @@ -10,7 +10,7 @@ //~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper, 0>` //~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper, 0>` //~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper, 0>` -//~| ERROR reached the recursion limit while instantiating ` as MyTrait>::virtualize` +//~| ERROR reached the recursion limit while instantiating ` as MyTrait>::virtualize` //@ build-fail //@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr index deccc88e64fa5..0167841cce689 100644 --- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr +++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr @@ -17,7 +17,7 @@ error: reached the recursion limit finding the struct tail for `[u8; 256]` = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -note: the above error was encountered while instantiating `fn virtualize_my_trait::>` +note: the above error was encountered while instantiating `fn virtualize_my_trait::>` --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:38:18 | LL | unsafe { virtualize_my_trait(L, self) } @@ -45,7 +45,7 @@ error: reached the recursion limit finding the struct tail for `SomeData<256>` = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -note: the above error was encountered while instantiating `fn virtualize_my_trait::>` +note: the above error was encountered while instantiating `fn virtualize_my_trait::>` --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:38:18 | LL | unsafe { virtualize_my_trait(L, self) } @@ -73,7 +73,7 @@ error: reached the recursion limit finding the struct tail for `VirtualWrapper>` +note: the above error was encountered while instantiating `fn virtualize_my_trait::>` --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:38:18 | LL | unsafe { virtualize_my_trait(L, self) } @@ -82,7 +82,7 @@ LL | unsafe { virtualize_my_trait(L, self) } = note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-instantiation-struct-tail-ice-114484.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console -error: reached the recursion limit while instantiating ` as MyTrait>::virtualize` +error: reached the recursion limit while instantiating ` as MyTrait>::virtualize` | note: ` as MyTrait>::virtualize` defined here --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:37:5 diff --git a/tests/ui/infinite/infinite-instantiation.stderr b/tests/ui/infinite/infinite-instantiation.stderr index 3218584441290..c41d0b245b9e7 100644 --- a/tests/ui/infinite/infinite-instantiation.stderr +++ b/tests/ui/infinite/infinite-instantiation.stderr @@ -1,4 +1,4 @@ -error: reached the recursion limit while instantiating `function::>>>>` +error: reached the recursion limit while instantiating `function::>>>>` --> $DIR/infinite-instantiation.rs:22:9 | LL | function(counter - 1, t.to_option()); diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr index 835f1c6442a78..ddb4d1645af5e 100644 --- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr +++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr @@ -1,4 +1,4 @@ -error: reached the recursion limit while instantiating `<(&(&(&..., ...), ...), ...) as Foo>::recurse` +error: reached the recursion limit while instantiating `<(&(&(&(&(&_, _), _), _), _), _) as Foo>::recurse` --> $DIR/issue-37311.rs:17:9 | LL | (self, self).recurse(); diff --git a/tests/ui/lazy-type-alias/inherent-impls-overflow.current.stderr b/tests/ui/lazy-type-alias/inherent-impls-overflow.current.stderr index dee809ebf7e81..a4d208a8fc24c 100644 --- a/tests/ui/lazy-type-alias/inherent-impls-overflow.current.stderr +++ b/tests/ui/lazy-type-alias/inherent-impls-overflow.current.stderr @@ -14,7 +14,7 @@ LL | impl Loop {} | = note: in case this is a recursive type alias, consider using a struct, enum, or union instead -error[E0275]: overflow normalizing the type alias `Poly0<(((((((...,),),),),),),)>` +error[E0275]: overflow normalizing the type alias `Poly0<(((((((_,),),),),),),)>` --> $DIR/inherent-impls-overflow.rs:17:1 | LL | type Poly0 = Poly1<(T,)>; @@ -22,7 +22,7 @@ LL | type Poly0 = Poly1<(T,)>; | = note: in case this is a recursive type alias, consider using a struct, enum, or union instead -error[E0275]: overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>` +error[E0275]: overflow normalizing the type alias `Poly1<(((((((_,),),),),),),)>` --> $DIR/inherent-impls-overflow.rs:20:1 | LL | type Poly1 = Poly0<(T,)>; @@ -30,7 +30,7 @@ LL | type Poly1 = Poly0<(T,)>; | = note: in case this is a recursive type alias, consider using a struct, enum, or union instead -error[E0275]: overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>` +error[E0275]: overflow normalizing the type alias `Poly1<(((((((_,),),),),),),)>` --> $DIR/inherent-impls-overflow.rs:24:1 | LL | impl Poly0<()> {} diff --git a/tests/ui/lazy-type-alias/inherent-impls-overflow.rs b/tests/ui/lazy-type-alias/inherent-impls-overflow.rs index 66a81321624b0..6ee4f6b943a22 100644 --- a/tests/ui/lazy-type-alias/inherent-impls-overflow.rs +++ b/tests/ui/lazy-type-alias/inherent-impls-overflow.rs @@ -15,14 +15,14 @@ impl Loop {} //[next]~| ERROR overflow evaluating the requirement `Loop == _` type Poly0 = Poly1<(T,)>; -//[current]~^ ERROR overflow normalizing the type alias `Poly0<(((((((...,),),),),),),)>` +//[current]~^ ERROR overflow normalizing the type alias `Poly0<(((((((_,),),),),),),)>` //[next]~^^ ERROR overflow evaluating the requirement type Poly1 = Poly0<(T,)>; -//[current]~^ ERROR overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>` +//[current]~^ ERROR overflow normalizing the type alias `Poly1<(((((((_,),),),),),),)>` //[next]~^^ ERROR overflow evaluating the requirement impl Poly0<()> {} -//[current]~^ ERROR overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>` +//[current]~^ ERROR overflow normalizing the type alias `Poly1<(((((((_,),),),),),),)>` //[next]~^^ ERROR overflow evaluating the requirement `Poly0<()> == _` //[next]~| ERROR overflow evaluating the requirement diff --git a/tests/ui/limits/type-length-limit-enforcement.stderr b/tests/ui/limits/type-length-limit-enforcement.stderr index 82855bd755285..0313f212d3f7e 100644 --- a/tests/ui/limits/type-length-limit-enforcement.stderr +++ b/tests/ui/limits/type-length-limit-enforcement.stderr @@ -1,4 +1,4 @@ -error: reached the type-length limit while instantiating `drop::>` +error: reached the type-length limit while instantiating `drop::>` --> $DIR/type-length-limit-enforcement.rs:34:5 | LL | drop::>(None); diff --git a/tests/ui/methods/inherent-bound-in-probe.stderr b/tests/ui/methods/inherent-bound-in-probe.stderr index 6502752bcb455..8564fcaf8eac2 100644 --- a/tests/ui/methods/inherent-bound-in-probe.stderr +++ b/tests/ui/methods/inherent-bound-in-probe.stderr @@ -28,7 +28,7 @@ LL | where LL | &'a T: IntoIterator, | ------------- unsatisfied trait bound introduced here = note: 126 redundant requirements hidden - = note: required for `&BitReaderWrapper>>` to implement `IntoIterator` + = note: required for `&BitReaderWrapper>>` to implement `IntoIterator` note: required by a bound in `Helper` --> $DIR/inherent-bound-in-probe.rs:17:12 | diff --git a/tests/ui/methods/probe-error-on-infinite-deref.stderr b/tests/ui/methods/probe-error-on-infinite-deref.stderr index 6148b00116302..4d2f31499173b 100644 --- a/tests/ui/methods/probe-error-on-infinite-deref.stderr +++ b/tests/ui/methods/probe-error-on-infinite-deref.stderr @@ -1,4 +1,4 @@ -error[E0055]: reached the recursion limit while auto-dereferencing `Wrap>>>>>>>>>>` +error[E0055]: reached the recursion limit while auto-dereferencing `Wrap>>>>>>>>>>` --> $DIR/probe-error-on-infinite-deref.rs:14:13 | LL | Wrap(1).lmao(); diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr index 225d7503a02a4..899cb3cda8591 100644 --- a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr +++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr @@ -55,7 +55,7 @@ LL | let a = async { 42 }; | ----- the found `async` block ... LL | let s = Demo { a }; - | ^ expected `Pin>`, found `async` block + | ^ expected `Pin>`, found `async` block | = note: expected struct `Pin + Send + 'static)>>` found `async` block `{async block@$DIR/mismatch-sugg-for-shorthand-field.rs:53:13: 53:18}` diff --git a/tests/ui/parallel-rustc/dyn-trait-ice-153366.stderr b/tests/ui/parallel-rustc/dyn-trait-ice-153366.stderr index ba21ace81c7eb..a9ca104c00d36 100644 --- a/tests/ui/parallel-rustc/dyn-trait-ice-153366.stderr +++ b/tests/ui/parallel-rustc/dyn-trait-ice-153366.stderr @@ -52,7 +52,7 @@ LL | fn iso(a: Fn) -> Option<_> | --------- expected `Option<_>` because of return type ... LL | Box::new(iso_un_option) - | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<_>`, found `Box ... {iso_un_option::<_>}>` + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<_>`, found `Box _ {iso_un_option::<_>}>` | = note: expected enum `Option<_>` found struct `Box {type error} {iso_un_option::<_>}>` diff --git a/tests/ui/recursion/infinite-function-recursion-error-8727.stderr b/tests/ui/recursion/infinite-function-recursion-error-8727.stderr index 13d57ecb3b2f0..28eb26595ead5 100644 --- a/tests/ui/recursion/infinite-function-recursion-error-8727.stderr +++ b/tests/ui/recursion/infinite-function-recursion-error-8727.stderr @@ -9,7 +9,7 @@ LL | generic::>(); = help: a `loop` may express intention better if this is on purpose = note: `#[warn(unconditional_recursion)]` on by default -error: reached the recursion limit while instantiating `generic::>>>>` +error: reached the recursion limit while instantiating `generic::>>>>` --> $DIR/infinite-function-recursion-error-8727.rs:9:5 | LL | generic::>(); diff --git a/tests/ui/recursion/issue-23122-2.stderr b/tests/ui/recursion/issue-23122-2.stderr index 39cd0eb35a630..2fda276d03729 100644 --- a/tests/ui/recursion/issue-23122-2.stderr +++ b/tests/ui/recursion/issue-23122-2.stderr @@ -1,11 +1,11 @@ -error[E0275]: overflow evaluating the requirement `<<<<<<<... as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` +error[E0275]: overflow evaluating the requirement `<<<<<<<_ as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` --> $DIR/issue-23122-2.rs:11:17 | LL | type Next = as Next>::Next; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`) -note: required for `GetNext<<<<... as Next>::Next as Next>::Next as Next>::Next>` to implement `Next` +note: required for `GetNext<<<<_ as Next>::Next as Next>::Next as Next>::Next>` to implement `Next` --> $DIR/issue-23122-2.rs:10:15 | LL | impl Next for GetNext { diff --git a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr index cf3bc4578a727..8eb49c49ad58e 100644 --- a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr +++ b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr @@ -4,7 +4,7 @@ error[E0320]: overflow while adding drop-check rules for `S` LL | fn f(x: S) {} | ^ | - = note: overflowed on `S` + = note: overflowed on `S` = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-38591-non-regular-dropck-recursion.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/recursion/issue-83150.stderr b/tests/ui/recursion/issue-83150.stderr index a245b001badef..9ec187f055018 100644 --- a/tests/ui/recursion/issue-83150.stderr +++ b/tests/ui/recursion/issue-83150.stderr @@ -15,7 +15,7 @@ error[E0275]: overflow evaluating the requirement `Map<&mut std::ops::Range, = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_83150`) = note: required for `&mut Map<&mut Range, {closure@issue-83150.rs:12:24}>` to implement `Iterator` = note: 65 redundant requirements hidden - = note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut ..., ...>, ...>, ...>, ...>` to implement `Iterator` + = note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<_, _>, _>, _>, _>, _>` to implement `Iterator` = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-83150.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/recursion/recursion.stderr b/tests/ui/recursion/recursion.stderr index 974f18ed103d1..987a69767c14b 100644 --- a/tests/ui/recursion/recursion.stderr +++ b/tests/ui/recursion/recursion.stderr @@ -1,4 +1,4 @@ -error: reached the recursion limit while instantiating `test::>>>>>>` +error: reached the recursion limit while instantiating `test::>>>>>>` --> $DIR/recursion.rs:17:11 | LL | _ => {test (n-1, i+1, Cons {head:2*i+1, tail:first}, Cons{head:i*i, tail:second})} diff --git a/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr b/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr index 8d6d44dcbe2fb..6a01b5d8f5b79 100644 --- a/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr +++ b/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr @@ -1,4 +1,4 @@ -error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut &mut &mut &mut ...>` +error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut &mut &mut &mut _>` --> $DIR/recursive-impl-trait-iterator-by-ref-67552.rs:28:9 | LL | rec(identity(&mut it)) diff --git a/tests/ui/suggestions/box-future-wrong-output.stderr b/tests/ui/suggestions/box-future-wrong-output.stderr index bac26ae8fb5dd..39e0f3c45009b 100644 --- a/tests/ui/suggestions/box-future-wrong-output.stderr +++ b/tests/ui/suggestions/box-future-wrong-output.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/box-future-wrong-output.rs:20:39 | LL | let _: BoxFuture<'static, bool> = async {}.boxed(); - | ------------------------ ^^^^^^^^^^^^^^^^ expected `Pin>`, found `Pin + Send>>` + | ------------------------ ^^^^^^^^^^^^^^^^ expected `Pin>`, found `Pin + Send>>` | | | expected due to this | diff --git a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr index 61a1d30d31d4a..a38aa47932b56 100644 --- a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr +++ b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr @@ -5,7 +5,7 @@ LL | fn foo + Send + 'static>(x: F) -> BoxFuture<'static, | - found this type parameter ----------------------- expected `Pin + Send + 'static)>>` because of return type LL | // We could instead use an `async` block, but this way we have no std spans. LL | x - | ^ expected `Pin>`, found type parameter `F` + | ^ expected `Pin>`, found type parameter `F` | = note: expected struct `Pin + Send + 'static)>>` found type parameter `F` @@ -20,7 +20,7 @@ error[E0308]: mismatched types LL | fn bar + Send + 'static>(x: F) -> BoxFuture<'static, i32> { | ----------------------- expected `Pin + Send + 'static)>>` because of return type LL | Box::new(x) - | ^^^^^^^^^^^ expected `Pin>`, found `Box` + | ^^^^^^^^^^^ expected `Pin>`, found `Box` | = note: expected struct `Pin + Send + 'static)>>` found struct `Box` @@ -76,7 +76,7 @@ LL | fn zap() -> BoxFuture<'static, i32> { LL | / async { LL | | 42 LL | | } - | |_____^ expected `Pin>`, found `async` block + | |_____^ expected `Pin>`, found `async` block | = note: expected struct `Pin + Send + 'static)>>` found `async` block `{async block@$DIR/expected-boxed-future-isnt-pinned.rs:28:5: 28:10}` diff --git a/tests/ui/suggestions/issue-107860.stderr b/tests/ui/suggestions/issue-107860.stderr index 2bfd219398141..ab35d639c92d3 100644 --- a/tests/ui/suggestions/issue-107860.stderr +++ b/tests/ui/suggestions/issue-107860.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-107860.rs:3:36 | LL | async fn str(T: &str) -> &str { &str } - | ^^^^ expected `&str`, found `&fn(&str) -> ... {str::<_>}` + | ^^^^ expected `&str`, found `&fn(&str) -> _ {str::<_>}` | = note: expected reference `&str` found reference `&for<'a> fn(&'a str) -> impl Future {str::<_>}` diff --git a/tests/ui/trait-bounds/associated-error-bound-issue-145586.stderr b/tests/ui/trait-bounds/associated-error-bound-issue-145586.stderr index 18cfece99ffa6..4c3b1ec6c928d 100644 --- a/tests/ui/trait-bounds/associated-error-bound-issue-145586.stderr +++ b/tests/ui/trait-bounds/associated-error-bound-issue-145586.stderr @@ -8,7 +8,7 @@ LL | fn deserialize_ignored_any(self, visitor: V) -> Result>::Value, E>` because of return type ... LL | Ok(deserializer) => deserializer.deserialize_ignored_any(visitor), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<>::Value, E>`, found `Result<>::Value, ...>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<>::Value, E>`, found `Result<>::Value, _>` | = note: expected enum `Result<_, E>` found enum `Result<_, >::Error>` diff --git a/tests/ui/traits/issue-68295.stderr b/tests/ui/traits/issue-68295.stderr index 8bc315302417b..aeda5e2bea4b0 100644 --- a/tests/ui/traits/issue-68295.stderr +++ b/tests/ui/traits/issue-68295.stderr @@ -5,7 +5,7 @@ LL | fn crash(input: Matrix) -> Matrix | ----------------- expected `Matrix` because of return type ... LL | input.into_owned() - | ^^^^^^^^^^^^^^^^^^ expected `Matrix`, found `Matrix` + | ^^^^^^^^^^^^^^^^^^ expected `Matrix`, found `Matrix` | = note: expected struct `Matrix<_, _, u32>` found struct `Matrix<_, _, <() as Allocator>::Buffer>` diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr index a179107885ab2..3eff2944b472f 100644 --- a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr +++ b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr @@ -24,7 +24,7 @@ LL | impl> Iterator for IteratorOfWrapped { | | | unsatisfied trait bound introduced here = note: 256 redundant requirements hidden - = note: required for `IteratorOfWrapped<(), Map>, ...>>` to implement `Iterator` + = note: required for `IteratorOfWrapped<(), Map>, _>>` to implement `Iterator` = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-91949-hangs-on-recursion.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/traits/next-solver/overflow/global-cache.stderr b/tests/ui/traits/next-solver/overflow/global-cache.stderr index 67616619384c6..de743dc00b891 100644 --- a/tests/ui/traits/next-solver/overflow/global-cache.stderr +++ b/tests/ui/traits/next-solver/overflow/global-cache.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `Inc>>>>>>: Trait` +error[E0275]: overflow evaluating the requirement `Inc>>>>>>: Trait` --> $DIR/global-cache.rs:21:19 | LL | impls_trait::>>>>(); diff --git a/tests/ui/traits/on_unimplemented_long_types.stderr b/tests/ui/traits/on_unimplemented_long_types.stderr index f32d99a42b12b..0bd8591257b26 100644 --- a/tests/ui/traits/on_unimplemented_long_types.stderr +++ b/tests/ui/traits/on_unimplemented_long_types.stderr @@ -1,4 +1,4 @@ -error[E0277]: `Option>>` doesn't implement `std::fmt::Display` +error[E0277]: `Option>>` doesn't implement `std::fmt::Display` --> $DIR/on_unimplemented_long_types.rs:3:17 | LL | pub fn foo() -> impl std::fmt::Display { @@ -11,9 +11,9 @@ LL | | Some(Some(Some(Some(Some(Some(Some... ... | LL | | ))))))))))), LL | | ))))))))))) - | |_______________- return type was inferred to be `Option>>` here + | |_______________- return type was inferred to be `Option>>` here | - = help: the trait `std::fmt::Display` is not implemented for `Option>>` + = help: the trait `std::fmt::Display` is not implemented for `Option>>` = note: the full name for the type has been written to '$TEST_BUILD_DIR/on_unimplemented_long_types.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr index 72aff1b9ee8b7..b5a7e36518364 100644 --- a/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr +++ b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr @@ -7,7 +7,7 @@ LL | struct NoData; = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead -error[E0275]: overflow evaluating the requirement `NoData>>>>>>: Foo` +error[E0275]: overflow evaluating the requirement `NoData>>>>>>: Foo` --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:9:36 | LL | impl Foo for T where NoData: Foo { @@ -22,7 +22,7 @@ LL | impl Foo for T where NoData: Foo { = note: 126 redundant requirements hidden = note: required for `NoData` to implement `Foo` -error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>: Bar` +error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>: Bar` --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:42 | LL | impl Bar for T where EvenLessData: Baz { @@ -42,7 +42,7 @@ LL | impl Bar for T where EvenLessData: Baz { = note: 125 redundant requirements hidden = note: required for `EvenLessData` to implement `Baz` -error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>: Baz` +error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>: Baz` --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:42 | LL | impl Baz for T where AlmostNoData: Bar { diff --git a/tests/ui/trimmed-paths/doc-hidden.rs b/tests/ui/trimmed-paths/doc-hidden.rs index c3125385c7e41..9aca8f0cd8f9e 100644 --- a/tests/ui/trimmed-paths/doc-hidden.rs +++ b/tests/ui/trimmed-paths/doc-hidden.rs @@ -44,7 +44,7 @@ fn uses_local() { DocHiddenInHiddenMod, ) = 3u32; //~^ ERROR mismatched types [E0308] - //~| NOTE expected `(ActuallyPub, ..., ..., ..., ..., ...)`, found `u32` + //~| NOTE expected `(ActuallyPub, DocHidden, _, _, _, _)`, found `u32` //~| NOTE expected tuple `(local::ActuallyPub, DocHidden, local::pub_mod::ActuallyPubInPubMod, DocHiddenInPubMod, ActuallyPubInHiddenMod, DocHiddenInHiddenMod)` } @@ -63,6 +63,6 @@ fn uses_helper() { DocHiddenInHiddenMod, ) = 3u32; //~^ ERROR mismatched types [E0308] - //~| NOTE expected `(ActuallyPub, ..., ..., ..., ..., ...)`, found `u32` + //~| NOTE expected `(ActuallyPub, DocHidden, _, _, _, _)`, found `u32` //~| NOTE expected tuple `(doc_hidden_helper::ActuallyPub, doc_hidden_helper::DocHidden, doc_hidden_helper::pub_mod::ActuallyPubInPubMod, doc_hidden_helper::pub_mod::DocHiddenInPubMod, doc_hidden_helper::hidden_mod::ActuallyPubInHiddenMod, doc_hidden_helper::hidden_mod::DocHiddenInHiddenMod)` } diff --git a/tests/ui/trimmed-paths/doc-hidden.stderr b/tests/ui/trimmed-paths/doc-hidden.stderr index 167c92c50a357..3cf8d99422704 100644 --- a/tests/ui/trimmed-paths/doc-hidden.stderr +++ b/tests/ui/trimmed-paths/doc-hidden.stderr @@ -9,7 +9,7 @@ LL | | DocHidden, ... | LL | | DocHiddenInHiddenMod, LL | | ) = 3u32; - | | - ^^^^ expected `(ActuallyPub, ..., ..., ..., ..., ...)`, found `u32` + | | - ^^^^ expected `(ActuallyPub, DocHidden, _, _, _, _)`, found `u32` | |_____| | expected due to this | @@ -27,7 +27,7 @@ LL | | DocHidden, ... | LL | | DocHiddenInHiddenMod, LL | | ) = 3u32; - | | - ^^^^ expected `(ActuallyPub, ..., ..., ..., ..., ...)`, found `u32` + | | - ^^^^ expected `(ActuallyPub, DocHidden, _, _, _, _)`, found `u32` | |_____| | expected due to this | diff --git a/tests/ui/typeck/issue-107775.stderr b/tests/ui/typeck/issue-107775.stderr index 1be2689746941..b2878a779de93 100644 --- a/tests/ui/typeck/issue-107775.stderr +++ b/tests/ui/typeck/issue-107775.stderr @@ -6,7 +6,7 @@ LL | map.insert(1, Struct::do_something); | | | ... which causes `map` to have type `HashMap<{integer}, fn(u8) -> Pin + Send>> {::do_something::<'_>}>` LL | Self { map } - | ^^^ expected `HashMap Pin>>`, found `HashMap<{integer}, ...>` + | ^^^ expected `HashMap Pin>>`, found `HashMap<{integer}, _>` | = note: expected struct `HashMap Pin + Send + 'static)>>>` found struct `HashMap<{integer}, fn(_) -> Pin + Send>> {::do_something::<'_>}>` From 8e12609f40af76b8620d21079f2dca1eed60f9cc Mon Sep 17 00:00:00 2001 From: Joel-Wwalker Date: Mon, 13 Jul 2026 22:50:54 -0400 Subject: [PATCH 4/8] Add regression test for issue 144033 --- .../relate-bound-region-ice-144033.rs | 33 +++++++ .../relate-bound-region-ice-144033.stderr | 98 +++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 tests/ui/higher-ranked/relate-bound-region-ice-144033.rs create mode 100644 tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr diff --git a/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs b/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs new file mode 100644 index 0000000000000..7e0a684bb2ade --- /dev/null +++ b/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs @@ -0,0 +1,33 @@ +// Regression test for . +// A delegating impl whose method drops the trait's HRTB where-clause used to +// ICE with "cannot relate bound region" instead of emitting normal errors. + +trait FooMut { + type Baz: 'static; + fn bar<'a, I>(self, iterator: &'a I) + where + for<'b> &'b I: IntoIterator; +} +struct DelegatingFooMut {} +//~^ ERROR type parameter `T` is never used + +impl FooMut for DelegatingFooMut +where + T: FooMut, +{ + type Baz = DelegatingBaz; + fn bar<'a, I>(self, collection: &'a I) + //~^ ERROR lifetime parameters do not match the trait definition + where + for<'b> &'b I: IntoIterator, + { + let collection = collection.into_iter().map(|b| &b); + self.bar(collection) + //~^ ERROR type mismatch resolving + //~| ERROR mismatched types + } +} +struct DelegatingBaz; +//~^ ERROR type parameter `T` is never used + +fn main() {} diff --git a/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr b/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr new file mode 100644 index 0000000000000..4518587661292 --- /dev/null +++ b/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr @@ -0,0 +1,98 @@ +error[E0392]: type parameter `T` is never used + --> $DIR/relate-bound-region-ice-144033.rs:11:25 + | +LL | struct DelegatingFooMut {} + | ^ unused type parameter + | + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` + = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead + +error[E0195]: lifetime parameters do not match the trait definition + --> $DIR/relate-bound-region-ice-144033.rs:19:12 + | +LL | fn bar<'a, I>(self, collection: &'a I) + | ^^ + | + = note: lifetime parameters differ in whether they are early- or late-bound +note: `'a` differs between the trait and impl + --> $DIR/relate-bound-region-ice-144033.rs:7:12 + | +LL | trait FooMut { + | ------------ in this trait... +LL | type Baz: 'static; +LL | fn bar<'a, I>(self, iterator: &'a I) + | ^^ `'a` is early-bound +LL | where +LL | for<'b> &'b I: IntoIterator; + | ------------------------ this lifetime bound makes `'a` early-bound +... +LL | / impl FooMut for DelegatingFooMut +LL | | where +LL | | T: FooMut, + | |______________- in this impl... +... +LL | fn bar<'a, I>(self, collection: &'a I) + | ^^ `'a` is late-bound + +error[E0392]: type parameter `T` is never used + --> $DIR/relate-bound-region-ice-144033.rs:30:22 + | +LL | struct DelegatingBaz; + | ^ unused type parameter + | + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` + = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead + +error[E0271]: type mismatch resolving `<&I as IntoIterator>::Item == &&DelegatingBaz<::Baz>` + --> $DIR/relate-bound-region-ice-144033.rs:25:18 + | +LL | self.bar(collection) + | --- ^^^^^^^^^^ expected `&&DelegatingBaz<::Baz>`, found associated type + | | + | required by a bound introduced by this call + | + = note: expected reference `&&DelegatingBaz<::Baz>` + found associated type `<&I as IntoIterator>::Item` + = help: consider constraining the associated type `<&I as IntoIterator>::Item` to `&&DelegatingBaz<::Baz>` + = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html +note: the method call chain might not have had the expected associated types + --> $DIR/relate-bound-region-ice-144033.rs:19:37 + | +LL | fn bar<'a, I>(self, collection: &'a I) + | ^^^^^ `IntoIterator::Item` is `<&I as IntoIterator>::Item` here +... +LL | let collection = collection.into_iter().map(|b| &b); + | ----------- ----------- `IntoIterator::Item` changed to `&<&I as IntoIterator>::Item` here + | | + | `IntoIterator::Item` remains `<&I as IntoIterator>::Item` here +note: required by a bound in `FooMut::bar` + --> $DIR/relate-bound-region-ice-144033.rs:9:37 + | +LL | fn bar<'a, I>(self, iterator: &'a I) + | --- required by a bound in this associated function +LL | where +LL | for<'b> &'b I: IntoIterator; + | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `FooMut::bar` + +error[E0308]: mismatched types + --> $DIR/relate-bound-region-ice-144033.rs:25:18 + | +LL | let collection = collection.into_iter().map(|b| &b); + | --- the found closure +LL | self.bar(collection) + | --- ^^^^^^^^^^ expected `&I`, found `Map<<&I as IntoIterator>::IntoIter, ...>` + | | + | arguments to this method are incorrect + | + = note: expected reference `&I` + found struct `Map<<&I as IntoIterator>::IntoIter, {closure@$DIR/relate-bound-region-ice-144033.rs:24:53: 24:56}>` +note: method defined here + --> $DIR/relate-bound-region-ice-144033.rs:7:8 + | +LL | fn bar<'a, I>(self, iterator: &'a I) + | ^^^ -------- + +error: aborting due to 5 previous errors + +Some errors have detailed explanations: E0195, E0271, E0308, E0392. +For more information about an error, try `rustc --explain E0195`. From bf5220139f5af0dc7a9f9c8ec8d26a07ec7771d0 Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Tue, 14 Jul 2026 05:11:50 +0000 Subject: [PATCH 5/8] Skip intrinsic-test when rustfmt is unavailable --- src/bootstrap/src/core/build_steps/test.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 6b232cc039492..9ebe3191db40f 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1085,10 +1085,12 @@ impl Step for IntrinsicTest { cmd.env("CFLAGS", cflags); // intrinsic-test shells out to `cargo` and `rustfmt` make bootstrap's // managed binaries findable by prepending their dirs to PATH. - let rustfmt_path = builder.config.initial_rustfmt.clone().unwrap_or_else(|| { - eprintln!("intrinsic-test: rustfmt is required but not available on this channel"); - crate::exit!(1); - }); + let Some(rustfmt_path) = builder.config.initial_rustfmt.clone() else { + eprintln!( + "WARNING: intrinsic-test skipped because rustfmt is required but not available on this channel" + ); + return; + }; let mut path_dirs: Vec = Vec::new(); if let Some(cargo_dir) = builder.initial_cargo.parent() { From f3f42356b443fb03529073df77574eff4ac3198c Mon Sep 17 00:00:00 2001 From: Joel-Wwalker Date: Tue, 14 Jul 2026 01:19:24 -0400 Subject: [PATCH 6/8] Simplify regression test for issue 144033 --- .../relate-bound-region-ice-144033.rs | 28 ++--- .../relate-bound-region-ice-144033.stderr | 105 +++++------------- 2 files changed, 39 insertions(+), 94 deletions(-) diff --git a/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs b/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs index 7e0a684bb2ade..9c3c1a507a458 100644 --- a/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs +++ b/tests/ui/higher-ranked/relate-bound-region-ice-144033.rs @@ -1,33 +1,23 @@ // Regression test for . -// A delegating impl whose method drops the trait's HRTB where-clause used to -// ICE with "cannot relate bound region" instead of emitting normal errors. +// This used to ICE with "cannot relate bound region" instead of emitting +// normal errors. trait FooMut { - type Baz: 'static; - fn bar<'a, I>(self, iterator: &'a I) + fn bar(self, _: I) where - for<'b> &'b I: IntoIterator; + for<'b> &'b I: Iterator; } -struct DelegatingFooMut {} -//~^ ERROR type parameter `T` is never used -impl FooMut for DelegatingFooMut -where - T: FooMut, -{ - type Baz = DelegatingBaz; - fn bar<'a, I>(self, collection: &'a I) - //~^ ERROR lifetime parameters do not match the trait definition +impl FooMut for () { + fn bar(self, _: I) where - for<'b> &'b I: IntoIterator, + for<'b> &'b I: Iterator, { - let collection = collection.into_iter().map(|b| &b); + let collection = std::iter::empty::<()>().map(|_| &()); self.bar(collection) - //~^ ERROR type mismatch resolving + //~^ ERROR expected `&I` to be an iterator that yields `&()` //~| ERROR mismatched types } } -struct DelegatingBaz; -//~^ ERROR type parameter `T` is never used fn main() {} diff --git a/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr b/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr index 4518587661292..e9ec3e9dc0707 100644 --- a/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr +++ b/tests/ui/higher-ranked/relate-bound-region-ice-144033.stderr @@ -1,98 +1,53 @@ -error[E0392]: type parameter `T` is never used - --> $DIR/relate-bound-region-ice-144033.rs:11:25 - | -LL | struct DelegatingFooMut {} - | ^ unused type parameter - | - = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` - = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead - -error[E0195]: lifetime parameters do not match the trait definition - --> $DIR/relate-bound-region-ice-144033.rs:19:12 - | -LL | fn bar<'a, I>(self, collection: &'a I) - | ^^ - | - = note: lifetime parameters differ in whether they are early- or late-bound -note: `'a` differs between the trait and impl - --> $DIR/relate-bound-region-ice-144033.rs:7:12 - | -LL | trait FooMut { - | ------------ in this trait... -LL | type Baz: 'static; -LL | fn bar<'a, I>(self, iterator: &'a I) - | ^^ `'a` is early-bound -LL | where -LL | for<'b> &'b I: IntoIterator; - | ------------------------ this lifetime bound makes `'a` early-bound -... -LL | / impl FooMut for DelegatingFooMut -LL | | where -LL | | T: FooMut, - | |______________- in this impl... -... -LL | fn bar<'a, I>(self, collection: &'a I) - | ^^ `'a` is late-bound - -error[E0392]: type parameter `T` is never used - --> $DIR/relate-bound-region-ice-144033.rs:30:22 - | -LL | struct DelegatingBaz; - | ^ unused type parameter - | - = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` - = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead - -error[E0271]: type mismatch resolving `<&I as IntoIterator>::Item == &&DelegatingBaz<::Baz>` - --> $DIR/relate-bound-region-ice-144033.rs:25:18 +error[E0271]: expected `&I` to be an iterator that yields `&()`, but it yields `<&I as Iterator>::Item` + --> $DIR/relate-bound-region-ice-144033.rs:17:18 | LL | self.bar(collection) - | --- ^^^^^^^^^^ expected `&&DelegatingBaz<::Baz>`, found associated type + | --- ^^^^^^^^^^ expected `&()`, found associated type | | | required by a bound introduced by this call | - = note: expected reference `&&DelegatingBaz<::Baz>` - found associated type `<&I as IntoIterator>::Item` - = help: consider constraining the associated type `<&I as IntoIterator>::Item` to `&&DelegatingBaz<::Baz>` + = note: expected reference `&()` + found associated type `<&I as Iterator>::Item` + = help: consider constraining the associated type `<&I as Iterator>::Item` to `&()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html note: the method call chain might not have had the expected associated types - --> $DIR/relate-bound-region-ice-144033.rs:19:37 + --> $DIR/relate-bound-region-ice-144033.rs:16:51 | -LL | fn bar<'a, I>(self, collection: &'a I) - | ^^^^^ `IntoIterator::Item` is `<&I as IntoIterator>::Item` here -... -LL | let collection = collection.into_iter().map(|b| &b); - | ----------- ----------- `IntoIterator::Item` changed to `&<&I as IntoIterator>::Item` here - | | - | `IntoIterator::Item` remains `<&I as IntoIterator>::Item` here +LL | let collection = std::iter::empty::<()>().map(|_| &()); + | ------------------------ ^^^^^^^^^^^^ `Iterator::Item` is `&()` here + | | + | this expression has type `Empty<()>` note: required by a bound in `FooMut::bar` - --> $DIR/relate-bound-region-ice-144033.rs:9:37 + --> $DIR/relate-bound-region-ice-144033.rs:8:33 | -LL | fn bar<'a, I>(self, iterator: &'a I) +LL | fn bar(self, _: I) | --- required by a bound in this associated function LL | where -LL | for<'b> &'b I: IntoIterator; - | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `FooMut::bar` +LL | for<'b> &'b I: Iterator; + | ^^^^^^^^^^^^^ required by this bound in `FooMut::bar` error[E0308]: mismatched types - --> $DIR/relate-bound-region-ice-144033.rs:25:18 + --> $DIR/relate-bound-region-ice-144033.rs:17:18 | -LL | let collection = collection.into_iter().map(|b| &b); - | --- the found closure +LL | fn bar(self, _: I) + | - expected this type parameter +... +LL | let collection = std::iter::empty::<()>().map(|_| &()); + | --- the found closure LL | self.bar(collection) - | --- ^^^^^^^^^^ expected `&I`, found `Map<<&I as IntoIterator>::IntoIter, ...>` + | --- ^^^^^^^^^^ expected type parameter `I`, found `Map, {closure@...}>` | | | arguments to this method are incorrect | - = note: expected reference `&I` - found struct `Map<<&I as IntoIterator>::IntoIter, {closure@$DIR/relate-bound-region-ice-144033.rs:24:53: 24:56}>` + = note: expected type parameter `I` + found struct `Map, {closure@$DIR/relate-bound-region-ice-144033.rs:16:55: 16:58}>` note: method defined here - --> $DIR/relate-bound-region-ice-144033.rs:7:8 + --> $DIR/relate-bound-region-ice-144033.rs:6:8 | -LL | fn bar<'a, I>(self, iterator: &'a I) - | ^^^ -------- +LL | fn bar(self, _: I) + | ^^^ - -error: aborting due to 5 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0195, E0271, E0308, E0392. -For more information about an error, try `rustc --explain E0195`. +Some errors have detailed explanations: E0271, E0308. +For more information about an error, try `rustc --explain E0271`. From edbbeae31855d7354b30d969e94cfc3d5e5604f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 13 Jul 2026 23:10:52 +0200 Subject: [PATCH 7/8] Update tidy licenses --- src/tools/tidy/src/deps.rs | 10 ++++++++-- src/tools/tidy/src/extdeps.rs | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 60b321641ad76..aeaea8ca9bb5b 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -242,11 +242,17 @@ const EXCEPTIONS_RUST_ANALYZER: ExceptionList = &[ const EXCEPTIONS_RUSTC_PERF: ExceptionList = &[ // tidy-alphabetical-start + ("aws-lc-rs", "ISC AND (Apache-2.0 OR ISC)"), + ( + "aws-lc-sys", + "ISC AND (Apache-2.0 OR ISC) AND Apache-2.0 AND MIT AND BSD-3-Clause AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR ISC OR MIT-0)", + ), + ("brotli", "BSD-3-Clause AND MIT"), + ("fast-srgb8", "MIT OR Apache-2.0 OR CC0-1.0"), ("inferno", "CDDL-1.0"), ("option-ext", "MPL-2.0"), - ("terminfo", "WTFPL"), ("wasite", "Apache-2.0 OR BSL-1.0 OR MIT"), - ("wezterm-bidi", "MIT AND Unicode-DFS-2016"), + ("webpki-root-certs", "CDLA-Permissive-2.0"), ("whoami", "Apache-2.0 OR BSL-1.0 OR MIT"), // tidy-alphabetical-end ]; diff --git a/src/tools/tidy/src/extdeps.rs b/src/tools/tidy/src/extdeps.rs index 7999386a3c298..79b562270f7ce 100644 --- a/src/tools/tidy/src/extdeps.rs +++ b/src/tools/tidy/src/extdeps.rs @@ -10,7 +10,7 @@ use crate::diagnostics::TidyCtx; const ALLOWED_SOURCES: &[&str] = &[ r#""registry+https://github.com/rust-lang/crates.io-index""#, // This is `rust_team_data` used by `site` in src/tools/rustc-perf, - r#""git+https://github.com/rust-lang/team#a5260e76d3aa894c64c56e6ddc8545b9a98043ec""#, + r#""git+https://github.com/rust-lang/team#db2c1ed9fbc0216e533db954cd249045c01c7406""#, ]; /// Checks for external package sources. `root` is the path to the directory that contains the From dff3fdedc9f0e737400156a6568b957e5a326239 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 14 Jul 2026 17:48:36 +1000 Subject: [PATCH 8/8] Rename `std_crates_for_run_make` to `std_crates_for_make_run` This function's name is referring to `Step::make_run`, and has nothing to do with run-make tests. --- src/bootstrap/src/core/build_steps/check.rs | 4 ++-- src/bootstrap/src/core/build_steps/clippy.rs | 7 ++++--- src/bootstrap/src/core/build_steps/compile.rs | 6 +++--- src/bootstrap/src/core/build_steps/doc.rs | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index 9d958f7d10078..002b46cb7fbec 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -5,7 +5,7 @@ use std::path::{Path, PathBuf}; use crate::core::build_steps::compile::{ ArtifactKeepMode, add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo, - std_crates_for_run_make, + std_crates_for_make_run, }; use crate::core::build_steps::tool; use crate::core::build_steps::tool::{ @@ -68,7 +68,7 @@ impl Step for Std { // Explicitly pass -p for all dependencies crates -- this will force cargo // to also check the tests/benches/examples for these crates, rather // than just the leaf crate. - let crates = std_crates_for_run_make(&run); + let crates = std_crates_for_make_run(&run); run.builder.ensure(Std { build_compiler: prepare_compiler_for_check(run.builder, run.target, Mode::Std) .build_compiler(), diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs index f03ae75c4bbf2..09ccd14ab88c3 100644 --- a/src/bootstrap/src/core/build_steps/clippy.rs +++ b/src/bootstrap/src/core/build_steps/clippy.rs @@ -13,11 +13,12 @@ //! to pass a prebuilt Clippy from the outside when running `cargo clippy`, but that would be //! (as usual) a massive undertaking/refactoring. -use super::compile::{ArtifactKeepMode, run_cargo, rustc_cargo, std_cargo}; use super::tool::{SourceType, prepare_tool_cargo}; use crate::builder::{Builder, ShouldRun}; use crate::core::build_steps::check::{CompilerForCheck, prepare_compiler_for_check}; -use crate::core::build_steps::compile::std_crates_for_run_make; +use crate::core::build_steps::compile::{ + ArtifactKeepMode, run_cargo, rustc_cargo, std_cargo, std_crates_for_make_run, +}; use crate::core::builder; use crate::core::builder::{Alias, Kind, RunConfig, Step, StepMetadata, crate_description}; use crate::utils::build_stamp::{self, BuildStamp}; @@ -178,7 +179,7 @@ impl Step for Std { } fn make_run(run: RunConfig<'_>) { - let crates = std_crates_for_run_make(&run); + let crates = std_crates_for_make_run(&run); let config = LintConfig::new(run.builder); run.builder.ensure(Std::new(run.builder, run.target, config, crates)); } diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 54f93d8f72bf8..1248438e93605 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -122,7 +122,7 @@ impl Step for Std { } fn make_run(run: RunConfig<'_>) { - let crates = std_crates_for_run_make(&run); + let crates = std_crates_for_make_run(&run); let builder = run.builder; // Force compilation of the standard library from source if the `library` is modified. This allows @@ -479,9 +479,9 @@ fn copy_self_contained_objects( target_deps } -/// Resolves standard library crates for `Std::run_make` for any build kind (like check, doc, +/// Resolves standard library crates for [`Std::make_run`] for any build kind (like check, doc, /// build, clippy, etc.). -pub fn std_crates_for_run_make(run: &RunConfig<'_>) -> Vec { +pub fn std_crates_for_make_run(run: &RunConfig<'_>) -> Vec { let mut crates = run.make_run_crates(builder::Alias::Library); // For no_std targets, we only want to check core and alloc diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 0f051232757e8..847282ee62719 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -667,7 +667,7 @@ impl Step for Std { } fn make_run(run: RunConfig<'_>) { - let crates = compile::std_crates_for_run_make(&run); + let crates = compile::std_crates_for_make_run(&run); let target_is_no_std = run.builder.no_std(run.target).unwrap_or(false); if crates.is_empty() && target_is_no_std { return;