]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/crashes/auxiliary/ice-4727-aux.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / crashes / auxiliary / ice-4727-aux.rs
diff --git a/src/tools/clippy/tests/ui/crashes/auxiliary/ice-4727-aux.rs b/src/tools/clippy/tests/ui/crashes/auxiliary/ice-4727-aux.rs
new file mode 100644 (file)
index 0000000..58a20ca
--- /dev/null
@@ -0,0 +1,9 @@
+pub trait Trait {
+    fn fun(par: &str) -> &str;
+}
+
+impl Trait for str {
+    fn fun(par: &str) -> &str {
+        &par[0..1]
+    }
+}