@@ -26,22 +26,13 @@ LL | assert!(true, "true message");
26
26
= help: remove it
27
27
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
28
28
29
- error: `assert!(false, "false message" )` should probably be replaced
29
+ error: `assert!(false, $crate::const_format_args!($($t)+) )` should probably be replaced
30
30
--> $DIR/assertions_on_constants.rs:14:5
31
31
|
32
32
LL | assert!(false, "false message");
33
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
34
|
35
- = help: use `panic!("false message")` or `unreachable!("false message")`
36
- = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
37
-
38
- error: `assert!(false, msg.to_uppercase())` should probably be replaced
39
- --> $DIR/assertions_on_constants.rs:17:5
40
- |
41
- LL | assert!(false, msg.to_uppercase());
42
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43
- |
44
- = help: use `panic!(msg.to_uppercase())` or `unreachable!(msg.to_uppercase())`
35
+ = help: use `panic!($crate::const_format_args!($($t)+))` or `unreachable!($crate::const_format_args!($($t)+))`
45
36
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
46
37
47
38
error: `assert!(true)` will be optimized out by the compiler
@@ -62,13 +53,13 @@ LL | assert!(C);
62
53
= help: use `panic!()` or `unreachable!()`
63
54
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
64
55
65
- error: `assert!(false, "C message" )` should probably be replaced
56
+ error: `assert!(false, $crate::const_format_args!($($t)+) )` should probably be replaced
66
57
--> $DIR/assertions_on_constants.rs:24:5
67
58
|
68
59
LL | assert!(C, "C message");
69
60
| ^^^^^^^^^^^^^^^^^^^^^^^
70
61
|
71
- = help: use `panic!("C message") ` or `unreachable!("C message" )`
62
+ = help: use `panic!($crate::const_format_args!($($t)+)) ` or `unreachable!($crate::const_format_args!($($t)+) )`
72
63
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
73
64
74
65
error: `debug_assert!(true)` will be optimized out by the compiler
@@ -80,5 +71,5 @@ LL | debug_assert!(true);
80
71
= help: remove it
81
72
= note: this error originates in the macro `$crate::assert` (in Nightly builds, run with -Z macro-backtrace for more info)
82
73
83
- error: aborting due to 9 previous errors
74
+ error: aborting due to 8 previous errors
84
75
0 commit comments