about summary refs log tree commit diff
path: root/src/test/ui/borrowck/move-error-snippets.rs
diff options
context:
space:
mode:
authorBaoshan <pangbw@gmail.com>2019-09-01 17:52:09 -0700
committerGitHub <noreply@github.com>2019-09-01 17:52:09 -0700
commitd5ef9df032ec32c48d6c59050735352c48ff16f8 (patch)
tree31a87971a84ffc967645099773910d6498d0cb0b /src/test/ui/borrowck/move-error-snippets.rs
parent7726b54c059db0759e9725a58e222118eacec6d9 (diff)
parentdfd43f0fdd4e6969c7d82c0670d70bf305fbccf8 (diff)
downloadrust-d5ef9df032ec32c48d6c59050735352c48ff16f8.tar.gz
rust-d5ef9df032ec32c48d6c59050735352c48ff16f8.zip
Merge pull request #13 from rust-lang/master
sync with rust-lang/rust
Diffstat (limited to 'src/test/ui/borrowck/move-error-snippets.rs')
-rw-r--r--src/test/ui/borrowck/move-error-snippets.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/borrowck/move-error-snippets.rs b/src/test/ui/borrowck/move-error-snippets.rs
new file mode 100644
index 00000000000..64f95653828
--- /dev/null
+++ b/src/test/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() {}