summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/str_to_string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/str_to_string.rs')
-rw-r--r--src/tools/clippy/tests/ui/str_to_string.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/str_to_string.rs b/src/tools/clippy/tests/ui/str_to_string.rs
new file mode 100644
index 000000000..08f734025
--- /dev/null
+++ b/src/tools/clippy/tests/ui/str_to_string.rs
@@ -0,0 +1,7 @@
+#![warn(clippy::str_to_string)]
+
+fn main() {
+ let hello = "hello world".to_string();
+ let msg = &hello[..];
+ msg.to_string();
+}