3 #![allow(dead_code, unused_variables)]
4 #![warn(clippy::string_lit_as_bytes)]
6 fn str_lit_as_bytes() {
7 let bs = b"hello there";
9 let bs = br###"raw string with three ### in it and some " ""###;
11 // no warning, because this cannot be written as a byte string literal:
12 let ubs = "☃".as_bytes();
14 let strify = stringify!(foobar).as_bytes();
16 let includestr = include_bytes!("entry.rs");