Rollup merge of #102718 - compiler-errors:opaque-bound-lint-ice, r=fee1-dead

Fix `opaque_hidden_inferred_bound` lint ICE

Fixes #102705
This commit is contained in:
Matthias Krüger 2022-10-06 16:29:44 +02:00 committed by GitHub
commit 045fc18cde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 14 deletions

View file

@ -0,0 +1,22 @@
// check-pass
#![allow(opaque_hidden_inferred_bound)]
#![allow(dead_code)]
trait Duh {}
impl Duh for i32 {}
trait Trait {
type Assoc: Duh;
}
impl<R: Duh, F: FnMut() -> R> Trait for F {
type Assoc = R;
}
fn foo() -> impl Trait<Assoc = impl Send> {
|| 42
}
fn main() {}