Closed
Description
fn main() {
let a = -1+2isize;
let _b = a<<(1isize-1);
let _c = a<<(a+-1);
let _d = a<<(1isize+-1);
}
Produces:
<anon>:5:25: 5:27 error: unary negation of unsigned integers may be removed in the future
<anon>:5 let _d = a<<(1isize+-1);
^~
error: aborting due to previous error
I would expect no error.
I think the error message is coming out of eval_const_expr_with_substs
.
Metadata
Metadata
Assignees
Labels
No labels