mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 19:33:16 +00:00
17 lines
251 B
Rust
17 lines
251 B
Rust
struct Foo;
|
|
|
|
impl Foo {
|
|
fn bar(self) -> Foo {
|
|
Foo
|
|
}
|
|
|
|
fn baz<const N: usize>(self) -> Foo {
|
|
println!("baz: {}", N);
|
|
Foo
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
Foo.bar().bar().bar().bar().baz(); //~ ERROR type annotations needed
|
|
}
|