Skip to content

Commit

Permalink
manual-strip: Add additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wright committed Sep 15, 2020
1 parent 8b04c2d commit ecbe9ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/ui/manual_strip.rs
Expand Up @@ -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();
}
}

0 comments on commit ecbe9ac

Please sign in to comment.