Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70cf33f
commit 6873a76
Showing
13 changed files
with
132 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
src/test/ui/associated-types/higher-ranked-projection.bad.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
error[E0271]: type mismatch resolving `for<'a> <&'a _ as Mirror>::Image == _` | ||
error[E0308]: mismatched types | ||
--> $DIR/higher-ranked-projection.rs:25:5 | ||
| | ||
LL | fn foo<U, T>(_t: T) | ||
| --- required by a bound in this | ||
LL | where for<'a> &'a T: Mirror<Image=U> | ||
| ------- required by this bound in `foo` | ||
... | ||
LL | foo(()); | ||
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime | ||
| ^^^ one type is more general than the other | ||
| | ||
= note: expected type `&'a ()` | ||
found type `&()` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0271`. | ||
For more information about this error, try `rustc --explain E0308`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:8:9: 8:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()` | ||
error[E0308]: mismatched types | ||
--> $DIR/closure-mismatch.rs:8:5 | ||
| | ||
LL | fn baz<T: Foo>(_: T) {} | ||
| --- required by this bound in `baz` | ||
... | ||
LL | baz(|_| ()); | ||
| ^^^ expected bound lifetime parameter, found concrete lifetime | ||
| ^^^ one type is more general than the other | ||
| | ||
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]` | ||
= note: expected type `for<'r> std::ops::Fn<(&'r (),)>` | ||
found type `std::ops::Fn<(&(),)>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0271`. | ||
For more information about this error, try `rustc --explain E0308`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/rfc1623.rs:21:35 | ||
| | ||
LL | static SOME_STRUCT: &SomeStruct = SomeStruct { | ||
| ___________________________________^ | ||
LL | | | ||
LL | | foo: &Foo { bools: &[false, true] }, | ||
LL | | bar: &Bar { bools: &[true, true] }, | ||
LL | | f: &id, | ||
LL | | | ||
LL | | }; | ||
| |_^ expected `&SomeStruct<'static, 'static, 'static>`, found struct `SomeStruct` | ||
| | ||
help: consider borrowing here | ||
| | ||
LL | static SOME_STRUCT: &SomeStruct = &SomeStruct { | ||
LL | | ||
LL | foo: &Foo { bools: &[false, true] }, | ||
LL | bar: &Bar { bools: &[true, true] }, | ||
LL | f: &id, | ||
LL | | ||
... | ||
|
||
error[E0271]: type mismatch resolving `for<'a, 'b> <fn(&Foo<'_>) -> &Foo<'_> {id::<&Foo<'_>>} as std::ops::FnOnce<(&'a Foo<'b>,)>>::Output == &'a Foo<'b>` | ||
--> $DIR/rfc1623.rs:25:8 | ||
--> $DIR/rfc1623.rs:24:8 | ||
| | ||
LL | f: &id, | ||
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime | ||
| ^^^ one type is more general than the other | ||
| | ||
= note: required for the cast to the object type `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` | ||
= note: expected type `std::ops::FnOnce<(&'a Foo<'b>,)>` | ||
found type `std::ops::FnOnce<(&Foo<'_>,)>` | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to previous error | ||
|
||
Some errors have detailed explanations: E0271, E0308. | ||
For more information about an error, try `rustc --explain E0271`. | ||
For more information about this error, try `rustc --explain E0308`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/issue-57611-trait-alias.rs:21:9: 21:14] as std::ops::FnOnce<(&'r X,)>>::Output == &'r X` | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-57611-trait-alias.rs:17:16 | ||
| | ||
LL | type Bar = impl Baz<Self, Self>; | ||
| ^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime | ||
| ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | ||
= note: the return type of a function must have a statically known size | ||
= note: expected type `std::ops::FnOnce<(&X,)>` | ||
found type `std::ops::FnOnce<(&X,)>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0271`. | ||
For more information about this error, try `rustc --explain E0308`. |