rust/tests/ui/const-generics/infer/method-chain.rs
2023-01-11 09:32:08 +00:00

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
}