forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add revisions to fixed tests in -Zlower-impl-trait-in-trait-to-assoc-ty
- Loading branch information
1 parent
11f1810
commit c5c4340
Showing
15 changed files
with
180 additions
and
19 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
...in-trait/async-generics-and-bounds.stderr → .../async-generics-and-bounds.current.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
37 changes: 37 additions & 0 deletions
37
tests/ui/async-await/in-trait/async-generics-and-bounds.next.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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
error[E0311]: the parameter type `U` may not live long enough | ||
--> $DIR/async-generics-and-bounds.rs:14:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ||
| ^^^^^^^ | ||
| | ||
note: the parameter type `U` must be valid for the anonymous lifetime defined here... | ||
--> $DIR/async-generics-and-bounds.rs:14:18 | ||
| | ||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ||
| ^^^^^ | ||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at | ||
--> $DIR/async-generics-and-bounds.rs:14:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ||
| ^^^^^^^ | ||
|
||
error[E0311]: the parameter type `T` may not live long enough | ||
--> $DIR/async-generics-and-bounds.rs:14:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ||
| ^^^^^^^ | ||
| | ||
note: the parameter type `T` must be valid for the anonymous lifetime defined here... | ||
--> $DIR/async-generics-and-bounds.rs:14:18 | ||
| | ||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ||
| ^^^^^ | ||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at | ||
--> $DIR/async-generics-and-bounds.rs:14:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ||
| ^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0311`. |
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
12 changes: 6 additions & 6 deletions
12
...sync-await/in-trait/async-generics.stderr → ...it/in-trait/async-generics.current.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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
error[E0311]: the parameter type `U` may not live long enough | ||
--> $DIR/async-generics.rs:11:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U); | ||
| ^^^^^^^ | ||
| | ||
note: the parameter type `U` must be valid for the anonymous lifetime defined here... | ||
--> $DIR/async-generics.rs:11:18 | ||
| | ||
LL | async fn foo(&self) -> &(T, U); | ||
| ^^^^^ | ||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at | ||
--> $DIR/async-generics.rs:11:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U); | ||
| ^^^^^^^ | ||
|
||
error[E0311]: the parameter type `T` may not live long enough | ||
--> $DIR/async-generics.rs:11:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U); | ||
| ^^^^^^^ | ||
| | ||
note: the parameter type `T` must be valid for the anonymous lifetime defined here... | ||
--> $DIR/async-generics.rs:11:18 | ||
| | ||
LL | async fn foo(&self) -> &(T, U); | ||
| ^^^^^ | ||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at | ||
--> $DIR/async-generics.rs:11:28 | ||
| | ||
LL | async fn foo(&self) -> &(T, U); | ||
| ^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0311`. |
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
2 changes: 1 addition & 1 deletion
2
...i/impl-trait/in-trait/issue-102571.stderr → ...rait/in-trait/issue-102571.current.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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-102571.rs:23:9 | ||
| | ||
LL | let () = t.bar(); | ||
| ^^ ------- this expression has type `impl Deref<Target = impl std::fmt::Display + ?Sized>` | ||
| | | ||
| expected associated type, found `()` | ||
| | ||
= note: expected associated type `impl Deref<Target = impl std::fmt::Display + ?Sized>` | ||
found unit type `()` | ||
|
||
error: aborting due to previous error | ||
|
||
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
31 changes: 31 additions & 0 deletions
31
tests/ui/impl-trait/in-trait/specialization-broken.next.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
error[E0053]: method `bar` has an incompatible type for trait | ||
--> $DIR/specialization-broken.rs:19:22 | ||
| | ||
LL | default impl<U> Foo for U | ||
| - this type parameter | ||
... | ||
LL | fn bar(&self) -> U { | ||
| ^ | ||
| | | ||
| expected associated type, found type parameter `U` | ||
| help: change the output type to match the trait: `impl Sized` | ||
| | ||
note: type in trait | ||
--> $DIR/specialization-broken.rs:12:22 | ||
| | ||
LL | fn bar(&self) -> impl Sized; | ||
| ^^^^^^^^^^ | ||
= note: expected signature `fn(&U) -> impl Sized` | ||
found signature `fn(&U) -> U` | ||
|
||
error: method with return-position `impl Trait` in trait cannot be specialized | ||
--> $DIR/specialization-broken.rs:19:5 | ||
| | ||
LL | fn bar(&self) -> U { | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: specialization behaves in inconsistent and surprising ways with `#![feature(return_position_impl_trait_in_trait)]`, and for now is disallowed | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0053`. |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time | ||
--> $DIR/wf-bounds.rs:11:22 | ||
| | ||
LL | fn nya() -> impl Wf<Vec<[u8]>>; | ||
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: the trait `Sized` is not implemented for `[u8]` | ||
note: required by a bound in `Vec` | ||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | ||
|
||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time | ||
--> $DIR/wf-bounds.rs:14:23 | ||
| | ||
LL | fn nya2() -> impl Wf<[u8]>; | ||
| ^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: the trait `Sized` is not implemented for `[u8]` | ||
note: required by a bound in `Wf` | ||
--> $DIR/wf-bounds.rs:8:10 | ||
| | ||
LL | trait Wf<T> {} | ||
| ^ required by this bound in `Wf` | ||
help: consider relaxing the implicit `Sized` restriction | ||
| | ||
LL | trait Wf<T: ?Sized> {} | ||
| ++++++++ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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