summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-24308.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-24308.rs')
-rw-r--r--tests/ui/issues/issue-24308.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-24308.rs b/tests/ui/issues/issue-24308.rs
new file mode 100644
index 000000000..4a582c68e
--- /dev/null
+++ b/tests/ui/issues/issue-24308.rs
@@ -0,0 +1,17 @@
+// run-pass
+pub trait Foo {
+ fn method1() {}
+ fn method2();
+}
+
+struct Slice<'a, T: 'a>(#[allow(unused_tuple_struct_fields)] &'a [T]);
+
+impl<'a, T: 'a> Foo for Slice<'a, T> {
+ fn method2() {
+ <Self as Foo>::method1();
+ }
+}
+
+fn main() {
+ <Slice<()> as Foo>::method2();
+}