Skip to content

Commit 0bc894d

Browse files
committed
Rust: Add trait visibility test using Self
1 parent 704c572 commit 0bc894d

File tree

1 file changed

+6
-0
lines changed
  • rust/ql/test/library-tests/path-resolution

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,12 @@ 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+
impl X {
611+
fn test(&self) {
612+
Self::a_method(self); // $ item=X_Foo::a_method
613+
}
614+
}
609615
}
610616
{
611617
// Only the `Bar` trait is visible

0 commit comments

Comments
 (0)