blob: c8d1479f1206daba3a9b4c3dcd0cd1cbb13800b0 [file] [log] [blame]
// run-rustfix
#![allow(dead_code, unused_variables)]
#![warn(clippy::string_lit_as_bytes)]
fn str_lit_as_bytes() {
let bs = b"hello there";
let bs = br###"raw string with 3# plus " ""###;
// no warning, because these cannot be written as byte string literals:
let ubs = "☃".as_bytes();
let ubs = "hello there! this is a very long string".as_bytes();
let strify = stringify!(foobar).as_bytes();
let includestr = include_bytes!("entry_unfixable.rs");
}
fn main() {}