From 1d9757cd849989691becceb15e0e7c2ec37a3452 Mon Sep 17 00:00:00 2001 From: jdonszelmann Date: Mon, 20 May 2024 09:18:49 +0200 Subject: [PATCH] add todo test for feature gate --- .../feature-gate-global-registration.rs | 4 +++- .../feature-gate-global-registration.stderr | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/ui/feature-gates/feature-gate-global-registration.stderr diff --git a/tests/ui/feature-gates/feature-gate-global-registration.rs b/tests/ui/feature-gates/feature-gate-global-registration.rs index 77072727ec50..6ac367120903 100644 --- a/tests/ui/feature-gates/feature-gate-global-registration.rs +++ b/tests/ui/feature-gates/feature-gate-global-registration.rs @@ -1 +1,3 @@ -//! WIP +todo!(); //~ ERROR + +fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-global-registration.stderr b/tests/ui/feature-gates/feature-gate-global-registration.stderr new file mode 100644 index 000000000000..70538ae6f317 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-global-registration.stderr @@ -0,0 +1,13 @@ +error: expected one of `!` or `::`, found `(` + --> $DIR/feature-gate-global-registration.rs:1:1 + | +LL | todo!(); + | ^^^^^^^ + | | + | expected one of `!` or `::` + | in this macro invocation + | + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 1 previous error +