}
pub fn use_self() {
- struct Foo {}
+ struct Foo;
impl Foo {
fn new() -> Foo {
true as u8
}
+fn err_expect() {
+ let x: Result<u32, &str> = Ok(10);
+ x.err().expect("Testing expect_err");
+}
+
+fn cast_abs_to_unsigned() {
+ let x: i32 = 10;
+ assert_eq!(10u32, x.abs() as u32);
+}
+
fn main() {
filter_map_next();
checked_conversion();
missing_const_for_fn();
unnest_or_patterns();
int_from_bool();
+ err_expect();
+ cast_abs_to_unsigned();
}
mod just_under_msrv {