-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust: first draft of canonical paths rework (WIP) #18223
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
impl<T> GenericTrait<T> for GenericStruct<i32, T> { | ||
fn generic_method(&self, t: T) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl<T> GenericTrait<T> for GenericStruct<i32, T> { | ||
fn generic_method(&self, t: T) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl GenericTrait<i32> for GenericStruct<&str, i32> { | ||
fn generic_method(&self, t: i32) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl GenericTrait<i32> for GenericStruct<&str, i32> { | ||
fn generic_method(&self, t: i32) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl<T> GenericTrait<T> for GenericTupleStruct<i32, T> { | ||
fn generic_method(&self, t: T) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl GenericTrait<i32> for GenericTupleStruct<&str, i32> { | ||
fn generic_method(&self, t: i32) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl<T> GenericTrait<T> for GenericEnum<i32, T> { | ||
fn generic_method(&self, t: T) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl<T> GenericTrait<T> for GenericEnum<i32, T> { | ||
fn generic_method(&self, t: T) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl GenericTrait<i32> for GenericEnum<&str, i32> { | ||
fn generic_method(&self, t: i32) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
impl GenericTrait<i32> for GenericEnum<&str, i32> { | ||
fn generic_method(&self, t: i32) {} |
Check notice
Code scanning / CodeQL
Unused variable Note test
@@ -177,3 +177,22 @@ | |||
import codeql.rust.elements.WildcardPat | |||
import codeql.rust.elements.YeetExpr | |||
import codeql.rust.elements.YieldExpr | |||
import codeql.rust.elements.canonical_paths.BuiltinTypeCanonicalPath | |||
import codeql.rust.elements.canonical_paths.CanonicalPath |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.Addressable
Redundant import, the module is already imported inside
codeql.rust.elements.Resolvable
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.ImplItemCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.ModuleItemCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.Namespace
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.ParametrizedCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.TypeCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.TypeItemCanonicalPath
@@ -177,3 +177,22 @@ | |||
import codeql.rust.elements.WildcardPat | |||
import codeql.rust.elements.YeetExpr | |||
import codeql.rust.elements.YieldExpr | |||
import codeql.rust.elements.canonical_paths.BuiltinTypeCanonicalPath | |||
import codeql.rust.elements.canonical_paths.CanonicalPath | |||
import codeql.rust.elements.canonical_paths.CanonicalPathElement |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.CanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.CrateRoot
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.TypeGenericArg
rust/ql/lib/codeql/rust/elements.qll
Outdated
import codeql.rust.elements.canonical_paths.CanonicalPathElement | ||
import codeql.rust.elements.canonical_paths.ConcreteTypeCanonicalPath | ||
import codeql.rust.elements.canonical_paths.ConstGenericTypeArg | ||
import codeql.rust.elements.canonical_paths.CrateRoot |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.LangCrateRoot
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.Namespace
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.RepoCrateRoot
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.RustcCrateRoot
import codeql.rust.elements.canonical_paths.DerivedTypeCanonicalPath | ||
import codeql.rust.elements.canonical_paths.ImplItemCanonicalPath | ||
import codeql.rust.elements.canonical_paths.LangCrateRoot | ||
import codeql.rust.elements.canonical_paths.ModuleItemCanonicalPath |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.ParametrizedCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.TypeItemCanonicalPath
import codeql.rust.elements.canonical_paths.ImplItemCanonicalPath | ||
import codeql.rust.elements.canonical_paths.LangCrateRoot | ||
import codeql.rust.elements.canonical_paths.ModuleItemCanonicalPath | ||
import codeql.rust.elements.canonical_paths.Namespace |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.ModuleItemCanonicalPath
import codeql.rust.elements.canonical_paths.RepoCrateRoot | ||
import codeql.rust.elements.canonical_paths.RustcCrateRoot | ||
import codeql.rust.elements.canonical_paths.TypeCanonicalPath | ||
import codeql.rust.elements.canonical_paths.TypeGenericArg |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.ConstGenericTypeArg
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.ParametrizedCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.TypeGenericTypeArg
*/ | ||
|
||
private import internal.ImplItemCanonicalPathImpl | ||
import codeql.rust.elements.canonical_paths.CanonicalPath |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.ParametrizedCanonicalPath
Redundant import, the module is already imported inside
codeql.rust.elements.canonical_paths.TypeCanonicalPath
*/ | ||
|
||
private import internal.ModuleItemCanonicalPathImpl | ||
import codeql.rust.elements.canonical_paths.CanonicalPath |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.Namespace
*/ | ||
|
||
private import internal.ParametrizedCanonicalPathImpl | ||
import codeql.rust.elements.canonical_paths.CanonicalPath |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.canonical_paths.ModuleItemCanonicalPath
*/ | ||
|
||
private import internal.TypeItemCanonicalPathImpl | ||
import codeql.rust.elements.canonical_paths.CanonicalPath |
Check warning
Code scanning / CodeQL
Redundant import Warning
First go at making canonical paths more semantic.
What works:
What needs to be done:
What might be broken without changing how we use rust-analyzer or upstreaming changes to it: