Commit c53b532
committed
Hack: do not expand arg <expr> within ensure_not_fmt_string_literal.
An attempt to side-step the stability gates that are claiming
that ensure_not_fmt_string_literal is expanding into uses of
format_args internals.
This attempt however did not work; this commit is only here for
historical purposs while I ask others for advice.
Here is the stack trace of the relevant error here:
```
---- [run-fail] run-fail/explicit-panic-msg.rs stdout ----
error: compilation failed!
status: exit code: 101
command: x86_64-apple-darwin/stage1/bin/rustc /Users/fklock/Dev/Mozilla/rust-panic/src/test/run-fail/explicit-panic-msg.rs -L x86_64-apple-darwin/test/run-fail/ --target=x86_64-apple-darwin -L x86_64-apple-darwin/test/run-fail/explicit-panic-msg.stage1-x86_64-apple-darwinlibaux -C prefer-dynamic -o x86_64-apple-darwin/test/run-fail/explicit-panic-msg.stage1-x86_64-apple-darwin --cfg rtopt --cfg debug -L x86_64-apple-darwin/rt
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
<std macros>:2:26: 2:57 error: use of unstable library feature 'core': internal to format_args!
<std macros>:2 $ crate:: fmt:: format ( format_args ! ( $ ( $ arg ) * ) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: in expansion of __unstable_rustc_ensure_not_fmt_string_literal!
<std macros>:4:1: 4:78 note: expansion site
<std macros>:1:1: 12:23 note: in expansion of panic!
/Users/fklock/Dev/Mozilla/rust-panic/src/test/run-fail/explicit-panic-msg.rs:18:5: 18:37 note: expansion site
<std macros>:2:26: 2:57 help: add #![feature(core)] to the crate attributes to enable
<std macros>:2:26: 2:57 error: use of unstable library feature 'core': internal to format_args!
<std macros>:2 $ crate:: fmt:: format ( format_args ! ( $ ( $ arg ) * ) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: in expansion of __unstable_rustc_ensure_not_fmt_string_literal!
<std macros>:4:1: 4:78 note: expansion site
<std macros>:1:1: 12:23 note: in expansion of panic!
/Users/fklock/Dev/Mozilla/rust-panic/src/test/run-fail/explicit-panic-msg.rs:18:5: 18:37 note: expansion site
<std macros>:2:26: 2:57 help: add #![feature(core)] to the crate attributes to enable
error: aborting due to 2 previous errors
------------------------------------------
thread '[run-fail] run-fail/explicit-panic-msg.rs' panicked at 'explicit panic', /Users/fklock/Dev/Mozilla/rust-panic/src/compiletest/runtest.rs:1499
failures:
[run-fail] run-fail/explicit-panic-msg.rs
```1 parent 8c0bead commit c53b532
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | | - | |
| 654 | + | |
| 655 | + | |
655 | 656 | | |
656 | 657 | | |
657 | 658 | | |
| |||
0 commit comments