diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-08-14 13:09:53 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-10-04 02:04:14 +0000 |
| commit | 91b9ffeab0f8c491c81cd976c0d23d947cd6d12f (patch) | |
| tree | 6b205f2c64d77221af8600edb9343968e05a49a4 /tests/ui/issues | |
| parent | 2817ece19c67a182c0b0aae402c0e57c8ed22dab (diff) | |
| download | rust-91b9ffeab0f8c491c81cd976c0d23d947cd6d12f.tar.gz rust-91b9ffeab0f8c491c81cd976c0d23d947cd6d12f.zip | |
Reorder fullfillment errors to keep more interesting ones first
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
Diffstat (limited to 'tests/ui/issues')
| -rw-r--r-- | tests/ui/issues/issue-12187-1.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/issues/issue-12187-2.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/issues/issue-16966.stderr | 13 | ||||
| -rw-r--r-- | tests/ui/issues/issue-17551.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/issues/issue-24036.stderr | 9 | ||||
| -rw-r--r-- | tests/ui/issues/issue-24446.stderr | 14 |
6 files changed, 27 insertions, 19 deletions
diff --git a/tests/ui/issues/issue-12187-1.stderr b/tests/ui/issues/issue-12187-1.stderr index 806b7f0ac05..d2a6a96082e 100644 --- a/tests/ui/issues/issue-12187-1.stderr +++ b/tests/ui/issues/issue-12187-1.stderr @@ -2,9 +2,9 @@ error[E0282]: type annotations needed for `&T` --> $DIR/issue-12187-1.rs:6:9 | LL | let &v = new(); - | ^^ + | ^^ ----- type must be known at this point | -help: consider giving this pattern a type, where the placeholders `_` are specified +help: consider giving this pattern a type, where the type for type parameter `T` is specified | LL | let &v: &T = new(); | ++++ diff --git a/tests/ui/issues/issue-12187-2.stderr b/tests/ui/issues/issue-12187-2.stderr index a1fa0a2b002..ac75ebb4256 100644 --- a/tests/ui/issues/issue-12187-2.stderr +++ b/tests/ui/issues/issue-12187-2.stderr @@ -2,9 +2,9 @@ error[E0282]: type annotations needed for `&T` --> $DIR/issue-12187-2.rs:6:9 | LL | let &v = new(); - | ^^ + | ^^ ----- type must be known at this point | -help: consider giving this pattern a type, where the placeholders `_` are specified +help: consider giving this pattern a type, where the type for type parameter `T` is specified | LL | let &v: &T = new(); | ++++ diff --git a/tests/ui/issues/issue-16966.stderr b/tests/ui/issues/issue-16966.stderr index 8c92505b5eb..c53707c5d69 100644 --- a/tests/ui/issues/issue-16966.stderr +++ b/tests/ui/issues/issue-16966.stderr @@ -1,9 +1,16 @@ -error[E0282]: type annotations needed +error[E0283]: type annotations needed --> $DIR/issue-16966.rs:2:12 | LL | panic!(std::default::Default::default()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type + | -------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- + | | | + | | cannot infer type + | required by a bound introduced by this call + | + = note: cannot satisfy `_: Any` +note: required by a bound in `begin_panic` + --> $SRC_DIR/std/src/panicking.rs:LL:COL error: aborting due to previous error -For more information about this error, try `rustc --explain E0282`. +For more information about this error, try `rustc --explain E0283`. diff --git a/tests/ui/issues/issue-17551.stderr b/tests/ui/issues/issue-17551.stderr index 5f45a2f8443..3a8f569a3a5 100644 --- a/tests/ui/issues/issue-17551.stderr +++ b/tests/ui/issues/issue-17551.stderr @@ -2,7 +2,7 @@ error[E0282]: type annotations needed for `B<T>` --> $DIR/issue-17551.rs:6:9 | LL | let foo = B(marker::PhantomData); - | ^^^ + | ^^^ ------------------- type must be known at this point | help: consider giving `foo` an explicit type, where the type for type parameter `T` is specified | diff --git a/tests/ui/issues/issue-24036.stderr b/tests/ui/issues/issue-24036.stderr index a425816cdeb..184383b7369 100644 --- a/tests/ui/issues/issue-24036.stderr +++ b/tests/ui/issues/issue-24036.stderr @@ -11,12 +11,13 @@ LL | x = |c| c + 1; = note: no two closures, even if identical, have the same type = help: consider boxing your closure and/or using it as a trait object -error[E0282]: type annotations needed +error[E0284]: type annotations needed --> $DIR/issue-24036.rs:9:15 | LL | 1 => |c| c + 1, - | ^ + | ^ - type must be known at this point | + = note: cannot satisfy `<_ as Add<i32>>::Output == _` help: consider giving this closure parameter an explicit type | LL | 1 => |c: /* Type */| c + 1, @@ -24,5 +25,5 @@ LL | 1 => |c: /* Type */| c + 1, error: aborting due to 2 previous errors -Some errors have detailed explanations: E0282, E0308. -For more information about an error, try `rustc --explain E0282`. +Some errors have detailed explanations: E0284, E0308. +For more information about an error, try `rustc --explain E0284`. diff --git a/tests/ui/issues/issue-24446.stderr b/tests/ui/issues/issue-24446.stderr index 4afb87c4825..72d528f1619 100644 --- a/tests/ui/issues/issue-24446.stderr +++ b/tests/ui/issues/issue-24446.stderr @@ -1,19 +1,19 @@ -error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time +error[E0277]: `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely --> $DIR/issue-24446.rs:2:17 | LL | static foo: dyn Fn() -> u32 = || -> u32 { - | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely | - = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)` + = help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)` + = note: shared static variables must have a type that implements `Sync` -error[E0277]: `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely +error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time --> $DIR/issue-24446.rs:2:17 | LL | static foo: dyn Fn() -> u32 = || -> u32 { - | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely + | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)` - = note: shared static variables must have a type that implements `Sync` + = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)` error: aborting due to 2 previous errors |
