From d2b1f94f05ca09571e264f9f044a48ced26433f9 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 27 Nov 2023 14:48:11 +0100 Subject: [PATCH] Add feature gate test for `--env` flag --- tests/ui/feature-gates/env-flag.rs | 3 +++ tests/ui/feature-gates/env-flag.stderr | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 tests/ui/feature-gates/env-flag.rs create mode 100644 tests/ui/feature-gates/env-flag.stderr diff --git a/tests/ui/feature-gates/env-flag.rs b/tests/ui/feature-gates/env-flag.rs new file mode 100644 index 00000000000..9dfda2584fb --- /dev/null +++ b/tests/ui/feature-gates/env-flag.rs @@ -0,0 +1,3 @@ +// compile-flags: --env A=B + +fn main() {} diff --git a/tests/ui/feature-gates/env-flag.stderr b/tests/ui/feature-gates/env-flag.stderr new file mode 100644 index 00000000000..5cb18cef9fb --- /dev/null +++ b/tests/ui/feature-gates/env-flag.stderr @@ -0,0 +1,2 @@ +error: the `-Z unstable-options` flag must also be passed to enable the flag `env` +