Files
codeql/rust/ql/test/extractor-tests/canonical_path/anonymous.rs
2024-11-22 17:00:57 +01:00

37 lines
546 B
Rust

use super::regular::Trait;
fn canonicals() {
struct OtherStruct;
trait OtherTrait {
fn g(&self);
}
impl OtherTrait for OtherStruct {
fn g(&self) {}
}
impl OtherTrait for crate::regular::Struct {
fn g(&self) {}
}
impl crate::regular::Trait for OtherStruct {
fn f(&self) {}
}
fn nested() {
struct OtherStruct;
}
fn usage() {
let s = OtherStruct {};
s.f();
s.g();
nested();
}
}
fn other() {
struct OtherStruct;
}