-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: expand derive macros #19824
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: expand derive macros #19824
Conversation
@@ -6,6 +6,7 @@ | |||
import codeql.files.FileSystem | |||
import codeql.rust.elements.Abi | |||
import codeql.rust.elements.Addressable | |||
import codeql.rust.elements.Adt |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.Enum
Redundant import, the module is already imported inside
codeql.rust.elements.Struct
Redundant import, the module is already imported inside
codeql.rust.elements.Union
*/ | ||
|
||
private import internal.AdtImpl | ||
import codeql.rust.elements.Item |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.MacroItems
|
||
private import internal.AdtImpl | ||
import codeql.rust.elements.Item | ||
import codeql.rust.elements.MacroItems |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.Item
@@ -2,6 +2,9 @@ | |||
|
|||
from .prelude import * | |||
|
|||
class Adt(AstNode, ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's already done in the annotations
codeql/rust/schema/annotations.py
Line 19 in 52c0028
@annotate(Adt, replace_bases={AstNode: Item}) |
@@ -2,6 +2,9 @@ | |||
|
|||
from .prelude import * | |||
|
|||
class Adt(AstNode, ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Your are changing things faster than I can review them ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
9f6e446
to
f4bdd4d
Compare
@aibaars DCA shows a significant increase of warnings on What do you think, shall we accept that for now, and investigate those three repos later? |
@@ -2970,3 +3973,93 @@ inferType | |||
| main.rs:1928:41:1928:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | | |||
| main.rs:1944:5:1944:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future | | |||
testFailures | |||
| main.rs:2:5:2:20 | f.write_str(...) | Unexpected result: method=write_str | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've allowed some test failures without updating the annotations in the .rs
file. This isn't a good state to leave things in as the annotations are now misleading. Is there a plan to fix these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.