diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-06-02 10:57:01 +0200 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-06-02 11:29:27 +0200 |
| commit | a5f7d44405146a7cc5dadd65601c8d71546e382f (patch) | |
| tree | 1f09146eea35b1c4e3bf25356687d3f8bc4787ea | |
| parent | 4d08223c054cf5a56d9761ca925fd46ffebe7115 (diff) | |
| download | rust-a5f7d44405146a7cc5dadd65601c8d71546e382f.tar.gz rust-a5f7d44405146a7cc5dadd65601c8d71546e382f.zip | |
add test for 141764
| -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! {} |
