mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
16 lines
392 B
Rust
16 lines
392 B
Rust
// 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");
|
|
}
|