mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
cf0251d92c
It currently goes one token too far. Example: line 259 of `tests/ui/abi/compatibility.rs`: ``` test_abi_compatible!(fn_fn, fn(), fn(i32) -> i32); ``` This commit changes the span for the second element from `fn(),` to `fn()`, i.e. removes the extraneous comma.
33 lines
1000 B
Plaintext
33 lines
1000 B
Plaintext
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
--> $DIR/safe-outside-extern.rs:4:1
|
|
|
|
|
LL | safe fn foo() {}
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
--> $DIR/safe-outside-extern.rs:8:1
|
|
|
|
|
LL | safe static FOO: i32 = 1;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
--> $DIR/safe-outside-extern.rs:13:5
|
|
|
|
|
LL | safe fn foo();
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
--> $DIR/safe-outside-extern.rs:19:5
|
|
|
|
|
LL | safe fn foo() {}
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: function pointers cannot be declared with `safe` safety qualifier
|
|
--> $DIR/safe-outside-extern.rs:24:14
|
|
|
|
|
LL | type FnPtr = safe fn(i32, i32) -> i32;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 5 previous errors
|
|
|