mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
manual-strip: Add additional test
This commit is contained in:
@@ -56,4 +56,11 @@ fn main() {
|
||||
s2.push('d');
|
||||
s2[2..].to_uppercase();
|
||||
}
|
||||
|
||||
// Target not stripped. (Don't lint.)
|
||||
let s3 = String::from("abcd");
|
||||
let s4 = String::from("efgh");
|
||||
if s3.starts_with("ab") {
|
||||
s4[2..].to_string();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user