Skip to content

Commit 26b1d7c

Browse files
committed
use_self - add test case of #2843
1 parent 2b2434e commit 26b1d7c

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

tests/ui/use_self.fixed

+14
Original file line numberDiff line numberDiff line change
@@ -336,3 +336,17 @@ mod issue4305 {
336336
}
337337
}
338338
}
339+
340+
mod issue2843 {
341+
trait Foo {
342+
type Bar;
343+
}
344+
345+
impl Foo for usize {
346+
type Bar = u8;
347+
}
348+
349+
impl<T: Foo> Foo for Option<T> {
350+
type Bar = Option<T::Bar>;
351+
}
352+
}

tests/ui/use_self.rs

+14
Original file line numberDiff line numberDiff line change
@@ -336,3 +336,17 @@ mod issue4305 {
336336
}
337337
}
338338
}
339+
340+
mod issue2843 {
341+
trait Foo {
342+
type Bar;
343+
}
344+
345+
impl Foo for usize {
346+
type Bar = u8;
347+
}
348+
349+
impl<T: Foo> Foo for Option<T> {
350+
type Bar = Option<T::Bar>;
351+
}
352+
}

0 commit comments

Comments
 (0)