2020-05-14 15:31:06 +00:00
error: declaration of a `no_mangle` function
2020-08-04 11:02:17 +00:00
--> $DIR/lint-unsafe-code.rs:31:1
2018-08-08 12:28:26 +00:00
|
2020-05-14 15:31:06 +00:00
LL | #[no_mangle] fn foo() {}
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^
2018-08-08 12:28:26 +00:00
|
2022-09-18 15:55:36 +00:00
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2018-12-25 15:56:47 +00:00
--> $DIR/lint-unsafe-code.rs:3:9
2018-08-08 12:28:26 +00:00
|
LL | #![deny(unsafe_code)]
| ^^^^^^^^^^^
2020-05-14 15:31:06 +00:00
error: declaration of a `no_mangle` static
2020-08-04 11:02:17 +00:00
--> $DIR/lint-unsafe-code.rs:32:1
2020-05-14 15:31:06 +00:00
|
LL | #[no_mangle] static FOO: u32 = 5;
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^
2020-06-20 11:34:22 +00:00
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2020-05-14 15:31:06 +00:00
2021-08-07 18:10:57 +00:00
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
2020-05-15 15:36:19 +00:00
error: declaration of a function with `export_name`
2021-08-07 18:10:57 +00:00
--> $DIR/lint-unsafe-code.rs:48:1
2020-05-15 15:36:19 +00:00
|
LL | #[export_name = "bar"] fn bar() {}
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^
2020-06-20 11:34:22 +00:00
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2020-05-15 15:36:19 +00:00
error: declaration of a static with `export_name`
2021-08-07 18:10:57 +00:00
--> $DIR/lint-unsafe-code.rs:49:1
2020-05-15 15:36:19 +00:00
|
LL | #[export_name = "BAR"] static BAR: u32 = 5;
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^
2020-06-20 11:34:22 +00:00
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2020-05-15 15:36:19 +00:00
2022-05-16 17:04:54 +00:00
error: declaration of a function with `link_section`
--> $DIR/lint-unsafe-code.rs:51:1
|
LL | #[link_section = ".example_section"] fn uwu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them
error: declaration of a static with `link_section`
--> $DIR/lint-unsafe-code.rs:52:1
|
LL | #[link_section = ".example_section"] static UWU: u32 = 5;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them
2021-08-07 18:10:57 +00:00
error: declaration of a method with `export_name`
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:57:5
2021-08-07 18:10:57 +00:00
|
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`
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:61:5
2021-08-07 18:10:57 +00:00
|
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
2020-05-14 15:31:06 +00:00
error: declaration of an `unsafe` function
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:64:1
2020-05-14 15:31:06 +00:00
|
LL | unsafe fn baz() {}
| ^^^^^^^^^^^^^^^^^^
2018-08-08 12:28:26 +00:00
error: declaration of an `unsafe` trait
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:65:1
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe trait Foo {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` trait
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:66:1
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe impl Foo for Bar {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: declaration of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:69:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn baz(&self);
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:70:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn provided(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:71:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn provided_override(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:75:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn baz(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:76:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn provided_override(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:95:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn provided_override(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:106:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn provided(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:112:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn provided(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: implementation of an `unsafe` method
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:116:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe fn baz(&self) {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^
error: usage of an `unsafe` block
2022-05-16 17:04:54 +00:00
--> $DIR/lint-unsafe-code.rs:127:5
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^
2020-05-14 15:31:06 +00:00
error: declaration of a `no_mangle` function
2020-08-04 11:02:17 +00:00
--> $DIR/lint-unsafe-code.rs:21:9
2020-05-14 15:31:06 +00:00
|
LL | #[no_mangle] fn foo() {}
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^
2020-05-14 15:31:06 +00:00
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
2020-06-20 11:34:22 +00:00
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2021-02-13 19:52:25 +00:00
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
2020-05-14 15:31:06 +00:00
error: declaration of a `no_mangle` static
2020-08-04 11:02:17 +00:00
--> $DIR/lint-unsafe-code.rs:22:9
2020-05-14 15:31:06 +00:00
|
LL | #[no_mangle] static FOO: u32 = 5;
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^
2020-05-14 15:31:06 +00:00
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
2020-06-20 11:34:22 +00:00
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2021-02-13 19:52:25 +00:00
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
2020-05-14 15:31:06 +00:00
2020-05-15 15:36:19 +00:00
error: declaration of a function with `export_name`
2020-08-04 11:02:17 +00:00
--> $DIR/lint-unsafe-code.rs:23:9
2020-05-15 15:36:19 +00:00
|
LL | #[export_name = "bar"] fn bar() {}
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^
2020-05-15 15:36:19 +00:00
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
2020-06-20 11:34:22 +00:00
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2021-02-13 19:52:25 +00:00
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
2020-05-15 15:36:19 +00:00
error: declaration of a static with `export_name`
2020-08-04 11:02:17 +00:00
--> $DIR/lint-unsafe-code.rs:25:9
2020-05-15 15:36:19 +00:00
|
LL | #[export_name = "BAR"] static BAR: u32 = 5;
2020-08-04 11:02:17 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^
2020-05-15 15:36:19 +00:00
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
|
2020-06-20 11:34:22 +00:00
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2021-02-13 19:52:25 +00:00
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
2020-05-15 15:36:19 +00:00
2018-08-08 12:28:26 +00:00
error: usage of an `unsafe` block
2020-05-15 15:36:19 +00:00
--> $DIR/lint-unsafe-code.rs:27:9
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | unsafe {}
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^
...
LL | unsafe_in_macro!()
| ------------------ in this macro invocation
2019-12-16 13:56:47 +00:00
|
2021-02-13 19:52:25 +00:00
= note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 12:28:26 +00:00
2022-05-16 17:04:54 +00:00
error: aborting due to 28 previous errors
2018-08-08 12:28:26 +00:00