From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/macros/macro_rules-unmatchable-literals.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/macros/macro_rules-unmatchable-literals.rs (limited to 'tests/ui/macros/macro_rules-unmatchable-literals.rs') diff --git a/tests/ui/macros/macro_rules-unmatchable-literals.rs b/tests/ui/macros/macro_rules-unmatchable-literals.rs new file mode 100644 index 000000000..bde0fe1a0 --- /dev/null +++ b/tests/ui/macros/macro_rules-unmatchable-literals.rs @@ -0,0 +1,14 @@ +// Pinning tests for things that don't work to make sure we notice if that changes + +#![crate_type = "lib"] + +macro_rules! octal_with_bad_digit { + ( 0o1238 ) => {}; //~ ERROR invalid digit +} + +macro_rules! binary_with_bad_digit { + ( 0b012 ) => {}; //~ ERROR invalid digit +} + +// This can't happen for Hex and Decimal as things like `123A` and `0xFFG` +// get treated as unknown *suffixes*, rather than digits. -- cgit v1.2.3