mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
12 lines
386 B
Rust
12 lines
386 B
Rust
// Test that we don't get an error with `dyn Object` in an impl Trait
|
|
// when there are multiple inputs. The `dyn Object` should default to `+
|
|
// 'static`. This used to erroneously generate an error (cc #62517).
|
|
//
|
|
//@ check-pass
|
|
|
|
trait Alpha<Item: ?Sized> {}
|
|
trait Object {}
|
|
impl<T> Alpha<dyn Object> for T {}
|
|
fn alpha(x: &str, y: &str) -> impl Alpha<dyn Object> { () }
|
|
fn main() { }
|