summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-unsafe-code.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/lint/lint-unsafe-code.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/lint/lint-unsafe-code.stderr')
-rw-r--r--src/test/ui/lint/lint-unsafe-code.stderr224
1 files changed, 224 insertions, 0 deletions
diff --git a/src/test/ui/lint/lint-unsafe-code.stderr b/src/test/ui/lint/lint-unsafe-code.stderr
new file mode 100644
index 000000000..8dde05fc4
--- /dev/null
+++ b/src/test/ui/lint/lint-unsafe-code.stderr
@@ -0,0 +1,224 @@
+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 `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 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
+
+error: declaration of a method with `export_name`
+ --> $DIR/lint-unsafe-code.rs:57: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:61: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:64:1
+ |
+LL | unsafe fn baz() {}
+ | ^^^^^^^^^^^^^^^^^^
+
+error: declaration of an `unsafe` trait
+ --> $DIR/lint-unsafe-code.rs:65:1
+ |
+LL | unsafe trait Foo {}
+ | ^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` trait
+ --> $DIR/lint-unsafe-code.rs:66:1
+ |
+LL | unsafe impl Foo for Bar {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: declaration of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:69:5
+ |
+LL | unsafe fn baz(&self);
+ | ^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:70:5
+ |
+LL | unsafe fn provided(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:71:5
+ |
+LL | unsafe fn provided_override(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:75:5
+ |
+LL | unsafe fn baz(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:76:5
+ |
+LL | unsafe fn provided_override(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:95:5
+ |
+LL | unsafe fn provided_override(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:106:5
+ |
+LL | unsafe fn provided(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:112:5
+ |
+LL | unsafe fn provided(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: implementation of an `unsafe` method
+ --> $DIR/lint-unsafe-code.rs:116:5
+ |
+LL | unsafe fn baz(&self) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: usage of an `unsafe` block
+ --> $DIR/lint-unsafe-code.rs:127: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 28 previous errors
+