Skip to content

Commit

Permalink
use_self - add test case of #2843
Browse files Browse the repository at this point in the history
  • Loading branch information
tnielens committed Apr 26, 2020
1 parent 533d824 commit f0dc26f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/ui/use_self.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,17 @@ mod issue4140 {
}
}
}

mod issue2843 {
trait Foo {
type Bar;
}

impl Foo for usize {
type Bar = u8;
}

impl<T: Foo> Foo for Option<T> {
type Bar = Option<T::Bar>;
}
}
14 changes: 14 additions & 0 deletions tests/ui/use_self.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,17 @@ mod issue4140 {
}
}
}

mod issue2843 {
trait Foo {
type Bar;
}

impl Foo for usize {
type Bar = u8;
}

impl<T: Foo> Foo for Option<T> {
type Bar = Option<T::Bar>;
}
}

0 comments on commit f0dc26f

Please sign in to comment.