diff options
Diffstat (limited to 'tests/ui/borrowck/move-error-snippets.rs')
-rw-r--r-- | tests/ui/borrowck/move-error-snippets.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/borrowck/move-error-snippets.rs b/tests/ui/borrowck/move-error-snippets.rs new file mode 100644 index 000000000..64f956538 --- /dev/null +++ b/tests/ui/borrowck/move-error-snippets.rs @@ -0,0 +1,23 @@ +// Test that we don't ICE after trying to construct a cross-file snippet #63800. + +// compile-flags: --test + +#[macro_use] +#[path = "move-error-snippets-ext.rs"] +mod move_error_snippets_ext; + +struct A; + +macro_rules! sss { + () => { + #[test] + fn fff() { + static D: A = A; + aaa!(D); //~ ERROR cannot move + } + }; +} + +sss!(); + +fn main() {} |