-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #57835 - pnkfelix:issue-57673-remove-leaky-nested-probe…
…, r=arielb1 typeck: remove leaky nested probe during trait object method resolution addresses #57673 (but not marking with f-x because thats now afflicting beta channel). Fix #57216
- Loading branch information
Showing
3 changed files
with
28 additions
and
9 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
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`. |