diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-10-01 13:05:17 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-10-24 18:33:04 +0000 |
| commit | ef212e7fb306626b4dc2c484aa3cf3b42a83e83a (patch) | |
| tree | bf69c7d6ae4d297c255d52b2832700e560199eb3 /src/test/ui/coherence | |
| parent | ed08a67566d7d1d9dd2ad928ff21c23e841a4345 (diff) | |
| download | rust-ef212e7fb306626b4dc2c484aa3cf3b42a83e83a.tar.gz rust-ef212e7fb306626b4dc2c484aa3cf3b42a83e83a.zip | |
Point at overlapping impls when type annotations are needed
Diffstat (limited to 'src/test/ui/coherence')
| -rw-r--r-- | src/test/ui/coherence/coherence-overlap-trait-alias.stderr | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/ui/coherence/coherence-overlap-trait-alias.stderr b/src/test/ui/coherence/coherence-overlap-trait-alias.stderr index e2e8ad54beb..affc58b84d4 100644 --- a/src/test/ui/coherence/coherence-overlap-trait-alias.stderr +++ b/src/test/ui/coherence/coherence-overlap-trait-alias.stderr @@ -4,7 +4,14 @@ error[E0283]: type annotations needed LL | impl C for u32 {} | ^ cannot infer type for type `u32` | - = note: cannot satisfy `u32: C` +note: multiple `impl`s satisfying `u32: C` found + --> $DIR/coherence-overlap-trait-alias.rs:13:1 + | +LL | impl<T: AB> C for T {} + | ^^^^^^^^^^^^^^^^^^^ +LL | #[rustc_strict_coherence] +LL | impl C for u32 {} + | ^^^^^^^^^^^^^^ note: required by a bound in `C` --> $DIR/coherence-overlap-trait-alias.rs:11:1 | |
