diff options
| author | lcnr <rust@lcnr.de> | 2024-01-15 15:06:25 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-02-22 17:43:57 +0100 |
| commit | f7cdff825c9a8087406ce56792e07d19f2d04e17 (patch) | |
| tree | e159a5816e23455947b5bb3f6446720df7558d65 /tests/ui/impl-trait | |
| parent | f392a870e9dffc629587c2e53b0e0b0e90410d84 (diff) | |
| download | rust-f7cdff825c9a8087406ce56792e07d19f2d04e17.tar.gz rust-f7cdff825c9a8087406ce56792e07d19f2d04e17.zip | |
overflow errors: change source to a concrete enum
Diffstat (limited to 'tests/ui/impl-trait')
| -rw-r--r-- | tests/ui/impl-trait/issues/issue-62742.rs | 1 | ||||
| -rw-r--r-- | tests/ui/impl-trait/issues/issue-62742.stderr | 26 |
2 files changed, 9 insertions, 18 deletions
diff --git a/tests/ui/impl-trait/issues/issue-62742.rs b/tests/ui/impl-trait/issues/issue-62742.rs index a980856f476..11a75737e55 100644 --- a/tests/ui/impl-trait/issues/issue-62742.rs +++ b/tests/ui/impl-trait/issues/issue-62742.rs @@ -4,7 +4,6 @@ fn _alias_check() { WrongImpl::foo(0i32); //~^ ERROR the trait bound `RawImpl<_>: Raw<_>` is not satisfied //~| ERROR the trait bound `RawImpl<_>: Raw<_>` is not satisfied - //~| ERROR the trait bound `RawImpl<_>: Raw<_>` is not satisfied WrongImpl::<()>::foo(0i32); //~^ ERROR the trait bound `RawImpl<()>: Raw<()>` is not satisfied //~| ERROR trait bounds were not satisfied diff --git a/tests/ui/impl-trait/issues/issue-62742.stderr b/tests/ui/impl-trait/issues/issue-62742.stderr index 825a48ae919..9ec581c231b 100644 --- a/tests/ui/impl-trait/issues/issue-62742.stderr +++ b/tests/ui/impl-trait/issues/issue-62742.stderr @@ -2,11 +2,11 @@ error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied --> $DIR/issue-62742.rs:4:5 | LL | WrongImpl::foo(0i32); - | ^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>` + | ^^^^^^^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>` | = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>` note: required by a bound in `SafeImpl::<T, A>::foo` - --> $DIR/issue-62742.rs:30:20 + --> $DIR/issue-62742.rs:29:20 | LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> { | ^^^^^^ required by this bound in `SafeImpl::<T, A>::foo` @@ -21,21 +21,13 @@ LL | WrongImpl::foo(0i32); | = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>` note: required by a bound in `SafeImpl` - --> $DIR/issue-62742.rs:28:35 + --> $DIR/issue-62742.rs:27:35 | LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); | ^^^^^^ required by this bound in `SafeImpl` -error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied - --> $DIR/issue-62742.rs:4:5 - | -LL | WrongImpl::foo(0i32); - | ^^^^^^^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>` - | - = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>` - error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied - --> $DIR/issue-62742.rs:8:22 + --> $DIR/issue-62742.rs:7:22 | LL | WrongImpl::<()>::foo(0i32); | ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds @@ -47,20 +39,20 @@ LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); | ----------------------------------------- function or associated item `foo` not found for this struct | note: trait bound `RawImpl<()>: Raw<()>` was not satisfied - --> $DIR/issue-62742.rs:30:20 + --> $DIR/issue-62742.rs:29:20 | LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> { | ^^^^^^ -------------- | | | unsatisfied trait bound introduced here note: the trait `Raw` must be implemented - --> $DIR/issue-62742.rs:14:1 + --> $DIR/issue-62742.rs:13:1 | LL | pub trait Raw<T: ?Sized> { | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied - --> $DIR/issue-62742.rs:8:5 + --> $DIR/issue-62742.rs:7:5 | LL | WrongImpl::<()>::foo(0i32); | ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>` @@ -68,12 +60,12 @@ LL | WrongImpl::<()>::foo(0i32); = help: the trait `Raw<[()]>` is implemented for `RawImpl<()>` = help: for that trait implementation, expected `[()]`, found `()` note: required by a bound in `SafeImpl` - --> $DIR/issue-62742.rs:28:35 + --> $DIR/issue-62742.rs:27:35 | LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); | ^^^^^^ required by this bound in `SafeImpl` -error: aborting due to 5 previous errors +error: aborting due to 4 previous errors Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`. |
