summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-assign-to-enum.rs
blob: d7770a30d7565f455cecaa0693a8dfa3d056e497 (plain)
1
2
3
4
5
6
enum foo = int;

fn main() {
    let x = foo(3);
    *x = 4; //~ ERROR assigning to enum content
}