Skip to content

Commit

Permalink
Rollup merge of rust-lang#99161 - fee1-dead-contrib:compile-test-edit…
Browse files Browse the repository at this point in the history
…ion-trim, r=jyn514

compiletest: trim edition before passing as flag

This makes `edition: 2021` work instead of the ugly
`edition:2021` one has to write.
  • Loading branch information
matthiaskrgr authored Jul 11, 2022
2 parents 5e223dc + 29c128a commit c05e277
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/async-await/async-await.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#![allow(unused)]

// edition:2018
// edition: 2018
// aux-build:arc_wake.rs

extern crate arc_wake;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl TestProps {
}

if let Some(edition) = config.parse_edition(ln) {
self.compile_flags.push(format!("--edition={}", edition));
self.compile_flags.push(format!("--edition={}", edition.trim()));
has_edition = true;
}

Expand Down

0 comments on commit c05e277

Please sign in to comment.