From 29c128ad11abad667f8067cea26ddedb39075866 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Mon, 11 Jul 2022 16:41:32 +0000 Subject: [PATCH] compiletest: trim edition before passing as flag This makes `edition: 2021` work instead of the ugly `edition:2021` one has to write. --- src/test/ui/async-await/async-await.rs | 2 +- src/tools/compiletest/src/header.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/ui/async-await/async-await.rs b/src/test/ui/async-await/async-await.rs index 3d22025bf286a..9cabf16f8bba9 100644 --- a/src/test/ui/async-await/async-await.rs +++ b/src/test/ui/async-await/async-await.rs @@ -6,7 +6,7 @@ #![allow(unused)] -// edition:2018 +// edition: 2018 // aux-build:arc_wake.rs extern crate arc_wake; diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 7cf4a88c47043..21d685861716d 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -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; }