diff options
Diffstat (limited to 'tests/ui/range')
-rw-r--r-- | tests/ui/range/issue-54505-no-std.rs | 6 | ||||
-rw-r--r-- | tests/ui/range/issue-54505-no-std.stderr | 14 | ||||
-rw-r--r-- | tests/ui/range/range-1.stderr | 2 |
3 files changed, 5 insertions, 17 deletions
diff --git a/tests/ui/range/issue-54505-no-std.rs b/tests/ui/range/issue-54505-no-std.rs index db455fada..a15956853 100644 --- a/tests/ui/range/issue-54505-no-std.rs +++ b/tests/ui/range/issue-54505-no-std.rs @@ -17,9 +17,9 @@ extern "C" fn eh_personality() {} static EH_CATCH_TYPEINFO: u8 = 0; #[panic_handler] -fn panic_handler() {} -//~^ ERROR return type should be `!` -//~| ERROR function should have one argument +fn panic_handler(_: &core::panic::PanicInfo) -> ! { + unimplemented!(); +} // take a reference to any built-in range fn take_range(_r: &impl RangeBounds<i8>) {} diff --git a/tests/ui/range/issue-54505-no-std.stderr b/tests/ui/range/issue-54505-no-std.stderr index 13563d194..1694d514f 100644 --- a/tests/ui/range/issue-54505-no-std.stderr +++ b/tests/ui/range/issue-54505-no-std.stderr @@ -1,15 +1,3 @@ -error: return type should be `!` - --> $DIR/issue-54505-no-std.rs:20:20 - | -LL | fn panic_handler() {} - | ^ - -error: function should have one argument - --> $DIR/issue-54505-no-std.rs:20:1 - | -LL | fn panic_handler() {} - | ^^^^^^^^^^^^^^^^^^ - error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:29:16 | @@ -130,6 +118,6 @@ help: consider borrowing here LL | take_range(&(..=42)); | ++ + -error: aborting due to 8 previous errors +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/range/range-1.stderr b/tests/ui/range/range-1.stderr index 277d9b268..96c1ffb2f 100644 --- a/tests/ui/range/range-1.stderr +++ b/tests/ui/range/range-1.stderr @@ -19,7 +19,7 @@ LL | for i in false..true {} i64 i128 usize - and 5 others + and 8 others = note: required for `std::ops::Range<bool>` to implement `Iterator` = note: required for `std::ops::Range<bool>` to implement `IntoIterator` |