diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-07-01 16:47:26 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-07-07 12:15:12 -0700 |
| commit | af10a456c19c447ff2bff585537d52a8d532bd86 (patch) | |
| tree | dfb4e9c247c42c7c495430f03b9bdda1013e749f /src/test/ui/impl-trait | |
| parent | d5642acfe689ca704b8572ea8ca88e43aeb70a11 (diff) | |
| download | rust-af10a456c19c447ff2bff585537d52a8d532bd86.tar.gz rust-af10a456c19c447ff2bff585537d52a8d532bd86.zip | |
Track implicit `Sized` obligations in type params
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
Diffstat (limited to 'src/test/ui/impl-trait')
4 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr b/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr index 8b671e7dbb3..9150d957db7 100644 --- a/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr +++ b/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr @@ -2,7 +2,7 @@ error[E0599]: no method named `foo` found for struct `Bar` in the current scope --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:20:8 | LL | struct Bar; - | --- method `foo` not found for this struct + | ---------- method `foo` not found for this struct ... LL | f1.foo(1usize); | ^^^ method not found in `Bar` diff --git a/src/test/ui/impl-trait/issues/issue-62742.stderr b/src/test/ui/impl-trait/issues/issue-62742.stderr index 2d14faf7677..34f4dc2cef3 100644 --- a/src/test/ui/impl-trait/issues/issue-62742.stderr +++ b/src/test/ui/impl-trait/issues/issue-62742.stderr @@ -21,7 +21,7 @@ LL | pub struct RawImpl<T>(PhantomData<T>); | --------------------- doesn't satisfy `RawImpl<()>: Raw<()>` ... LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); - | -------- function or associated item `foo` not found for this struct + | ----------------------------------------- function or associated item `foo` not found for this struct | = note: the following trait bounds were not satisfied: `RawImpl<()>: Raw<()>` diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr index abd57d12d9e..b727b2ca0cc 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -2,7 +2,7 @@ error[E0599]: no method named `is_empty` found for struct `Foo` in the current s --> $DIR/method-suggestion-no-duplication.rs:7:15 | LL | struct Foo; - | --- method `is_empty` not found for this struct + | ---------- method `is_empty` not found for this struct ... LL | foo(|s| s.is_empty()); | ^^^^^^^^ method not found in `Foo` diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index 1d24f428fb1..3d4ae11e576 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -94,7 +94,7 @@ error[E0599]: no method named `method` found for struct `Foo` in the current sco --> $DIR/no-method-suggested-traits.rs:40:9 | LL | struct Foo; - | --- method `method` not found for this struct + | ---------- method `method` not found for this struct ... LL | Foo.method(); | ^^^^^^ method not found in `Foo` @@ -201,7 +201,7 @@ error[E0599]: no method named `method3` found for struct `Foo` in the current sc --> $DIR/no-method-suggested-traits.rs:59:9 | LL | struct Foo; - | --- method `method3` not found for this struct + | ---------- method `method3` not found for this struct ... LL | Foo.method3(); | ^^^^^^^ method not found in `Foo` @@ -224,7 +224,7 @@ error[E0599]: no method named `method3` found for enum `Bar` in the current scop --> $DIR/no-method-suggested-traits.rs:63:12 | LL | enum Bar { X } - | --- method `method3` not found for this enum + | -------- method `method3` not found for this enum ... LL | Bar::X.method3(); | ^^^^^^^ method not found in `Bar` |
