]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/string_from_utf8_as_bytes.fixed
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / string_from_utf8_as_bytes.fixed
diff --git a/src/tools/clippy/tests/ui/string_from_utf8_as_bytes.fixed b/src/tools/clippy/tests/ui/string_from_utf8_as_bytes.fixed
new file mode 100644 (file)
index 0000000..6e665cd
--- /dev/null
@@ -0,0 +1,6 @@
+// run-rustfix
+#![warn(clippy::string_from_utf8_as_bytes)]
+
+fn main() {
+    let _ = Some(&"Hello World!"[6..11]);
+}