diff options
Diffstat (limited to 'tests/mir-opt/deduplicate_blocks.rs')
-rw-r--r-- | tests/mir-opt/deduplicate_blocks.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/mir-opt/deduplicate_blocks.rs b/tests/mir-opt/deduplicate_blocks.rs new file mode 100644 index 000000000..2b9eed99e --- /dev/null +++ b/tests/mir-opt/deduplicate_blocks.rs @@ -0,0 +1,15 @@ +// unit-test: DeduplicateBlocks + +// EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff +pub const fn is_line_doc_comment_2(s: &str) -> bool { + match s.as_bytes() { + [b'/', b'/', b'/', b'/', ..] => false, + [b'/', b'/', b'/', ..] => true, + [b'/', b'/', b'!', ..] => true, + _ => false, + } +} + +fn main() { + is_line_doc_comment_2("asd"); +} |