]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/non-fmt-panic.fixed
Rollup merge of #91312 - terrarier2111:anon-const-ice, r=jackh726
[rust.git] / src / test / ui / non-fmt-panic.fixed
index 0f55f1ae817b1bddcb92ce58027529be1735a3ee..d226f4129aa826efd26360cc79fd940cb127a9fa 100644 (file)
@@ -65,16 +65,20 @@ fn main() {
 
 fn a<T: Send + 'static>(v: T) {
     std::panic::panic_any(v); //~ WARN panic message is not a string literal
+    assert!(false, v); //~ WARN panic message is not a string literal
 }
 
 fn b<T: std::fmt::Debug + Send + 'static>(v: T) {
     std::panic::panic_any(v); //~ WARN panic message is not a string literal
+    assert!(false, "{:?}", v); //~ WARN panic message is not a string literal
 }
 
 fn c<T: std::fmt::Display + Send + 'static>(v: T) {
     std::panic::panic_any(v); //~ WARN panic message is not a string literal
+    assert!(false, "{}", v); //~ WARN panic message is not a string literal
 }
 
 fn d<T: std::fmt::Display + std::fmt::Debug + Send + 'static>(v: T) {
     std::panic::panic_any(v); //~ WARN panic message is not a string literal
+    assert!(false, "{}", v); //~ WARN panic message is not a string literal
 }