Constness -> enum Const { Yes(Span), No }

Same idea for `Unsafety` & use new span for better diagnostics.
This commit is contained in:
Mazdak Farrokhzad 2020-01-30 02:42:33 +01:00
parent 2e6eaceede
commit e839b2ec84
40 changed files with 238 additions and 212 deletions

View file

@ -2,7 +2,9 @@ error[E0197]: inherent impls cannot be unsafe
--> $DIR/E0197.rs:3:1
|
LL | unsafe impl Foo { }
| ^^^^^^^^^^^^^^^^^^^
| ------^^^^^^^^^^^^^
| |
| unsafe because of this
error: aborting due to previous error

View file

@ -2,7 +2,9 @@ error[E0198]: negative impls cannot be unsafe
--> $DIR/E0198.rs:5:1
|
LL | unsafe impl !Send for Foo { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ------^^^^^^^^^^^^^^^^^^^^^^^
| |
| unsafe because of this
error: aborting due to previous error