2018-08-08 07:28:26 -05:00
|
|
|
error: declaration of an `unsafe` function
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:23:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn baz() {} //~ ERROR: declaration of an `unsafe` function
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:3:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(unsafe_code)]
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: declaration of an `unsafe` trait
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:24:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe trait Foo {} //~ ERROR: declaration of an `unsafe` trait
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` trait
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:25:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe impl Foo for Bar {} //~ ERROR: implementation of an `unsafe` trait
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: declaration of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:28:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn baz(&self); //~ ERROR: declaration of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:29:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn provided(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:30:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn provided_override(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:34:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn baz(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:35:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn provided_override(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:54:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn provided_override(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:65:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn provided(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:71:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn provided(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: implementation of an `unsafe` method
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:75:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe fn baz(&self) {} //~ ERROR: implementation of an `unsafe` method
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of an `unsafe` block
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:86:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe {} //~ ERROR: usage of an `unsafe` block
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of an `unsafe` block
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unsafe-code.rs:19:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | unsafe {} //~ ERROR: usage of an `unsafe` block
|
|
|
|
| ^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | unsafe_in_macro!()
|
|
|
|
| ------------------ in this macro invocation
|
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|