fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: panic message contains a brace 2 --> $DIR/non-fmt-panic.rs:13:29 3 | 4LL | panic!("here's a brace: {"); 5 | ^ 6 | 7 = note: this message is not used as a format string, but will be in Rust 2021 8 = note: `#[warn(non_fmt_panics)]` on by default 9help: add a "{}" format string to use the message literally 10 | 11LL | panic!("{}", "here's a brace: {"); 12 | +++++ 13 14warning: panic message contains a brace 15 --> $DIR/non-fmt-panic.rs:14:35 16 | 17LL | unreachable!("here's a brace: {"); 18 | ^ 19 | 20 = note: this message is not used as a format string, but will be in Rust 2021 21help: add a "{}" format string to use the message literally 22 | 23LL | unreachable!("{}", "here's a brace: {"); 24 | +++++ 25 26warning: panic message contains a brace 27 --> $DIR/non-fmt-panic.rs:15:31 28 | 29LL | std::panic!("another one: }"); 30 | ^ 31 | 32 = note: this message is not used as a format string, but will be in Rust 2021 33help: add a "{}" format string to use the message literally 34 | 35LL | std::panic!("{}", "another one: }"); 36 | +++++ 37 38warning: panic message contains an unused formatting placeholder 39 --> $DIR/non-fmt-panic.rs:16:25 40 | 41LL | core::panic!("Hello {}"); 42 | ^^ 43 | 44 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021 45help: add the missing argument 46 | 47LL | core::panic!("Hello {}", ...); 48 | +++++ 49help: or add a "{}" format string to use the message literally 50 | 51LL | core::panic!("{}", "Hello {}"); 52 | +++++ 53 54warning: panic message contains unused formatting placeholders 55 --> $DIR/non-fmt-panic.rs:17:21 56 | 57LL | assert!(false, "{:03x} {test} bla"); 58 | ^^^^^^ ^^^^^^ 59 | 60 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021 61help: add the missing arguments 62 | 63LL | assert!(false, "{:03x} {test} bla", ...); 64 | +++++ 65help: or add a "{}" format string to use the message literally 66 | 67LL | assert!(false, "{}", "{:03x} {test} bla"); 68 | +++++ 69 70warning: panic message is not a string literal 71 --> $DIR/non-fmt-panic.rs:19:20 72 | 73LL | assert!(false, S); 74 | ^ 75 | 76 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 77 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 78help: add a "{}" format string to `Display` the message 79 | 80LL | assert!(false, "{}", S); 81 | +++++ 82 83warning: panic message is not a string literal 84 --> $DIR/non-fmt-panic.rs:21:20 85 | 86LL | assert!(false, 123); 87 | ^^^ 88 | 89 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 90 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 91help: add a "{}" format string to `Display` the message 92 | 93LL | assert!(false, "{}", 123); 94 | +++++ 95 96warning: panic message is not a string literal 97 --> $DIR/non-fmt-panic.rs:23:20 98 | 99LL | assert!(false, Some(123)); 100 | ^^^^^^^^^ 101 | 102 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 103 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 104help: add a "{:?}" format string to use the `Debug` implementation of `Option<i32>` 105 | 106LL | assert!(false, "{:?}", Some(123)); 107 | +++++++ 108 109warning: panic message contains braces 110 --> $DIR/non-fmt-panic.rs:25:27 111 | 112LL | debug_assert!(false, "{{}} bla"); 113 | ^^^^ 114 | 115 = note: this message is not used as a format string, but will be in Rust 2021 116help: add a "{}" format string to use the message literally 117 | 118LL | debug_assert!(false, "{}", "{{}} bla"); 119 | +++++ 120 121warning: panic message is not a string literal 122 --> $DIR/non-fmt-panic.rs:26:12 123 | 124LL | panic!(C); 125 | ^ 126 | 127 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 128 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 129help: add a "{}" format string to `Display` the message 130 | 131LL | panic!("{}", C); 132 | +++++ 133 134warning: panic message is not a string literal 135 --> $DIR/non-fmt-panic.rs:27:12 136 | 137LL | panic!(S); 138 | ^ 139 | 140 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 141 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 142help: add a "{}" format string to `Display` the message 143 | 144LL | panic!("{}", S); 145 | +++++ 146 147warning: panic message is not a string literal 148 --> $DIR/non-fmt-panic.rs:28:18 149 | 150LL | unreachable!(S); 151 | ^ 152 | 153 = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021 154 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 155help: add a "{}" format string to `Display` the message 156 | 157LL | unreachable!("{}", S); 158 | +++++ 159 160warning: panic message is not a string literal 161 --> $DIR/non-fmt-panic.rs:29:18 162 | 163LL | unreachable!(S); 164 | ^ 165 | 166 = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021 167 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 168help: add a "{}" format string to `Display` the message 169 | 170LL | unreachable!("{}", S); 171 | +++++ 172 173warning: panic message is not a string literal 174 --> $DIR/non-fmt-panic.rs:30:17 175 | 176LL | std::panic!(123); 177 | ^^^ 178 | 179 = note: this usage of `std::panic!()` is deprecated; it will be a hard error in Rust 2021 180 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 181help: add a "{}" format string to `Display` the message 182 | 183LL | std::panic!("{}", 123); 184 | +++++ 185help: or use std::panic::panic_any instead 186 | 187LL | std::panic::panic_any(123); 188 | ~~~~~~~~~~~~~~~~~~~~~ 189 190warning: panic message is not a string literal 191 --> $DIR/non-fmt-panic.rs:31:18 192 | 193LL | core::panic!(&*"abc"); 194 | ^^^^^^^ 195 | 196 = note: this usage of `core::panic!()` is deprecated; it will be a hard error in Rust 2021 197 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 198help: add a "{}" format string to `Display` the message 199 | 200LL | core::panic!("{}", &*"abc"); 201 | +++++ 202 203warning: panic message is not a string literal 204 --> $DIR/non-fmt-panic.rs:32:12 205 | 206LL | panic!(Some(123)); 207 | ^^^^^^^^^ 208 | 209 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 210 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 211help: add a "{:?}" format string to use the `Debug` implementation of `Option<i32>` 212 | 213LL | panic!("{:?}", Some(123)); 214 | +++++++ 215help: or use std::panic::panic_any instead 216 | 217LL | std::panic::panic_any(Some(123)); 218 | ~~~~~~~~~~~~~~~~~~~~~ 219 220warning: panic message contains an unused formatting placeholder 221 --> $DIR/non-fmt-panic.rs:33:12 222 | 223LL | panic!(concat!("{", "}")); 224 | ^^^^^^^^^^^^^^^^^ 225 | 226 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021 227help: add the missing argument 228 | 229LL | panic!(concat!("{", "}"), ...); 230 | +++++ 231help: or add a "{}" format string to use the message literally 232 | 233LL | panic!("{}", concat!("{", "}")); 234 | +++++ 235 236warning: panic message contains braces 237 --> $DIR/non-fmt-panic.rs:34:5 238 | 239LL | panic!(concat!("{", "{")); 240 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 241 | 242 = note: this message is not used as a format string, but will be in Rust 2021 243help: add a "{}" format string to use the message literally 244 | 245LL | panic!("{}", concat!("{", "{")); 246 | +++++ 247 248warning: panic message contains an unused formatting placeholder 249 --> $DIR/non-fmt-panic.rs:36:37 250 | 251LL | fancy_panic::fancy_panic!("test {} 123"); 252 | ^^ 253 | 254 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021 255 256warning: panic message is not a string literal 257 --> $DIR/non-fmt-panic.rs:46:12 258 | 259LL | panic!(a!()); 260 | ^^^^ 261 | 262 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 263 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 264help: add a "{}" format string to `Display` the message 265 | 266LL | panic!("{}", a!()); 267 | +++++ 268help: or use std::panic::panic_any instead 269 | 270LL | std::panic::panic_any(a!()); 271 | ~~~~~~~~~~~~~~~~~~~~~ 272 273warning: panic message is not a string literal 274 --> $DIR/non-fmt-panic.rs:47:18 275 | 276LL | unreachable!(a!()); 277 | ^^^^ 278 | 279 = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021 280 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 281help: add a "{}" format string to `Display` the message 282 | 283LL | unreachable!("{}", a!()); 284 | +++++ 285 286warning: panic message is not a string literal 287 --> $DIR/non-fmt-panic.rs:49:12 288 | 289LL | panic!(format!("{}", 1)); 290 | ^^^^^^^^^^^^^^^^ 291 | 292 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 293 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 294 = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here 295help: remove the `format!(..)` macro call 296 | 297LL - panic!(format!("{}", 1)); 298LL + panic!("{}", 1); 299 | 300 301warning: panic message is not a string literal 302 --> $DIR/non-fmt-panic.rs:50:18 303 | 304LL | unreachable!(format!("{}", 1)); 305 | ^^^^^^^^^^^^^^^^ 306 | 307 = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021 308 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 309 = note: the `unreachable!()` macro supports formatting, so there's no need for the `format!()` macro here 310help: remove the `format!(..)` macro call 311 | 312LL - unreachable!(format!("{}", 1)); 313LL + unreachable!("{}", 1); 314 | 315 316warning: panic message is not a string literal 317 --> $DIR/non-fmt-panic.rs:51:20 318 | 319LL | assert!(false, format!("{}", 1)); 320 | ^^^^^^^^^^^^^^^^ 321 | 322 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 323 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 324 = note: the `assert!()` macro supports formatting, so there's no need for the `format!()` macro here 325help: remove the `format!(..)` macro call 326 | 327LL - assert!(false, format!("{}", 1)); 328LL + assert!(false, "{}", 1); 329 | 330 331warning: panic message is not a string literal 332 --> $DIR/non-fmt-panic.rs:52:26 333 | 334LL | debug_assert!(false, format!("{}", 1)); 335 | ^^^^^^^^^^^^^^^^ 336 | 337 = note: this usage of `debug_assert!()` is deprecated; it will be a hard error in Rust 2021 338 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 339 = note: the `debug_assert!()` macro supports formatting, so there's no need for the `format!()` macro here 340help: remove the `format!(..)` macro call 341 | 342LL - debug_assert!(false, format!("{}", 1)); 343LL + debug_assert!(false, "{}", 1); 344 | 345 346warning: panic message is not a string literal 347 --> $DIR/non-fmt-panic.rs:54:12 348 | 349LL | panic![123]; 350 | ^^^ 351 | 352 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 353 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 354help: add a "{}" format string to `Display` the message 355 | 356LL | panic!["{}", 123]; 357 | +++++ 358help: or use std::panic::panic_any instead 359 | 360LL | std::panic::panic_any(123); 361 | ~~~~~~~~~~~~~~~~~~~~~~ ~ 362 363warning: panic message is not a string literal 364 --> $DIR/non-fmt-panic.rs:55:12 365 | 366LL | panic!{123}; 367 | ^^^ 368 | 369 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 370 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 371help: add a "{}" format string to `Display` the message 372 | 373LL | panic!{"{}", 123}; 374 | +++++ 375help: or use std::panic::panic_any instead 376 | 377LL | std::panic::panic_any(123); 378 | ~~~~~~~~~~~~~~~~~~~~~~ ~ 379 380warning: panic message is not a string literal 381 --> $DIR/non-fmt-panic.rs:72:12 382 | 383LL | panic!(v); 384 | ------ ^ 385 | | 386 | help: use std::panic::panic_any instead: `std::panic::panic_any` 387 | 388 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 389 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 390 391warning: panic message is not a string literal 392 --> $DIR/non-fmt-panic.rs:73:20 393 | 394LL | assert!(false, v); 395 | ^ 396 | 397 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 398 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 399 400warning: panic message is not a string literal 401 --> $DIR/non-fmt-panic.rs:77:12 402 | 403LL | panic!(v); 404 | ^ 405 | 406 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 407 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 408help: add a "{:?}" format string to use the `Debug` implementation of `T` 409 | 410LL | panic!("{:?}", v); 411 | +++++++ 412help: or use std::panic::panic_any instead 413 | 414LL | std::panic::panic_any(v); 415 | ~~~~~~~~~~~~~~~~~~~~~ 416 417warning: panic message is not a string literal 418 --> $DIR/non-fmt-panic.rs:78:20 419 | 420LL | assert!(false, v); 421 | ^ 422 | 423 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 424 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 425help: add a "{:?}" format string to use the `Debug` implementation of `T` 426 | 427LL | assert!(false, "{:?}", v); 428 | +++++++ 429 430warning: panic message is not a string literal 431 --> $DIR/non-fmt-panic.rs:82:12 432 | 433LL | panic!(v); 434 | ^ 435 | 436 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 437 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 438help: add a "{}" format string to `Display` the message 439 | 440LL | panic!("{}", v); 441 | +++++ 442help: or use std::panic::panic_any instead 443 | 444LL | std::panic::panic_any(v); 445 | ~~~~~~~~~~~~~~~~~~~~~ 446 447warning: panic message is not a string literal 448 --> $DIR/non-fmt-panic.rs:83:20 449 | 450LL | assert!(false, v); 451 | ^ 452 | 453 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 454 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 455help: add a "{}" format string to `Display` the message 456 | 457LL | assert!(false, "{}", v); 458 | +++++ 459 460warning: panic message is not a string literal 461 --> $DIR/non-fmt-panic.rs:87:12 462 | 463LL | panic!(v); 464 | ^ 465 | 466 = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 467 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 468help: add a "{}" format string to `Display` the message 469 | 470LL | panic!("{}", v); 471 | +++++ 472help: or use std::panic::panic_any instead 473 | 474LL | std::panic::panic_any(v); 475 | ~~~~~~~~~~~~~~~~~~~~~ 476 477warning: panic message is not a string literal 478 --> $DIR/non-fmt-panic.rs:88:20 479 | 480LL | assert!(false, v); 481 | ^ 482 | 483 = note: this usage of `assert!()` is deprecated; it will be a hard error in Rust 2021 484 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> 485help: add a "{}" format string to `Display` the message 486 | 487LL | assert!(false, "{}", v); 488 | +++++ 489 490warning: 35 warnings emitted 491