summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/cache/elision.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/cache/elision.rs')
-rw-r--r--src/test/ui/associated-types/cache/elision.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/cache/elision.rs b/src/test/ui/associated-types/cache/elision.rs
new file mode 100644
index 000000000..b3e1ec8ad
--- /dev/null
+++ b/src/test/ui/associated-types/cache/elision.rs
@@ -0,0 +1,23 @@
+// Check that you are allowed to implement using elision but write
+// trait without elision (a bug in this cropped up during
+// bootstrapping, so this is a regression test).
+
+// check-pass
+
+pub struct SplitWhitespace<'a> {
+ x: &'a u8
+}
+
+pub trait UnicodeStr {
+ fn split_whitespace<'a>(&'a self) -> SplitWhitespace<'a>;
+}
+
+impl UnicodeStr for str {
+ #[inline]
+ fn split_whitespace(&self) -> SplitWhitespace {
+ unimplemented!()
+ }
+}
+
+
+fn main() { }