This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
58e901b6fd
rust
/
tests
/
ui
/
numbers-arithmetic
/
promoted_overflow_opt.rs
9 lines
103 B
Rust
Raw
Normal View
History
Unescape
Escape
Add `// run-pass` annotations to all the tests under `ui/run-pass/`. (I may have accidentally added it to some auxilliary crates as well; my emacs-macro-based methodology was pretty crude.)
2018-08-30 14:18:55 +02:00
// run-pass
Release mode overflows should not cause const eval to error
2018-05-17 12:07:00 +02:00
// compile-flags: -O
fn
main
(
)
{
let
x
=
&
(
0
u32
-
1
)
;
Migrate to numeric associated consts
2020-06-02 07:59:11 +00:00
assert_eq!
(
*
x
,
u32
::
MAX
)
Release mode overflows should not cause const eval to error
2018-05-17 12:07:00 +02:00
}
Copy permalink