about summary refs log tree commit diff
path: root/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs
blob: 494e38c1e6ae6087cd58dc720d646ca6ae3cfec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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() { }