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-13 20:12:50 -05:00
fn main() {
let ref my_ref @ _ = 0;
2018-07-12 15:11:47 -05:00
*my_ref = 0;
//~^ ERROR cannot assign to `*my_ref`, which is behind a `&` reference [E0594]
2018-06-13 20:12:50 -05:00
}