1
Fork 0
rust/src/test/ui/lint/lint-unsafe-code.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

209 lines
7.2 KiB
Text
Raw Normal View History

error: declaration of a `no_mangle` function
--> $DIR/lint-unsafe-code.rs:31:1
2018-08-08 14:28:26 +02:00
|
LL | #[no_mangle] fn foo() {}
| ^^^^^^^^^^^^
2018-08-08 14:28:26 +02:00
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unsafe-code.rs:3:9
2018-08-08 14:28:26 +02:00
|
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
2018-08-08 14:28:26 +02:00
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 `no_mangle` method
--> $DIR/lint-unsafe-code.rs:41:5
|
LL | #[no_mangle] fn foo() {}
| ^^^^^^^^^^^^
|
= 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` method
--> $DIR/lint-unsafe-code.rs:45:5
|
LL | #[no_mangle] fn foo() {}
| ^^^^^^^^^^^^
|
= 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:48: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:49: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 a method with `export_name`
--> $DIR/lint-unsafe-code.rs:54:5
|
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 method with `export_name`
--> $DIR/lint-unsafe-code.rs:58:5
|
LL | #[export_name = "bar"] fn foo() {}
| ^^^^^^^^^^^^^^^^^^^^^^
|
= 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:61:1
|
LL | unsafe fn baz() {}
| ^^^^^^^^^^^^^^^^^^
2018-08-08 14:28:26 +02:00
error: declaration of an `unsafe` trait
--> $DIR/lint-unsafe-code.rs:62:1
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe trait Foo {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` trait
--> $DIR/lint-unsafe-code.rs:63:1
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe impl Foo for Bar {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: declaration of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:66:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn baz(&self);
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:67:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn provided(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:68:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn provided_override(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:72:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn baz(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:73:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn provided_override(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:92:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn provided_override(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:103:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn provided(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:109:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn provided(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
--> $DIR/lint-unsafe-code.rs:113:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe fn baz(&self) {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^
error: usage of an `unsafe` block
--> $DIR/lint-unsafe-code.rs:124:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^
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)
2018-08-08 14:28:26 +02:00
error: usage of an `unsafe` block
--> $DIR/lint-unsafe-code.rs:27:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | unsafe {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^
...
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)
2018-08-08 14:28:26 +02:00
error: aborting due to 26 previous errors
2018-08-08 14:28:26 +02:00