Skip to content
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: update rust-analyzer #18295

Merged
merged 8 commits into from
Dec 18, 2024
Merged

Rust: update rust-analyzer #18295

merged 8 commits into from
Dec 18, 2024

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Dec 16, 2024

Updates rust-analyzer to 0.0.248

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Dec 16, 2024
@aibaars aibaars force-pushed the aibaars/update-rust-ungram branch from 946bcde to 72afa69 Compare December 16, 2024 13:30
@@ -11,7 +11,20 @@
import codeql.rust.elements.ArrayListExpr
import codeql.rust.elements.ArrayRepeatExpr
import codeql.rust.elements.ArrayTypeRepr
import codeql.rust.elements.AsmClobberAbi
import codeql.rust.elements.AsmConst
import codeql.rust.elements.AsmDirSpec

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.AsmRegOperand
.
import codeql.rust.elements.AsmExpr
import codeql.rust.elements.AsmLabel

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.Abi
.
Redundant import, the module is already imported inside
codeql.rust.elements.Addressable
.
Redundant import, the module is already imported inside
codeql.rust.elements.ArgList
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmDirSpec
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmOperand
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmOperandExpr
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmOption
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmPiece
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmRegSpec
.
Redundant import, the module is already imported inside
codeql.rust.elements.AssocItem
.
Redundant import, the module is already imported inside
codeql.rust.elements.AssocItemList
.
Redundant import, the module is already imported inside
codeql.rust.elements.Attr
.
Redundant import, the module is already imported inside
codeql.rust.elements.Callable
.
Redundant import, the module is already imported inside
codeql.rust.elements.ClosureBinder
.
Redundant import, the module is already imported inside
codeql.rust.elements.Comment
.
Redundant import, the module is already imported inside
codeql.rust.elements.Expr
.
Redundant import, the module is already imported inside
codeql.rust.elements.ExternItem
.
Redundant import, the module is already imported inside
codeql.rust.elements.ExternItemList
.
Redundant import, the module is already imported inside
codeql.rust.elements.FieldList
.
Redundant import, the module is already imported inside
codeql.rust.elements.FormatArgsArg
.
Redundant import, the module is already imported inside
codeql.rust.elements.GenericArg
.
Redundant import, the module is already imported inside
codeql.rust.elements.GenericArgList
.
Redundant import, the module is already imported inside
codeql.rust.elements.GenericParam
.
Redundant import, the module is already imported inside
codeql.rust.elements.GenericParamList
.
Redundant import, the module is already imported inside
codeql.rust.elements.ItemList
.
Redundant import, the module is already imported inside
codeql.rust.elements.Label
.
Redundant import, the module is already imported inside
codeql.rust.elements.LetElse
.
Redundant import, the module is already imported inside
codeql.rust.elements.MacroCall
.
Redundant import, the module is already imported inside
codeql.rust.elements.MacroItems
.
Redundant import, the module is already imported inside
codeql.rust.elements.MacroStmts
.
Redundant import, the module is already imported inside
codeql.rust.elements.MatchArm
.
Redundant import, the module is already imported inside
codeql.rust.elements.MatchArmList
.
Redundant import, the module is already imported inside
codeql.rust.elements.MatchGuard
.
Redundant import, the module is already imported inside
codeql.rust.elements.Meta
.
Redundant import, the module is already imported inside
codeql.rust.elements.Name
.
Redundant import, the module is already imported inside
codeql.rust.elements.ParamBase
.
Redundant import, the module is already imported inside
codeql.rust.elements.ParamList
.
Redundant import, the module is already imported inside
codeql.rust.elements.ParenthesizedArgList
.
Redundant import, the module is already imported inside
codeql.rust.elements.Pat
.
Redundant import, the module is already imported inside
codeql.rust.elements.Path
.
Redundant import, the module is already imported inside
codeql.rust.elements.PathSegment
.
Redundant import, the module is already imported inside
codeql.rust.elements.RecordExprField
.
Redundant import, the module is already imported inside
codeql.rust.elements.RecordExprFieldList
.
Redundant import, the module is alr
import codeql.rust.elements.AsmExpr
import codeql.rust.elements.AsmLabel
import codeql.rust.elements.AsmOperand

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.AsmConst
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmLabel
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmOperandNamed
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmRegOperand
.
Redundant import, the module is already imported inside
codeql.rust.elements.AsmSym
.
import codeql.rust.elements.AsmExpr
import codeql.rust.elements.AsmLabel
import codeql.rust.elements.AsmOperand
import codeql.rust.elements.AsmOperandExpr

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.AsmRegOperand
.
rust/ql/lib/codeql/rust/elements.qll Fixed Show fixed Hide fixed
@@ -107,6 +120,7 @@
import codeql.rust.elements.ParenExpr
import codeql.rust.elements.ParenPat
import codeql.rust.elements.ParenTypeRepr
import codeql.rust.elements.ParenthesizedArgList

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.PathSegment
.
@@ -166,6 +180,8 @@
import codeql.rust.elements.Unimplemented
import codeql.rust.elements.Union
import codeql.rust.elements.Use
import codeql.rust.elements.UseBoundGenericArg

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.Lifetime
.
Redundant import, the module is already imported inside
codeql.rust.elements.NameRef
.
Redundant import, the module is already imported inside
codeql.rust.elements.UseBoundGenericArgs
.
@@ -166,6 +180,8 @@
import codeql.rust.elements.Unimplemented
import codeql.rust.elements.Union
import codeql.rust.elements.Use
import codeql.rust.elements.UseBoundGenericArg
import codeql.rust.elements.UseBoundGenericArgs

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.TypeBound
.
*/

