summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/string_from_utf8_as_bytes.rs
blob: c8717f7950bd806bbdac47065af6507781188840 (plain)
1
2
3
4
5
#![warn(clippy::string_from_utf8_as_bytes)]

fn main() {
    let _ = std::str::from_utf8(&"Hello World!".as_bytes()[6..11]);
}