mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 09:36:06 +00:00
22 lines
415 B
Rust
22 lines
415 B
Rust
// Regression test for #62517. We used to ICE when you had an `async
|
|
// fn` with an `impl Trait` return that mentioned a `dyn Bar` with no
|
|
// explicit lifetime bound.
|
|
//
|
|
// edition:2018
|
|
// check-pass
|
|
|
|
trait FirstTrait {}
|
|
trait SecondTrait {
|
|
type Item: ?Sized;
|
|
}
|
|
|
|
async fn foo(x: &str) -> impl SecondTrait<Item = dyn FirstTrait> {
|
|
}
|
|
|
|
|
|
impl<T> SecondTrait for T {
|
|
type Item = dyn FirstTrait;
|
|
}
|
|
|
|
fn main() { }
|