]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/range/issue-54505-no-std.rs
Ensure codegen_fn_attrs during collection.
[rust.git] / src / test / ui / range / issue-54505-no-std.rs
index ab1a025b521a95e93606bb0ce56613c9b322b684..9f378b4836e481bffed0cd8c575d3df3a491b08c 100644 (file)
@@ -1,5 +1,3 @@
-// error-pattern: `#[panic_handler]` function required, but not found
-
 // Regression test for #54505 - range borrowing suggestion had
 // incorrect syntax (missing parentheses).
 
@@ -18,6 +16,10 @@ extern "C" fn eh_personality() {}
 #[lang = "eh_catch_typeinfo"]
 static EH_CATCH_TYPEINFO: u8 = 0;
 
+#[panic_handler]
+fn panic_handler() {}
+//~^ ERROR return type should be `!`
+//~| ERROR function should have one argument
 
 // take a reference to any built-in range
 fn take_range(_r: &impl RangeBounds<i8>) {}