summary refs log tree commit diff
path: root/src/test/ui/panic-brace.stderr
blob: c2aa19c58066234c5d33cd77fe7f3a604e4d14bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
warning: panic message contains a brace
  --> $DIR/panic-brace.rs:11:29
   |
LL |     panic!("here's a brace: {");
   |                             ^
   |
   = note: `#[warn(non_fmt_panic)]` on by default
   = note: this message is not used as a format string, but will be in a future Rust edition
help: add a "{}" format string to use the message literally
   |
LL |     panic!("{}", "here's a brace: {");
   |            ^^^^^

warning: panic message contains a brace
  --> $DIR/panic-brace.rs:12:31
   |
LL |     std::panic!("another one: }");
   |                               ^
   |
   = note: this message is not used as a format string, but will be in a future Rust edition
help: add a "{}" format string to use the message literally
   |
LL |     std::panic!("{}", "another one: }");
   |                 ^^^^^

warning: panic message contains an unused formatting placeholder
  --> $DIR/panic-brace.rs:13:25
   |
LL |     core::panic!("Hello {}");
   |                         ^^
   |
   = note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
help: add the missing argument
   |
LL |     core::panic!("Hello {}", ...);
   |                            ^^^^^
help: or add a "{}" format string to use the message literally
   |
LL |     core::panic!("{}", "Hello {}");
   |                  ^^^^^

warning: panic message contains unused formatting placeholders
  --> $DIR/panic-brace.rs:14:21
   |
LL |     assert!(false, "{:03x} {test} bla");
   |                     ^^^^^^ ^^^^^^
   |
   = note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
help: add the missing arguments
   |
LL |     assert!(false, "{:03x} {test} bla", ...);
   |                                       ^^^^^
help: or add a "{}" format string to use the message literally
   |
LL |     assert!(false, "{}", "{:03x} {test} bla");
   |                    ^^^^^

warning: panic message contains braces
  --> $DIR/panic-brace.rs:16:27
   |
LL |     debug_assert!(false, "{{}} bla");
   |                           ^^^^
   |
   = note: this message is not used as a format string, but will be in a future Rust edition
help: add a "{}" format string to use the message literally
   |
LL |     debug_assert!(false, "{}", "{{}} bla");
   |                          ^^^^^

warning: panic message contains an unused formatting placeholder
  --> $DIR/panic-brace.rs:19:12
   |
LL |     panic!(concat!("{", "}"));
   |            ^^^^^^^^^^^^^^^^^
   |
   = note: this message is not used as a format string when given without arguments, but will be in a future Rust edition
help: add the missing argument
   |
LL |     panic!(concat!("{", "}"), ...);
   |                             ^^^^^
help: or add a "{}" format string to use the message literally
   |
LL |     panic!("{}", concat!("{", "}"));
   |            ^^^^^

warning: panic message contains braces
  --> $DIR/panic-brace.rs:20:5
   |
LL |     panic!(concat!("{", "{"));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this message is not used as a format string, but will be in a future Rust edition
help: add a "{}" format string to use the message literally
   |
LL |     panic!("{}", concat!("{", "{"));
   |            ^^^^^

warning: panic message contains an unused formatting placeholder
  --> $DIR/panic-brace.rs:22:37
   |
LL |     fancy_panic::fancy_panic!("test {} 123");
   |                                     ^^
   |
   = note: this message is not used as a format string when given without arguments, but will be in a future Rust edition

warning: 8 warnings emitted