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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
251 B
Rust
Raw Normal View History

2020-09-14 15:45:02 +08: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 16:08:32 +08:00
}