]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/unsafe-foreign-mod-2.stderr
Rollup merge of #107455 - tshepang:better-name, r=wesleywiser
[rust.git] / tests / ui / parser / unsafe-foreign-mod-2.stderr
1 error: expected `{`, found keyword `unsafe`
2   --> $DIR/unsafe-foreign-mod-2.rs:1:12
3    |
4 LL | extern "C" unsafe {
5    |            ^^^^^^ expected `{`
6
7 error: extern block cannot be declared unsafe
8   --> $DIR/unsafe-foreign-mod-2.rs:1:12
9    |
10 LL | extern "C" unsafe {
11    |            ^^^^^^
12
13 error: functions in `extern` blocks cannot have qualifiers
14   --> $DIR/unsafe-foreign-mod-2.rs:4:15
15    |
16 LL | extern "C" unsafe {
17    | ----------------- in this `extern` block
18 ...
19 LL |     unsafe fn foo();
20    |               ^^^
21    |
22 help: remove the qualifiers
23    |
24 LL |     fn foo();
25    |     ~~
26
27 error: aborting due to 3 previous errors
28