mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Rust: Fix inconsistency by skipping Self in use globs
This commit is contained in:
@@ -2135,7 +2135,7 @@ private predicate useImportEdge(Use use, string name, ItemNode item, SuccessorKi
|
||||
checkQualifiedVisibility(use, item, kind1, useOpt) and
|
||||
// glob imports can be shadowed
|
||||
not declares(encl, ns, name) and
|
||||
not name = ["super", "self"]
|
||||
not name = ["super", "self", "Self"]
|
||||
)
|
||||
else (
|
||||
item = used and
|
||||
|
||||
@@ -7,5 +7,3 @@ multipleResolvedTargets
|
||||
| main.rs:565:9:566:15 | ...::Assoc(...) |
|
||||
| main.rs:568:9:569:12 | ...::f1(...) |
|
||||
| main.rs:571:9:572:12 | ...::f1(...) |
|
||||
multiplePathResolutions
|
||||
| main.rs:1075:13:1074:16 | Self |
|
||||
|
||||
@@ -546,7 +546,6 @@ resolvePath
|
||||
| main.rs:1073:30:1073:32 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:1073:38:1073:41 | Self | main.rs:1066:5:1069:5 | enum NonEmptyListEnum |
|
||||
| main.rs:1074:17:1074:32 | NonEmptyListEnum | main.rs:1066:5:1069:5 | enum NonEmptyListEnum |
|
||||
| main.rs:1075:13:1075:16 | Self | main.rs:1066:5:1069:5 | enum NonEmptyListEnum |
|
||||
| main.rs:1075:13:1075:16 | Self | main.rs:1071:5:1077:5 | impl NonEmptyListEnum::<...> { ... } |
|
||||
| main.rs:1075:13:1075:24 | ...::Single | main.rs:1067:9:1067:17 | Single |
|
||||
| main.rs:1083:13:1083:16 | Copy | {EXTERNAL LOCATION} | trait Copy |
|
||||
|
||||
Reference in New Issue
Block a user