Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
_ => {
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/codegen/overflow-during-mono.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<IntoIter<i32, 11>, {closure@overflow-during-mono.rs:14:41}>` to implement `Iterator`
= note: 31 redundant requirements hidden
= note: required for `Filter<Filter<Filter<Filter<Filter<..., ...>, ...>, ...>, ...>, ...>` to implement `Iterator`
= note: required for `Filter<Filter<Filter<Filter<Filter<..., ...>, ...>, ...>, ...>, ...>` to implement `IntoIterator`
= note: required for `Filter<Filter<Filter<Filter<Filter<Filter<_, _>, _>, _>, _>, _>, _>` to implement `Iterator`
= note: required for `Filter<Filter<Filter<Filter<Filter<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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error[E0308]: mismatched types
--> $DIR/hr_alias_normalization_leaking_vars.rs:34:36
|
LL | LendingIterator::for_each(&(), f);
| ------------------------- ^ expected `Box<fn(...)>`, found fn item
| ------------------------- ^ expected `Box<fn(_)>`, found fn item
| |
| arguments to this function are incorrect
|
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/diagnostic-width/E0271.ascii.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0271]: type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
error[E0271]: type mismatch resolving `<Result<_, ()> as Future>::Error == Foo`
--> $DIR/E0271.rs:19:5
|
LL | / Box::new(
Expand All @@ -7,14 +7,14 @@ LL | | Err::<(), _>(
LL | | Ok::<_, ()>(
... |
LL | | )
| |_____^ type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
| |_____^ type mismatch resolving `<Result<_, ()> 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<Result<..., ()>>` to `Box<...>`
= note: required for the cast from `Box<Result<_, ()>>` 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

Expand Down
6 changes: 3 additions & 3 deletions tests/ui/diagnostic-width/E0271.unicode.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0271]: type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
error[E0271]: type mismatch resolving `<Result<_, ()> as Future>::Error == Foo`
╭▸ $DIR/E0271.rs:19:5
LL │ ┏ Box::new(
Expand All @@ -7,14 +7,14 @@ LL │ ┃ Err::<(), _>(
LL │ ┃ Ok::<_, ()>(
‡ ┃
LL │ ┃ )
│ ┗━━━━━┛ type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
│ ┗━━━━━┛ type mismatch resolving `<Result<_, ()> 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<Result<..., ()>>` to `Box<...>`
├ note: required for the cast from `Box<Result<_, ()>>` 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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/binop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/binop.stderr
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
20 changes: 10 additions & 10 deletions tests/ui/diagnostic-width/long-E0308.ascii.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<Btype<Ctype<..., i32>, i32>, i32>`, found `Result<Result<Result<..., _>, _>, _>`
| |__________________________________^ expected `Atype<Btype<Ctype<_, i32>, i32>, i32>`, found `Result<Result<Result<_, _>, _>, _>`
|
= note: expected struct `Atype<Btype<..., i32>, i32>`
found enum `Result<Result<..., _>, _>`
= note: expected struct `Atype<Btype<_, i32>, i32>`
found enum `Result<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

Expand All @@ -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<Result<Option<Option<...>>, _>>`, found `Result<Result<Result<..., _>, _>, _>`
| |____________________________^ expected `Option<Result<Option<Option<_>>, _>>`, found `Result<Result<Result<_, _>, _>, _>`
|
= note: expected enum `Option<Result<Option<...>, _>>`
found enum `Result<Result<..., _>, _>`
= note: expected enum `Option<Result<Option<_>, _>>`
found enum `Result<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

Expand All @@ -50,11 +50,11 @@ LL | | Atype<
... |
LL | | i32
LL | | > = ();
| | - ^^ expected `Atype<Btype<Ctype<..., i32>, i32>, i32>`, found `()`
| | - ^^ expected `Atype<Btype<Ctype<_, i32>, i32>, i32>`, found `()`
| |_____|
| expected due to this
|
= note: expected struct `Atype<Btype<..., i32>, i32>`
= note: expected struct `Atype<Btype<_, i32>, 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
Expand All @@ -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<Result<Result<..., _>, _>, _>`
| |____________________________^ expected `()`, found `Result<Result<Result<_, _>, _>, _>`
|
= note: expected unit type `()`
found enum `Result<Result<..., _>, _>`
found enum `Result<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

Expand Down
20 changes: 10 additions & 10 deletions tests/ui/diagnostic-width/long-E0308.unicode.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<Btype<Ctype<..., i32>, i32>, i32>`, found `Result<Result<Result<..., _>, _>, _>`
│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `Atype<Btype<Ctype<_, i32>, i32>, i32>`, found `Result<Result<Result<_, _>, _>, _>`
├ note: expected struct `Atype<Btype<..., i32>, i32>`
│ found enum `Result<Result<..., _>, _>`
├ note: expected struct `Atype<Btype<_, i32>, i32>`
│ found enum `Result<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

Expand All @@ -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<Result<Option<Option<...>>, _>>`, found `Result<Result<Result<..., _>, _>, _>`
│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `Option<Result<Option<Option<_>>, _>>`, found `Result<Result<Result<_, _>, _>, _>`
├ note: expected enum `Option<Result<Option<...>, _>>`
│ found enum `Result<Result<..., _>, _>`
├ note: expected enum `Option<Result<Option<_>, _>>`
│ found enum `Result<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

Expand All @@ -50,11 +50,11 @@ LL │ │ Atype<
‡ │
LL │ │ i32
LL │ │ > = ();
│ │ │ ━━ expected `Atype<Btype<Ctype<..., i32>, i32>, i32>`, found `()`
│ │ │ ━━ expected `Atype<Btype<Ctype<_, i32>, i32>, i32>`, found `()`
│ └─────┤
│ expected due to this
├ note: expected struct `Atype<Btype<..., i32>, i32>`
├ note: expected struct `Atype<Btype<_, i32>, 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
Expand All @@ -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<Result<Result<..., _>, _>, _>`
│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ expected `()`, found `Result<Result<Result<_, _>, _>, _>`
├ note: expected unit type `()`
│ found enum `Result<Result<..., _>, _>`
│ found enum `Result<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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0529.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0529.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/diagnostic-width/long-E0609.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
2 changes: 1 addition & 1 deletion tests/ui/diagnostic-width/long-E0609.stderr
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/diagnostic-width/long-E0614.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
2 changes: 1 addition & 1 deletion tests/ui/diagnostic-width/long-E0614.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0614]: type `(..., ..., ..., ...)` cannot be dereferenced
error[E0614]: type `((_, _, _, _), _, _, _)` cannot be dereferenced
--> $DIR/long-E0614.rs:9:5
|
LL | *x;
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0618.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0618.stderr
Original file line number Diff line number Diff line change
@@ -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();
| ^--
| |
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/diagnostic-width/long-e0277.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ trait Trait {}
fn require_trait<T: Trait>() {}

fn main() {
require_trait::<D>(); //~ ERROR the trait bound `(...
require_trait::<D>(); //~ ERROR the trait bound `((_
}
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-e0277.stderr
Original file line number Diff line number Diff line change
@@ -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::<D>();
| ^ 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
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/diagnostic-width/non-copy-type-moved.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/secondary-label-with-long-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0320]: overflow while adding drop-check rules for `FingerTree<i32>`
LL | let ft =
| ^^
|
= note: overflowed on `FingerTree<Node<Node<Node<Node<Node<Node<Node<Node<Node<...>>>>>>>>>>`
= note: overflowed on `FingerTree<Node<Node<Node<Node<Node<Node<Node<Node<Node<_>>>>>>>>>>`
= 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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/error-codes/E0275.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>: Foo`
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>: Foo`
--> $DIR/E0275.rs:6:33
|
LL | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`)
note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>>>>>>>` to implement `Foo`
note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>>>>>>>` to implement `Foo`
--> $DIR/E0275.rs:6:9
|
LL | impl<T> Foo for T where Bar<T>: Foo {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
//~| ERROR reached the recursion limit while instantiating `<VirtualWrapper<..., 1> as MyTrait>::virtualize`
//~| ERROR reached the recursion limit while instantiating `<VirtualWrapper<_, 1> as MyTrait>::virtualize`

//@ build-fail
//@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
Expand Down
Loading
Loading