Skip to content

Commit

Permalink
a stealing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer committed Jan 30, 2024
1 parent 06138b5 commit aa14fb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/rust-ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ impl Error {
|| Self::Fail
}
}

// error: The THIR body of item DefId(0:7 ~ rust_ast[d581]::main::_::{constant#1}) was stolen.

const _MY_CONST: bool = true;

pub fn main() {
const _: [(); 1] = [(); _MY_CONST as usize];
}

0 comments on commit aa14fb1

Please sign in to comment.