Skip to content

Commit 01cc19c

Browse files
committed
Rust: Add trait visibility test using Self
1 parent 793d2c7 commit 01cc19c

File tree

2 files changed

+258
-248
lines changed

2 files changed

+258
-248
lines changed

rust/ql/test/library-tests/path-resolution/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,13 @@ mod trait_visibility {
606606
// Only the `Foo` trait is visible
607607
use m::Foo; // $ item=Foo
608608
X::a_method(&x); // $ item=X_Foo::a_method
609+
610+
#[rustfmt::skip]
611+
impl X { // $ item=X
612+
fn test(&self) {
613+
Self::a_method(self); // $ item=X_Foo::a_method
614+
}
615+
}
609616
}
610617
{
611618
// Only the `Bar` trait is visible

0 commit comments

Comments
 (0)