]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs
Auto merge of #106742 - compiler-errors:new-solver-make-it-not-ice, r=lcnr
[rust.git] / tests / ui / impl-trait / in-trait / trait-more-generics-than-impl.rs
1 #![feature(return_position_impl_trait_in_trait)]
2 #![allow(incomplete_features)]
3
4 struct S;
5
6 trait Foo {
7     fn bar<T>() -> impl Sized;
8 }
9
10 impl Foo for S {
11     fn bar() -> impl Sized {}
12     //~^ ERROR method `bar` has 0 type parameters but its trait declaration has 1 type parameter
13 }
14
15 fn main() {
16     S::bar();
17 }