private import internal.AsmOperandExprImpl
import codeql.rust.elements.AstNode

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.Expr
.
*/

private import internal.UseBoundGenericArgsImpl
import codeql.rust.elements.AstNode

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.UseBoundGenericArg
.
@aibaars aibaars force-pushed the aibaars/update-rust-ungram branch from 72afa69 to 014b013 Compare December 16, 2024 14:51
import codeql.rust.elements.AsmOperand
import codeql.rust.elements.AsmOperandExpr
import codeql.rust.elements.AsmOperandNamed
import codeql.rust.elements.AsmOption

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.AsmOptionsList
.
@aibaars aibaars force-pushed the aibaars/update-rust-ungram branch from 92a10b8 to a6ec51a Compare December 18, 2024 12:00
@aibaars aibaars marked this pull request as ready for review December 18, 2024 12:48
@aibaars aibaars requested a review from a team as a code owner December 18, 2024 12:48
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small doubt on an ungram difference, but LGTM otherwise

@@ -414,7 +414,7 @@ AsmClobberAbi = 'clobber_abi' '(' ('@string' (',' '@string')* ','?) ')'
// option := "pure" / "nomem" / "readonly" / "preserves_flags" / "noreturn" / "nostack" / "att_syntax" / "raw"
AsmOption = 'pure' | 'nomem' | 'readonly' | 'preserves_flags' | 'noreturn' | 'nostack' | 'att_syntax' | 'raw' | 'may_unwind'
// options := "options(" option *("," option) [","] ")"
AsmOptions = 'options' '(' AsmOption *(',' AsmOption) ','? ')'
AsmOptions = 'options' '(' (AsmOption (',' AsmOption)* ','?) ')'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a change on top of the upstream ungram? If that's the case, this might make it tricky to grab this file directly from there at some point in the future...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is. Can you explain why you needed this? Could there be a way to avoid this patching?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should push this upstream as a fix. It looks like a bug to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still ok with merging this as it is 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow these rust-analyzer folk are quick, the upstream patch is already merged!

@@ -1 +1 @@
| file://:0:0:0:0 | MacroItems | getNumberOfItems: | 2 |
| gen_macro_items.rs:5:5:5:38 | MacroItems | getNumberOfItems: | 2 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! That's an improvement 👍

@aibaars aibaars merged commit 023f48f into main Dec 18, 2024
32 checks passed
@aibaars aibaars deleted the aibaars/update-rust-ungram branch December 18, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants