]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/foreign-ty-semantic-fail.stderr
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / foreign-ty-semantic-fail.stderr
1 error: bounds on `type`s in `extern` blocks have no effect
2   --> $DIR/foreign-ty-semantic-fail.rs:6:13
3    |
4 LL |     type A: Ord;
5    |             ^^^
6
7 error: `type`s inside `extern` blocks cannot have generic parameters
8   --> $DIR/foreign-ty-semantic-fail.rs:8:11
9    |
10 LL | extern "C" {
11    | ---------- `extern` block begins here
12 ...
13 LL |     type B<'a> where 'a: 'static;
14    |           ^^^^ help: remove the generic parameters
15    |
16    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
17
18 error: `type`s inside `extern` blocks cannot have `where` clauses
19   --> $DIR/foreign-ty-semantic-fail.rs:8:16
20    |
21 LL | extern "C" {
22    | ---------- `extern` block begins here
23 ...
24 LL |     type B<'a> where 'a: 'static;
25    |                ^^^^^^^^^^^^^^^^^ help: remove the `where` clause
26    |
27    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
28
29 error: `type`s inside `extern` blocks cannot have generic parameters
30   --> $DIR/foreign-ty-semantic-fail.rs:11:11
31    |
32 LL | extern "C" {
33    | ---------- `extern` block begins here
34 ...
35 LL |     type C<T: Ord> where T: 'static;
36    |           ^^^^^^^^ help: remove the generic parameters
37    |
38    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
39
40 error: `type`s inside `extern` blocks cannot have `where` clauses
41   --> $DIR/foreign-ty-semantic-fail.rs:11:20
42    |
43 LL | extern "C" {
44    | ---------- `extern` block begins here
45 ...
46 LL |     type C<T: Ord> where T: 'static;
47    |                    ^^^^^^^^^^^^^^^^ help: remove the `where` clause
48    |
49    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
50
51 error: incorrect `type` inside `extern` block
52   --> $DIR/foreign-ty-semantic-fail.rs:14:10
53    |
54 LL | extern "C" {
55    | ---------- `extern` blocks define existing foreign types and types inside of them cannot have a body
56 ...
57 LL |     type D = u8;
58    |          ^   -- the invalid body
59    |          |
60    |          cannot have a body
61    |
62    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
63
64 error: aborting due to 6 previous errors
65