]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/in-trait/generics-mismatch.rs
Rollup merge of #103827 - compiler-errors:rpitit-substs-compat, r=wesleywiser
[rust.git] / src / test / ui / impl-trait / in-trait / generics-mismatch.rs
1 #![feature(return_position_impl_trait_in_trait)]
2 #![allow(incomplete_features)]
3
4 struct U;
5
6 trait Foo {
7     fn bar(&self) -> impl Sized;
8 }
9
10 impl Foo for U {
11     fn bar<T>(&self) {}
12     //~^ ERROR method `bar` has 1 type parameter but its trait declaration has 0 type parameters
13 }
14
15 fn main() {
16     U.bar();
17 }