2022-06-21 08:56:26 -05:00
|
|
|
// check-pass
|
|
|
|
// compile-flags: -Z unpretty=expanded
|
|
|
|
|
2023-05-24 19:15:50 -05:00
|
|
|
#![feature(core_intrinsics, generic_assert)]
|
2022-06-21 08:56:26 -05:00
|
|
|
|
|
|
|
fn arbitrary_consuming_method_for_demonstration_purposes() {
|
|
|
|
let elem = 1i32;
|
|
|
|
assert!(elem as usize);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn addr_of() {
|
|
|
|
let elem = 1i32;
|
|
|
|
assert!(&elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn binary() {
|
|
|
|
let elem = 1i32;
|
|
|
|
assert!(elem == 1);
|
|
|
|
assert!(elem >= 1);
|
|
|
|
assert!(elem > 0);
|
|
|
|
assert!(elem < 3);
|
|
|
|
assert!(elem <= 3);
|
|
|
|
assert!(elem != 3);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn unary() {
|
|
|
|
let elem = &1i32;
|
|
|
|
assert!(*elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|