rust/tests/ui/const-generics/infer/method-chain.rs

17 lines
251 B
Rust
Raw Normal View History

2020-09-14 02:45:02 -05:00
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
2020-09-14 03:08:32 -05:00
}