blob: fc6e6c29db11ca22a17c84a0adfe4f5fe381e0cb [file] [log] [blame]
error: declaration of a `no_mangle` function
--> $DIR/lint-unsafe-code.rs:31:1
|
LL | #[no_mangle] fn foo() {}
| ^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/lint-unsafe-code.rs:3:9
|
LL | #![deny(unsafe_code)]
| ^^^^^^^^^^^
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
error: declaration of a `no_mangle` static
--> $DIR/lint-unsafe-code.rs:32:1
|
LL | #[no_mangle] static FOO: u32 = 5;
| ^^^^^^^^^^^^
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
error: declaration of a function with `export_name`
--> $DIR/lint-unsafe-code.rs:34:1
|
LL | #[export_name = "bar"] fn bar() {}
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
error: declaration of a static with `export_name`
--> $DIR/lint-unsafe-code.rs:35:1
|
LL | #[export_name = "BAR"] static BAR: u32 = 5;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
error: declaration of an `unsafe` function
--> $DIR/lint-unsafe-code.rs:37:1
|
LL | unsafe fn baz() {}
| ^^^^^^^^^^^^^^^^^^
error: declaration of an `unsafe` trait
--> $DIR/lint-unsafe-code.rs:38:1
|
LL | unsafe trait Foo {}
| ^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` trait
--> $DIR/lint-unsafe-code.rs:39:1
|
LL | unsafe impl Foo for Bar {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: declaration of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:42:5
|
LL | unsafe fn baz(&self);
| ^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:43:5
|
LL | unsafe fn provided(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:44:5
|
LL | unsafe fn provided_override(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:48:5
|
LL | unsafe fn baz(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:49:5
|
LL | unsafe fn provided_override(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:68:5
|
LL | unsafe fn provided_override(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:79:5
|
LL | unsafe fn provided(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:85:5
|
LL | unsafe fn provided(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:89:5
|
LL | unsafe fn baz(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: usage of an `unsafe` block
--> $DIR/lint-unsafe-code.rs:100:5
|
LL | unsafe {}
| ^^^^^^^^^
error: declaration of a `no_mangle` function
--> $DIR/lint-unsafe-code.rs:21:9
|
LL | #[no_mangle] fn foo() {}
| ^^^^^^^^^^^^
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
error: declaration of a `no_mangle` static
--> $DIR/lint-unsafe-code.rs:22:9
|
LL | #[no_mangle] static FOO: u32 = 5;
| ^^^^^^^^^^^^
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
error: declaration of a function with `export_name`
--> $DIR/lint-unsafe-code.rs:23:9
|
LL | #[export_name = "bar"] fn bar() {}
| ^^^^^^^^^^^^^^^^^^^^^^
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
error: declaration of a static with `export_name`
--> $DIR/lint-unsafe-code.rs:25:9
|
LL | #[export_name = "BAR"] static BAR: u32 = 5;
| ^^^^^^^^^^^^^^^^^^^^^^
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
error: usage of an `unsafe` block
--> $DIR/lint-unsafe-code.rs:27:9
|
LL | unsafe {}
| ^^^^^^^^^
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 22 previous errors