rust/tests/ui/nll/issue-51244.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
142 B
Rust
Raw Normal View History

2018-06-14 01:12:50 +00:00
fn main() {
let ref my_ref @ _ = 0;
2018-07-12 20:11:47 +00:00
*my_ref = 0;
//~^ ERROR cannot assign to `*my_ref`, which is behind a `&` reference [E0594]
2018-06-14 01:12:50 +00:00
}