diff options
Diffstat (limited to 'tests/ui/pattern/byte-string-inference.rs')
-rw-r--r-- | tests/ui/pattern/byte-string-inference.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/pattern/byte-string-inference.rs b/tests/ui/pattern/byte-string-inference.rs new file mode 100644 index 000000000..b1517de6b --- /dev/null +++ b/tests/ui/pattern/byte-string-inference.rs @@ -0,0 +1,15 @@ +// check-pass + +fn load<L>() -> Option<L> { + todo!() +} + +fn main() { + while let Some(tag) = load() { + match &tag { + b"NAME" => {} + b"DATA" => {} + _ => {} + } + } +} |