1
Fork 0

Don't unwrap the result of span_to_snippet

It can return `Err` due to macros being expanded across crates or
files.
This commit is contained in:
Matthew Jasper 2019-08-24 18:25:34 +01:00
parent 478464570e
commit 365ff62fca
5 changed files with 90 additions and 43 deletions

View file

@ -0,0 +1,15 @@
error[E0507]: cannot move out of static item `D`
--> $DIR/move-error-snippets.rs:16:18
|
LL | | #[macro_use]
| |__________________^ move occurs because `D` has type `A`, which does not implement the `Copy` trait
...
LL | aaa!(D);
| __________________^
...
LL | sss!();
| ------- in this macro invocation
error: aborting due to previous error
For more information about this error, try `rustc --explain E0507`.