rust-clippy/tests/ui/min_rust_version_no_patch.rs

15 lines
300 B
Rust
Raw Normal View History

#![allow(clippy::redundant_clone)]
#![feature(custom_inner_attributes)]
2020-11-28 14:24:28 +00:00
#![clippy::msrv = "1.0"]
fn manual_strip_msrv() {
let s = "hello, world!";
if s.starts_with("hello, ") {
assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!");
}
}
fn main() {
manual_strip_msrv()
}