Skip to content

Commit 4f027a5

Browse files
committed
Add FIXMEs for some existing directive-handling concerns
1 parent 946ec50 commit 4f027a5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/tools/compiletest/src/directives.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,8 @@ impl EditionRange {
14621462
fn split_flags(flags: &str) -> Vec<String> {
14631463
// Individual flags can be single-quoted to preserve spaces; see
14641464
// <https://github.com/rust-lang/rust/pull/115948/commits/957c5db6>.
1465+
// FIXME(#147955): Replace this ad-hoc quoting with an escape/quote system that
1466+
// is closer to what actual shells do, so that it's more flexible and familiar.
14651467
flags
14661468
.split('\'')
14671469
.enumerate()

src/tools/compiletest/src/directives/handlers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ fn make_directive_handlers_map() -> HashMap<&'static str, Handler> {
8181
handler(COMPILE_FLAGS, |config, ln, props| {
8282
if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) {
8383
let flags = split_flags(&flags);
84+
// FIXME(#147955): Extract and unify this with other handlers that
85+
// check compiler flags, e.g. MINICORE_COMPILE_FLAGS.
8486
for (i, flag) in flags.iter().enumerate() {
8587
if flag == "--edition" || flag.starts_with("--edition=") {
8688
panic!("you must use `//@ edition` to configure the edition");
@@ -327,6 +329,8 @@ fn make_directive_handlers_map() -> HashMap<&'static str, Handler> {
327329
handler(MINICORE_COMPILE_FLAGS, |config, ln, props| {
328330
if let Some(flags) = config.parse_name_value_directive(ln, MINICORE_COMPILE_FLAGS) {
329331
let flags = split_flags(&flags);
332+
// FIXME(#147955): Extract and unify this with other handlers that
333+
// check compiler flags, e.g. COMPILE_FLAGS.
330334
for flag in &flags {
331335
if flag == "--edition" || flag.starts_with("--edition=") {
332336
panic!("you must use `//@ edition` to configure the edition");

0 commit comments

Comments
 (0)