]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/associated-type-tuple-struct-construction.stderr
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow...
[rust.git] / tests / ui / associated-types / associated-type-tuple-struct-construction.stderr
1 error[E0575]: expected method or associated constant, found associated type `A::Assoc`
2   --> $DIR/associated-type-tuple-struct-construction.rs:7:32
3    |
4 LL |     let <Foo as A>::Assoc(n) = <Foo as A>::Assoc(2);
5    |                                ^^^^^^^^^^^^^^^^^
6    |
7    = note: can't use a type alias as a constructor
8
9 error[E0575]: expected method or associated constant, found associated type `A::Assoc`
10   --> $DIR/associated-type-tuple-struct-construction.rs:7:9
11    |
12 LL |     let <Foo as A>::Assoc(n) = <Foo as A>::Assoc(2);
13    |         ^^^^^^^^^^^^^^^^^
14    |
15    = note: can't use a type alias as a constructor
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0575`.