fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
2.1 KiB65 linesraw
1error: bounds on `type`s in `extern` blocks have no effect
2  --> $DIR/foreign-ty-semantic-fail.rs:6:13
3   |
4LL |     type A: Ord;
5   |             ^^^
6
7error: `type`s inside `extern` blocks cannot have generic parameters
8  --> $DIR/foreign-ty-semantic-fail.rs:8:11
9   |
10LL | extern "C" {
11   | ---------- `extern` block begins here
12...
13LL |     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
18error: `type`s inside `extern` blocks cannot have `where` clauses
19  --> $DIR/foreign-ty-semantic-fail.rs:8:16
20   |
21LL | extern "C" {
22   | ---------- `extern` block begins here
23...
24LL |     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
29error: `type`s inside `extern` blocks cannot have generic parameters
30  --> $DIR/foreign-ty-semantic-fail.rs:11:11
31   |
32LL | extern "C" {
33   | ---------- `extern` block begins here
34...
35LL |     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
40error: `type`s inside `extern` blocks cannot have `where` clauses
41  --> $DIR/foreign-ty-semantic-fail.rs:11:20
42   |
43LL | extern "C" {
44   | ---------- `extern` block begins here
45...
46LL |     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
51error: incorrect `type` inside `extern` block
52  --> $DIR/foreign-ty-semantic-fail.rs:14:10
53   |
54LL | extern "C" {
55   | ---------- `extern` blocks define existing foreign types and types inside of them cannot have a body
56...
57LL |     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
64error: aborting due to 6 previous errors
65