diff options
Diffstat (limited to 'tests/ui/nll/issue-51244.rs')
-rw-r--r-- | tests/ui/nll/issue-51244.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/nll/issue-51244.rs b/tests/ui/nll/issue-51244.rs new file mode 100644 index 000000000..c4cbee675 --- /dev/null +++ b/tests/ui/nll/issue-51244.rs @@ -0,0 +1,5 @@ +fn main() { + let ref my_ref @ _ = 0; + *my_ref = 0; + //~^ ERROR cannot assign to `*my_ref`, which is behind a `&` reference [E0594] +} |