This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-05-05 06:27:38 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
254bf6027d
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 12:18:55 +00:00
// run-pass
Release mode overflows should not cause const eval to error
2018-05-17 10:07:00 +00: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 10:07:00 +00:00
}
Reference in New Issue
Copy Permalink