Future in trait_alias causes internal compiler error ? #104719
Labels
C-bug
Category: This is a bug.
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.
Code
Meta
rustc --version --verbose
:<Fut: Future<Output = usize>>
to where-clause (e.g.where Fut: Future<Output = usize>
) doesn't change the resultdyn F<Fut>
. For example, when we add some "plausible" arguments likeb: F, c: Fn
aftera: dyn F<Fut>
, rust-analyzer doesn't report any mistakes.Future<Output = usize>
with non-Future trait likeToString
, everything get fine:(dyn Fn() -> Fut + 'static)
cannot be known at compilation time" caused by rustc&
todyn F<Fut>
makes it compilableError output
cargo build
:Backtrace
`RUST_BACKTRACE=1 cargo build`:The text was updated successfully, but these errors were encountered: