mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
21 lines
401 B
Rust
21 lines
401 B
Rust
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
|
// revisions: current next
|
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
#![allow(incomplete_features)]
|
|
|
|
struct U;
|
|
|
|
trait Foo {
|
|
fn bar(&self) -> impl Sized;
|
|
}
|
|
|
|
impl Foo for U {
|
|
fn bar<T>(&self) {}
|
|
//~^ ERROR method `bar` has 1 type parameter but its trait declaration has 0 type parameters
|
|
}
|
|
|
|
fn main() {
|
|
U.bar();
|
|
}
|