fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.8 KiB47 linesraw
1error: incorrect `type` inside `extern` block
2  --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:10
3   |
4LL | extern "C" {
5   | ---------- `extern` blocks define existing foreign types and types inside of them cannot have a body
6LL |     type Item = [T] where [T]: Sized;
7   |          ^^^^   --- the invalid body
8   |          |
9   |          cannot have a body
10   |
11   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
12
13error: `type`s inside `extern` blocks cannot have `where` clauses
14  --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:21
15   |
16LL | extern "C" {
17   | ---------- `extern` block begins here
18LL |     type Item = [T] where [T]: Sized;
19   |                     ^^^^^^^^^^^^^^^^ help: remove the `where` clause
20   |
21   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
22
23error[E0412]: cannot find type `T` in this scope
24  --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:28
25   |
26LL |     type Item = [T] where [T]: Sized;
27   |                            ^ not found in this scope
28
29error[E0412]: cannot find type `T` in this scope
30  --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:18
31   |
32LL |     type Item = [T] where [T]: Sized;
33   |                  ^ not found in this scope
34
35error[E0658]: extern types are experimental
36  --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:5
37   |
38LL |     type Item = [T] where [T]: Sized;
39   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40   |
41   = note: see issue #43467 <https://github.com/rust-lang/rust/issues/43467> for more information
42   = help: add `#![feature(extern_types)]` to the crate attributes to enable
43
44error: aborting due to 5 previous errors
45
46Some errors have detailed explanations: E0412, E0658.
47For more information about an error, try `rustc --explain E0412`.