Skip to content

Commit 29c128a

Browse files
committed
compiletest: trim edition before passing as flag
This makes `edition: 2021` work instead of the ugly `edition:2021` one has to write.
1 parent 9fb32dc commit 29c128a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/ui/async-await/async-await.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#![allow(unused)]
88

9-
// edition:2018
9+
// edition: 2018
1010
// aux-build:arc_wake.rs
1111

1212
extern crate arc_wake;

src/tools/compiletest/src/header.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ impl TestProps {
294294
}
295295

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

0 commit comments

Comments
 (0)