diff options
| author | bors <bors@rust-lang.org> | 2021-05-01 09:59:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-01 09:59:54 +0000 |
| commit | fed59d669c5ca3c0e9c39dcb1f6510b5876ede64 (patch) | |
| tree | 71be961123cb9718153613d9a53c138f2a409075 /compiler/rustc_codegen_cranelift/example/std_example.rs | |
| parent | 1c2c6b670023efda0fea8e1837f9542d3ed12f5d (diff) | |
| parent | 6af045f00a3bf7d34a2dcd84d1f89e2b5fef0f36 (diff) | |
| download | rust-fed59d669c5ca3c0e9c39dcb1f6510b5876ede64.tar.gz rust-fed59d669c5ca3c0e9c39dcb1f6510b5876ede64.zip | |
Auto merge of #84786 - JohnTitor:rollup-j5omx6f, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #84601 (rustdoc: Only store locations in Cache::extern_locations and calculate the other info on-demand) - #84704 (platform-support.md: Update for consistency with Target Tier Policy) - #84724 (Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None) - #84740 (Reset the docs' copy path button after 1 second) - #84749 (Sync `rustc_codegen_cranelift`) - #84756 (Add a ToC to the Target Tier Policy documentation) - #84765 (Update cargo) - #84774 (Fix misspelling) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/example/std_example.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs index 015bbdfed46..77ba72df8ef 100644 --- a/compiler/rustc_codegen_cranelift/example/std_example.rs +++ b/compiler/rustc_codegen_cranelift/example/std_example.rs @@ -48,6 +48,8 @@ fn main() { assert_eq!(2.3f32.copysign(-1.0), -2.3f32); println!("{}", 2.3f32.powf(2.0)); + assert_eq!(i64::MAX.checked_mul(2), None); + assert_eq!(-128i8, (-128i8).saturating_sub(1)); assert_eq!(127i8, 127i8.saturating_sub(-128)); assert_eq!(-128i8, (-128i8).saturating_add(-128)); @@ -84,6 +86,7 @@ fn main() { assert_eq!(houndred_i128 as f64, 100.0); assert_eq!(houndred_f32 as i128, 100); assert_eq!(houndred_f64 as i128, 100); + assert_eq!(1u128.rotate_left(2), 4); // Test signed 128bit comparing let max = usize::MAX as i128; |
