]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/type-parameters-in-field-exprs.rs
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett
[rust.git] / src / test / ui / parser / type-parameters-in-field-exprs.rs
1 // compile-flags: -Z continue-parse-after-error
2
3 struct Foo {
4     x: isize,
5     y: isize,
6 }
7
8 fn main() {
9     let f = Foo {
10         x: 1,
11         y: 2,
12     };
13     f.x::<isize>;
14     //~^ ERROR field expressions may not have generic arguments
15     f.x::<>;
16     //~^ ERROR field expressions may not have generic arguments
17     f.x::();
18     //~^ ERROR field expressions may not have generic arguments
19 }