blob: 6e3d8251fc4f83e17858e222f3018e99f92cb271 [file] [log] [blame]
//! Test that occurs check prevents direct self-reference in variable assignment.
//!
//! Regression test for <https://github.com/rust-lang/rust/issues/768>.
fn main() {
let f;
f = Box::new(f);
//~^ ERROR overflow assigning `Box<_>` to `_`
}