diff options
| -rw-r--r-- | tests/ui/macros/auxiliary/borrowck-error-in-macro.rs | 10 | ||||
| -rw-r--r-- | tests/ui/macros/borrowck-error-in-macro.rs | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/macros/auxiliary/borrowck-error-in-macro.rs b/tests/ui/macros/auxiliary/borrowck-error-in-macro.rs new file mode 100644 index 00000000000..2d5f2bda2ed --- /dev/null +++ b/tests/ui/macros/auxiliary/borrowck-error-in-macro.rs @@ -0,0 +1,10 @@ +#[macro_export] +macro_rules! ice { + () => { + fn main() { + let d = &mut 0; + let c = || *d += 1; + c(); + } + }; +} diff --git a/tests/ui/macros/borrowck-error-in-macro.rs b/tests/ui/macros/borrowck-error-in-macro.rs new file mode 100644 index 00000000000..74764b1b3a3 --- /dev/null +++ b/tests/ui/macros/borrowck-error-in-macro.rs @@ -0,0 +1,5 @@ +//@ aux-build: borrowck-error-in-macro.rs + +extern crate borrowck_error_in_macro as a; + +a::ice! {} |
