mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 07:13:24 +03:00
Add test for visibility on a trait item (currently wrong)
This commit is contained in:
committed by
Caleb Cartwright
parent
f7872887e9
commit
c8bd550c8d
@@ -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" }
|
||||
}
|
||||
|
||||
@@ -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() {}
|
||||
}
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user