-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.rs
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,7 @@ | ||
//extern crate has_assoc_type; | ||
|
||
//fn ice(x: Box<dyn has_assoc_type::Foo<Assoc=()>>) { | ||
fn ice(x: Box<dyn Iterator<Item=()>>) { | ||
*x //~ ERROR mismatched types [E0308] | ||
} | ||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.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,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-57673-ice-on-deref-of-boxed-trait.rs:5:5 | ||
| | ||
LL | fn ice(x: Box<dyn Iterator<Item=()>>) { | ||
| - possibly return type missing here? | ||
LL | *x //~ ERROR mismatched types [E0308] | ||
| ^^ expected (), found trait std::iter::Iterator | ||
| | ||
= note: expected type `()` | ||
found type `(dyn std::iter::Iterator<Item=()> + 'static)` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |