-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Layout of
&dyn Trait<[type error]>
is still wide
- Loading branch information
1 parent
f1b1ed7
commit 0bb876e
Showing
4 changed files
with
32 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
trait Trait<T> {} | ||
|
||
struct Bar(Box<dyn Trait<T>>); | ||
//~^ ERROR cannot find type `T` in this scope | ||
|
||
fn main() { | ||
let x: Bar = unsafe { std::mem::transmute(()) }; | ||
} |
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[E0412]: cannot find type `T` in this scope | ||
--> $DIR/transmute-to-tail-with-err.rs:3:26 | ||
| | ||
LL | struct Bar(Box<dyn Trait<T>>); | ||
| ^ not found in this scope | ||
| | ||
help: you might be missing a type parameter | ||
| | ||
LL | struct Bar<T>(Box<dyn Trait<T>>); | ||
| +++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |