diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-07-16 17:34:23 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-07-16 17:37:28 +0000 |
| commit | ebe21ac23a8a259079c9c59669c1d7da1fa88d0c (patch) | |
| tree | 15f01407a16b698ee3ee9e7d31008c6c7888d8cc /src | |
| parent | 24a8d3bce38607b385f19571d5120b892b18ae9a (diff) | |
| download | rust-ebe21ac23a8a259079c9c59669c1d7da1fa88d0c.tar.gz rust-ebe21ac23a8a259079c9c59669c1d7da1fa88d0c.zip | |
Infer all inference variables via InferCx
The previous algorithm was correct for the example given in its documentation, but when the TAIT was declared as a free item instead of an associated item, the generic parameters were the wrong ones.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/type-alias-impl-trait/issue-60371.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/type-alias-impl-trait/issue-60371.stderr | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.rs b/src/test/ui/type-alias-impl-trait/issue-60371.rs index 4ac7f9423ff..b7c8a58a656 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60371.rs @@ -9,7 +9,7 @@ trait Bug { impl Bug for &() { type Item = impl Bug; //~ ERROR `impl Trait` in type aliases is unstable //~^ ERROR the trait bound `(): Bug` is not satisfied - //~^^ ERROR could not find defining uses + //~^^ ERROR the trait bound `(): Bug` is not satisfied const FUN: fn() -> Self::Item = || (); //~^ ERROR type alias impl trait is not permitted here diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.stderr b/src/test/ui/type-alias-impl-trait/issue-60371.stderr index 255d381bf06..6857d5264b6 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60371.stderr @@ -25,11 +25,14 @@ LL | type Item = impl Bug; = help: the following implementations were found: <&() as Bug> -error: could not find defining uses +error[E0277]: the trait bound `(): Bug` is not satisfied --> $DIR/issue-60371.rs:10:17 | LL | type Item = impl Bug; - | ^^^^^^^^ + | ^^^^^^^^ the trait `Bug` is not implemented for `()` + | + = help: the following implementations were found: + <&() as Bug> error: aborting due to 4 previous errors |
