Skip to content

Commit

Permalink
Add test for visibility on a trait item (currently wrong)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and calebcartwright committed Aug 22, 2021
1 parent f787288 commit c8bd550
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/source/impls.rs
Expand Up @@ -13,6 +13,14 @@ pub impl Foo for Bar {
// 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" }
}
Expand Down
7 changes: 7 additions & 0 deletions tests/source/trait.rs
Expand Up @@ -174,3 +174,10 @@ Send
+ DDDDDDDD
+ DDDDDDDDD
+ EEEEEEE;

trait Visible {
pub const C: i32;
pub type T;
pub fn f();
pub fn g() {}
}
8 changes: 8 additions & 0 deletions tests/target/impls.rs
Expand Up @@ -21,6 +21,14 @@ pub impl Foo for Bar {
// 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>,
Expand Down
7 changes: 7 additions & 0 deletions tests/target/trait.rs
Expand Up @@ -211,3 +211,10 @@ where
+ DDDDDDDD
+ DDDDDDDDD
+ EEEEEEE;

trait Visible {
const C: i32;
pub type T;
fn f();
fn g() {}
}

0 comments on commit c8bd550

Please sign in to comment.