Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ecbe9ac

Browse files
author
Michael Wright
committed
manual-strip: Add additional test
1 parent 8b04c2d commit ecbe9ac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/ui/manual_strip.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,11 @@ fn main() {
5656
s2.push('d');
5757
s2[2..].to_uppercase();
5858
}
59+
60+
// Target not stripped. (Don't lint.)
61+
let s3 = String::from("abcd");
62+
let s4 = String::from("efgh");
63+
if s3.starts_with("ab") {
64+
s4[2..].to_string();
65+
}
5966
}

0 commit comments

Comments
 (0)