diff options
| author | Michael Wright <mikerite@lavabit.com> | 2020-09-15 21:30:01 +0200 |
|---|---|---|
| committer | Michael Wright <mikerite@lavabit.com> | 2020-09-15 21:32:27 +0200 |
| commit | ecbe9ac0e9b68b171e4a48db40e91e2e44370c2a (patch) | |
| tree | 47aaaaf9583e92b53f72ef80070a1731e1462d10 | |
| parent | 8b04c2d6e87b62b88a488383d84268684148723c (diff) | |
| download | rust-ecbe9ac0e9b68b171e4a48db40e91e2e44370c2a.tar.gz rust-ecbe9ac0e9b68b171e4a48db40e91e2e44370c2a.zip | |
manual-strip: Add additional test
| -rw-r--r-- | tests/ui/manual_strip.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/manual_strip.rs b/tests/ui/manual_strip.rs index d1b4772c7de..cbb84eb5c7e 100644 --- a/tests/ui/manual_strip.rs +++ b/tests/ui/manual_strip.rs @@ -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(); + } } |
