Add test for visibility on a trait item (currently wrong)

This commit is contained in:
David Tolnay
2021-08-20 13:33:38 -07:00
committed by Caleb Cartwright
parent f7872887e9
commit c8bd550c8d
4 changed files with 30 additions and 0 deletions
+8
View File
@@ -13,6 +13,14 @@ fn foo() { "hi" }
// Comment 3
}
#[inherent]
impl Visible for Bar {
pub const C: i32;
pub type T;
pub fn f();
pub fn g() {}
}
pub unsafe impl<'a, 'b, X, Y: Foo<Bar>> !Foo<'a, X> for Bar<'b, Y> where X: Foo<'a, Z> {
fn foo() { "hi" }
}
+7
View File
@@ -174,3 +174,10 @@ trait B<'a, 'b, 'c,T> = Debug<'a, T> where for<'b> &'b Self:
+ DDDDDDDD
+ DDDDDDDDD
+ EEEEEEE;
trait Visible {
pub const C: i32;
pub type T;
pub fn f();
pub fn g() {}
}
+8
View File
@@ -21,6 +21,14 @@ fn foo() {
// Comment 3
}
#[inherent]
impl Visible for Bar {
pub const C: i32;
pub type T;
fn f();
pub fn g() {}
}
pub unsafe impl<'a, 'b, X, Y: Foo<Bar>> !Foo<'a, X> for Bar<'b, Y>
where
X: Foo<'a, Z>,
+7
View File
@@ -211,3 +211,10 @@ trait B<'a, 'b, 'c, T> = Debug<'a, T>
+ DDDDDDDD
+ DDDDDDDDD
+ EEEEEEE;
trait Visible {
const C: i32;
pub type T;
fn f();
fn g() {}
}