2020-05-14 17:31:06 +02:00
|
|
|
error: declaration of a `no_mangle` function
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:31:17
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-05-14 17:31:06 +02:00
|
|
|
LL | #[no_mangle] fn foo() {}
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
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)]
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
2020-05-14 17:31:06 +02:00
|
|
|
error: declaration of a `no_mangle` static
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:32:21
|
2020-05-14 17:31:06 +02:00
|
|
|
|
|
|
|
|
LL | #[no_mangle] static FOO: u32 = 5;
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-14 17:31:06 +02:00
|
|
|
|
2020-05-15 17:36:19 +02:00
|
|
|
error: declaration of a function with `export_name`
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:34:27
|
2020-05-15 17:36:19 +02:00
|
|
|
|
|
|
|
|
LL | #[export_name = "bar"] fn bar() {}
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-15 17:36:19 +02:00
|
|
|
|
|
|
|
error: declaration of a static with `export_name`
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:35:31
|
2020-05-15 17:36:19 +02:00
|
|
|
|
|
|
|
|
LL | #[export_name = "BAR"] static BAR: u32 = 5;
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-15 17:36:19 +02:00
|
|
|
|
2020-05-14 17:31:06 +02:00
|
|
|
error: declaration of an `unsafe` function
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:37:1
|
2020-05-14 17:31:06 +02:00
|
|
|
|
|
|
|
|
LL | unsafe fn baz() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-08-08 14:28:26 +02:00
|
|
|
error: declaration of an `unsafe` trait
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:38: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:39: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:42: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:43: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:44: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:48: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:49: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:79: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:85: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:89: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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:100: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
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2020-05-14 17:31:06 +02:00
|
|
|
error: declaration of a `no_mangle` function
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:21:25
|
2020-05-14 17:31:06 +02:00
|
|
|
|
|
|
|
|
LL | #[no_mangle] fn foo() {}
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-14 17:31:06 +02:00
|
|
|
...
|
|
|
|
LL | unsafe_in_macro!()
|
|
|
|
| ------------------ in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: declaration of a `no_mangle` static
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:22:29
|
2020-05-14 17:31:06 +02:00
|
|
|
|
|
|
|
|
LL | #[no_mangle] static FOO: u32 = 5;
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-14 17:31:06 +02:00
|
|
|
...
|
|
|
|
LL | unsafe_in_macro!()
|
|
|
|
| ------------------ in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
2020-05-15 17:36:19 +02:00
|
|
|
error: declaration of a function with `export_name`
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:23:35
|
2020-05-15 17:36:19 +02:00
|
|
|
|
|
|
|
|
LL | #[export_name = "bar"] fn bar() {}
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-15 17:36:19 +02:00
|
|
|
...
|
|
|
|
LL | unsafe_in_macro!()
|
|
|
|
| ------------------ in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: declaration of a static with `export_name`
|
2020-06-20 13:31:24 +02:00
|
|
|
--> $DIR/lint-unsafe-code.rs:25:39
|
2020-05-15 17:36:19 +02:00
|
|
|
|
|
|
|
|
LL | #[export_name = "BAR"] static BAR: u32 = 5;
|
2020-06-20 13:31:24 +02:00
|
|
|
| ^^^
|
2020-05-15 17:36:19 +02:00
|
|
|
...
|
|
|
|
LL | unsafe_in_macro!()
|
|
|
|
| ------------------ in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in a 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
|
2020-05-15 17:36:19 +02:00
|
|
|
--> $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
|
2019-12-16 15:56:47 +02:00
|
|
|
|
|
|
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-05-15 17:36:19 +02:00
|
|
|
error: aborting due to 22 previous errors
|
2018-08-08 14:28:26 +02:00
|
|
|
|