]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-parameter-defaults-referencing-Self.rs
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
[rust.git] / src / test / ui / type / type-parameter-defaults-referencing-Self.rs
1 // Test a default that references `Self` which is then used in an object type.
2 // Issue #18956.
3
4 #![feature(default_type_params)]
5
6 trait Foo<T=Self> {
7     fn method(&self);
8 }
9
10 fn foo(x: &dyn Foo) { }
11 //~^ ERROR the type parameter `T` must be explicitly specified
12
13 fn main() { }