diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-04 16:20:01 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-24 16:00:48 +0000 |
| commit | 8ea461da5595067433803555b3fdb00d75e95b83 (patch) | |
| tree | df88ee8be8ba5dc49ae5b96fbb7ec91dd12e0dfe /tests/ui/impl-trait/auto-trait-selection.rs | |
| parent | 548c44760f14c4547971e0359715f871ce9867bd (diff) | |
| download | rust-8ea461da5595067433803555b3fdb00d75e95b83.tar.gz rust-8ea461da5595067433803555b3fdb00d75e95b83.zip | |
Do not assemble candidates for auto traits of opaque types in their defining scope
Diffstat (limited to 'tests/ui/impl-trait/auto-trait-selection.rs')
| -rw-r--r-- | tests/ui/impl-trait/auto-trait-selection.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/ui/impl-trait/auto-trait-selection.rs b/tests/ui/impl-trait/auto-trait-selection.rs index beb0b189fd7..ee5612459c2 100644 --- a/tests/ui/impl-trait/auto-trait-selection.rs +++ b/tests/ui/impl-trait/auto-trait-selection.rs @@ -3,7 +3,6 @@ //@ revisions: next old //@[next] compile-flags: -Znext-solver -//@[old]check-pass fn is_trait<T: Trait<U>, U: Default>(_: T) -> U { Default::default() @@ -14,7 +13,7 @@ impl<T: Send> Trait<u32> for T {} impl<T> Trait<i32> for T {} fn foo() -> impl Sized { if false { is_trait(foo()) } else { Default::default() } - //[next]~^ ERROR: type annotations needed + //~^ ERROR: type annotations needed } fn main() {} |
