ICE: Calling a non-dispatchable function with RPITIT in impl dyn Trait #102140
Labels
C-bug
Category: This is a bug.
F-return_position_impl_trait_in_trait
`#![feature(return_position_impl_trait_in_trait)]`
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Based on @nikomatsakis 's blog posts, I was playing around with RPITIT and dyn Trait.
I fully understand that it shouldn't compile 😅. It should probably give the same error as you get when
impl Marker
is replaced withu32
. Which would be:error[[E0277]]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
.Code
Playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=26882f1a5fa50c8fa117cc9962bed9b1
Details:
I started with this code ("shadowing foo" and dot-notation):
Which errors with
multiple applicable items in scope
, but recommends the ICE-ing code:disambiguate the associated function for candidate MyTrait::foo(&self)
.Meta
ICE's both on nightly and beta.
Error output
Backtrace 1
Backtrace 2
The text was updated successfully, but these errors were encountered: