Skip to content

Commit c8bd550

Browse files
dtolnaycalebcartwright
authored andcommitted
Add test for visibility on a trait item (currently wrong)
1 parent f787288 commit c8bd550

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

Diff for: tests/source/impls.rs

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ pub impl Foo for Bar {
1313
// Comment 3
1414
}
1515

16+
#[inherent]
17+
impl Visible for Bar {
18+
pub const C: i32;
19+
pub type T;
20+
pub fn f();
21+
pub fn g() {}
22+
}
23+
1624
pub unsafe impl<'a, 'b, X, Y: Foo<Bar>> !Foo<'a, X> for Bar<'b, Y> where X: Foo<'a, Z> {
1725
fn foo() { "hi" }
1826
}

Diff for: tests/source/trait.rs

+7
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,10 @@ Send
174174
+ DDDDDDDD
175175
+ DDDDDDDDD
176176
+ EEEEEEE;
177+
178+
trait Visible {
179+
pub const C: i32;
180+
pub type T;
181+
pub fn f();
182+
pub fn g() {}
183+
}

Diff for: tests/target/impls.rs

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ pub impl Foo for Bar {
2121
// Comment 3
2222
}
2323

24+
#[inherent]
25+
impl Visible for Bar {
26+
pub const C: i32;
27+
pub type T;
28+
fn f();
29+
pub fn g() {}
30+
}
31+
2432
pub unsafe impl<'a, 'b, X, Y: Foo<Bar>> !Foo<'a, X> for Bar<'b, Y>
2533
where
2634
X: Foo<'a, Z>,

Diff for: tests/target/trait.rs

+7
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,10 @@ where
211211
+ DDDDDDDD
212212
+ DDDDDDDDD
213213
+ EEEEEEE;
214+
215+
trait Visible {
216+
const C: i32;
217+
pub type T;
218+
fn f();
219+
fn g() {}
220+
}

0 commit comments

Comments
 (0)