about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-03 22:05:55 +0000
committerbors <bors@rust-lang.org>2019-06-03 22:05:55 +0000
commite22b7a3eef962b1314d344ba7b2f27c986320b32 (patch)
treeb7b72745a3356825989af17c2dc079a7d378304f /src/test/ui/thinlto
parent6ffb8f53ee1cb0903f9df7d2fdb37ad06d748566 (diff)
parentd7e0834c5f173c9ee58ccc1858e3ecff021c9f33 (diff)
downloadrust-e22b7a3eef962b1314d344ba7b2f27c986320b32.tar.gz
rust-e22b7a3eef962b1314d344ba7b2f27c986320b32.zip
Auto merge of #59148 - lcnr:unchecked_maths, r=eddyb
add support for unchecked math

add compiler support for
```rust
/// Returns the result of an unchecked addition, resulting in
/// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
pub fn unchecked_add<T>(x: T, y: T) -> T;

/// Returns the result of an unchecked substraction, resulting in
/// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
pub fn unchecked_sub<T>(x: T, y: T) -> T;

/// Returns the result of an unchecked multiplication, resulting in
/// undefined behavior when `x * y > T::max_value()` or `x * y < T::min_value()`.
pub fn unchecked_mul<T>(x: T, y: T) -> T;
```

cc https://github.com/rust-lang/rfcs/issues/2508
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions