Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Laurențiu Nicola
b1b6e0c41a
Reapply "Detect NulInCStr
error earlier."
...
This reverts commit 0ea056552a
.
2024-01-25 06:40:07 +02:00
Johann Hemmann
6709eaba2a
never_loop
2024-01-19 17:31:01 +01:00
Johann Hemmann
b599de193f
Refactor macro_call
to be consistent with other functions
2024-01-18 12:50:36 +01:00
bors
1ab8c7fd27
Auto merge of #16349 - Young-Flash:use_error_recovery, r=Veykril
...
fix: add error recovery for use_tree_list parsing
This PR adds error recovery for USE_TREE_LIST parsing, avoid the wrong USE_TREE_LIST making the rest parsing incorrectly.
before
![before](https://github.com/rust-lang/rust-analyzer/assets/71162630/c6643690-f25c-4ad9-93d9-e661ba5b1dc3 )
after
![after](https://github.com/rust-lang/rust-analyzer/assets/71162630/30a58c40-2711-48d2-b2e5-fb208fc8636c )
close https://github.com/rust-lang/rust-analyzer/issues/16227
2024-01-18 09:52:37 +00:00
Johann Hemmann
76c67dd229
Fix test
2024-01-17 12:49:58 +01:00
Johann Hemmann
5916da2c29
Handle macro_rules!
as MACRO_CALL
...
It's a call of the third token is neither IDENT or TRY
2024-01-17 12:07:17 +01:00
Young-Flash
6033b66ce0
test: correct expected test result
2024-01-12 17:42:18 +08:00
Young-Flash
d0b310fc93
fix: add USE_TREE_LIST_FIRST_SET
2024-01-12 17:41:46 +08:00
Young-Flash
45eea57115
add in-comment test case for use_tree_list_err_recovery
2024-01-11 19:52:23 +08:00
Young-Flash
afe05fe1d8
fix broken test
2024-01-11 19:51:45 +08:00
Young-Flash
e6dd522761
fix: add err recovery for use_tree_list parsing
2024-01-11 19:50:35 +08:00
bors
c246ecfd55
Auto merge of #16310 - Veykril:range-access-parse, r=Veykril
...
fix: Fix incorrect parsing error on method call on range
Fixes https://github.com/rust-lang/rust-analyzer/issues/16289
2024-01-09 09:49:25 +00:00
Lukas Wirth
b97ab00bd4
Split out rustc_lexer from rustc_dependencies
2024-01-08 15:24:46 +01:00
Lukas Wirth
72200641c1
fix: Fix incorrect parsing error on method call on range
2024-01-08 15:09:26 +01:00
Tetsuharu Ohzeki
efc87092b3
Use Cargo's [workspace.lints.*] to config clippy
2023-12-29 23:51:32 +09:00
Igor Matuszewski
a7224c998d
Don't explicitly warn against semicolon_in_expressions_from_macros
...
This has been warn-by-default for two years now and has already been
added to the future-incompat lints in 1.68.
2023-12-05 11:35:09 +01:00
Yutaro Ohno
e076192dd8
Improve error handling for top-level let
statements
...
This commit addresses the issue of excessive and unrelated errors
generated by top-level `let` statements. Now, only a single error is
produced, indicating that `let` statements are invalid at the top level.
2023-12-01 10:37:21 +09:00
Chayim Refael Friedman
2fd19ed598
Err for comma after functional update syntax
2023-11-30 14:04:36 +02:00
Laurențiu Nicola
610eafe009
Merge commit '76633199f4316b9c659d4ec0c102774d693cd940' into sync-from-rust
2023-11-15 09:45:17 +02:00
Gaxx
fa7a91844a
Try to update parser doc
2023-11-08 16:29:21 -08:00
Laurențiu Nicola
d1d111d09e
Merge commit '3b7c7f97e4a7bb253a8d398ee4f8346f6cf2817b' into sync-from-ra
2023-11-08 08:15:03 +02:00
bohan
d20471334f
use visibility to check unused imports and delete some stmts
2023-10-22 21:27:46 +08:00
Pol Valletbó
6845c80a2f
fix: format
2023-10-11 15:52:22 +02:00
Pol Valletbó
4b281ffdf2
chore: format imports
2023-10-11 15:52:05 +02:00
Pol Valletbó
b769f34f63
chore: move common code to function
2023-10-11 15:45:45 +02:00
Pol Valletbó
e1aeb7fa79
fix: handle errors for string byte string and c_string
2023-10-11 15:25:52 +02:00
Pol Valletbó
677e6f3439
fix: use unescape_byte function for Byte literals
2023-10-11 13:09:15 +02:00
Pol Valletbó
f58a8250dc
fix: cargo fmt
2023-10-11 12:36:53 +02:00
Pol Valletbó
1fe6ac87e9
add diagnosis messages for chars and byte literal errors
2023-10-11 12:19:00 +02:00
Lukas Wirth
a382e649ca
Recover better on missing parameter in param list
2023-09-29 12:50:16 +02:00
bors
11ffcc08a3
Auto merge of #15615 - shogo-nakano-desu:refactor/fix-clippy-lints, r=Veykril
...
Refactor/fix clippy lints
As title says.
2023-09-22 06:46:29 +00:00
Laurențiu Nicola
bcfc997eac
Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-ra
2023-09-18 12:33:49 +03:00
hkalbasi
f4704bc8ae
Switch to in-tree rustc dependencies with a cfg flag
2023-09-15 18:10:11 +03:30
shogo-nakano-desu
ebbbaaa90f
refactor: fix clippy lints
2023-09-15 16:43:21 +09:00
Lukas Wirth
3fa0bf0dd3
Fix ide-diagnostics test fixture
2023-09-06 18:31:16 +02:00
Lukas Wirth
abe8f1ece4
Implement builtin#format_args, using rustc's format_args parser
2023-09-05 19:19:46 +02:00
Lukas Wirth
3431d586e5
Insert builtin#asm into asm! expansion
2023-09-05 14:00:49 +02:00
Lukas Wirth
15048304e3
Implement offset_of in hir-def and hir-ty
2023-09-05 12:27:52 +02:00
Lukas Wirth
9b8eb807a3
Parse builtin# syntax
2023-09-05 10:36:35 +02:00
Laurențiu Nicola
30d8aa1bec
Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-ra
2023-08-21 12:44:09 +03:00
bors
b771de3fdc
Auto merge of #15179 - ponyii:fix/default-values-of-const-params-are-ignored, r=HKalbasi
...
the "add missing members" assists: implemented substitution of default values of const params
To achieve this, I've made `hir::ConstParamData` store the default values
2023-08-15 10:17:43 +00:00
Lukas Wirth
9ac88d8d36
Fix parser being stuck in eager macro inputs
2023-08-12 08:27:27 +02:00
ponyii
4ebdc6f052
syntax update: the default value of ConstParam
turned from Expr
into ConstArg
2023-08-08 21:57:54 +04:00
Lukas Wirth
cba39f8553
fix: Fix float parser hack creating empty NameRef tokens
2023-08-08 14:44:33 +02:00
Laurențiu Nicola
aa55ce9567
Merge commit 'baee6b338b0ea076cd7a9f18d47f175dd2ba0e5d' into sync-from-ra
2023-08-07 12:03:15 +03:00
Lukas Wirth
042be329a7
Turn unresolved proc macro expansions into missing expressions
2023-08-05 20:00:37 +02:00
Lukas Wirth
bcff166b3a
Add ExternCrateDecl to HIR
2023-08-02 11:52:55 +02:00
Lukas Wirth
7c765d9f9e
fix: Expand eager macros to delimited comma separated expression list
2023-07-30 17:31:26 +02:00
Laurențiu Nicola
0155385b57
Merge commit '99718d0c8bc5aadd993acdcabc1778fc7b5cc572' into sync-from-ra
2023-07-24 12:21:34 +03:00