This website requires JavaScript.
Explore
Help
Register
Sign In
rust-lang
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Actions
1
Packages
Projects
Releases
Wiki
Activity
Files
14e59bb317c3c901bce83deb16ee9bfa5cc90e28
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
}
Reference in New Issue
Copy Permalink