Ryo Yoshida
f9c1a7dcd9
fix: assignment operators are right associative
2023-06-03 19:58:35 +09:00
Lukas Wirth
7d1bf7023d
Recover from leading comma in tuple pat and expr
2023-06-01 08:40:50 +02:00
bors
2df56cadcb
Auto merge of #14755 - poliorcetics:clippy-fixes, r=Veykril
...
Fix: a TODO and some clippy fixes
- fix(todo): implement IntoIterator for ArenaMap<IDX, V>
- chore: remove unused method
- fix: remove useless `return`s
- fix: various clippy lints
- fix: simplify boolean test to a single negation
2023-05-24 11:13:52 +00:00
Lukas Wirth
4b577e2bc8
Support c string literals
2023-05-18 11:06:05 +02:00
Lukas Wirth
099b5b3b15
internal: Bump rustc_lexer
2023-05-18 10:17:40 +02:00
Alexis (Poliorcetics) Bourget
5411836767
fix: simplify boolean test to a single negation
2023-05-07 09:44:07 +02:00
Alexis (Poliorcetics) Bourget
d7fdf141a4
fix: various clippy lints
2023-05-07 09:43:37 +02:00
Alexis (Poliorcetics) Bourget
900d6030e7
fix: remove useless return
s
2023-05-07 09:42:52 +02:00
Ryo Yoshida
fa2340a4df
Parse associated return type bounds
2023-05-06 20:31:11 +09:00
Ryo Yoshida
d7d8971203
Remove (..)
-style return type notation
2023-05-06 20:30:17 +09:00
Ryo Yoshida
2a509d0eb2
Parse bare dyn types with leading lifetime
2023-05-05 04:30:37 +09:00
Lukas Wirth
d1ca505525
fix: Fix pat fragment handling in 2021 edition
2023-04-24 22:21:37 +02:00
bors
2400b36a2e
Auto merge of #14577 - jsoref:spelling, r=lnicola
...
Spelling
This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling ).
The misspellings have been reported at https://github.com/jsoref/rust-analyzer/actions/runs/4699991040#summary-12751355796
The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-analyzer/actions/runs/4699991284#summary-12751356293
closes #14567
2023-04-19 14:05:40 +00:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
Ryo Yoshida
83a93f4bd3
Parse inline const pattern in nested patterns
2023-04-16 04:28:37 +09:00
Ryo Yoshida
89a1439de3
Parse exclusive range pattern
2023-04-16 04:28:29 +09:00
tamasfe
0b9c0c5088
feat(syntax): RTN in bounds
...
Limited syntactic support for experimental return type notations.
https://github.com/rust-lang/rust/issues/109417
2023-04-01 15:26:03 +02:00
Lukas Wirth
cb546390da
fix: Recover from pub()
visibility modifier
2023-03-30 13:42:15 +02:00
Lukas Wirth
55120b3d83
Add signature help for tuple struct patterns
2023-03-15 10:17:30 +01:00
XFFXFF
6e97527eae
add is_blocklike func on BlockLike
2023-03-07 17:27:52 +08:00
XFFXFF
98990affe5
add more tests
2023-03-07 08:24:25 +08:00
XFFXFF
995aacfce8
show diagnostic for } token followed by else in let else statement
2023-03-07 08:24:25 +08:00
Ryo Yoshida
2e7d2c2d04
Parse trait alias as a distinct AST type
2023-03-04 00:23:56 +09:00
shilangyu
44e47fe408
Add check for extra path segments after an angled one
2023-02-25 16:16:49 +01:00
Lukas Wirth
4f6b5f41d4
Recover better for more delimited sequences
2023-02-14 13:52:15 +01:00
Lukas Wirth
1be24e0899
internal: Improve parser recovery a bunch
2023-02-11 20:28:36 +01:00
Lukas Wirth
4788c7a056
Bump rustc-ap-rustc_lexer
2023-02-08 11:42:14 +01:00
Lukas Wirth
a756c9ad08
Fixup comments
2023-02-07 18:08:05 +01:00
Lukas Wirth
27cd509558
fix jointess for floats not being set properly
2023-02-07 17:41:16 +01:00
Lukas Wirth
f6539b139e
fix depth check for float split step
2023-02-07 15:44:00 +01:00
Lukas Wirth
c6e7917d6e
Fix up token_tree_to_syntax_node float split handling
2023-02-07 15:21:37 +01:00
Lukas Wirth
6fa6efe90f
fix: Fix parsing of nested tuple field accesses in a cursed way
2023-02-03 17:18:48 +01:00
Lukas Wirth
dab685dd87
De-magic number parser::Output encoding
2023-02-03 11:47:33 +01:00
onestacked
872408500b
Parse const_closures syntax.
...
Enables parsing of the syntax for `#![features(const_closures)]` introduced in https://github.com/rust-lang/rust/pull/106004
2023-01-19 15:40:07 +01:00
bors
fa874627f0
Auto merge of #13969 - Veykril:workspace.dependencies, r=Veykril
...
Use workspace.dependencies to declare local dependencies
2023-01-17 10:29:27 +00:00
Lukas Wirth
bed4db3c62
Use workspace.dependencies to declare local dependencies
2023-01-17 10:52:26 +01:00
Lukas Wirth
e4858fe480
Specify authors, edition and license via workspace.package
2023-01-16 16:44:00 +01:00
Lukas Wirth
679df2adf1
Specify rust-version via workspace.package
2023-01-16 16:33:01 +01:00
Daniel Eades
aa90d02079
remove useless operations
2023-01-02 15:02:54 +00:00
Daniel Eades
0a0817905e
return value directly from if/else block
2023-01-02 15:02:54 +00:00
Maybe Waffle
4a16afa264
Parse do yeet
expressions
2022-12-28 22:42:26 +00:00
Yuri Astrakhan
d3dbf9c194
Moar linting: needless_borrow, let_unit_value, ...
...
* There are a few needless borrows that don't seem to be needed. I even did a quick assembly comparison and posted a q to stackoveflow on it. See [here](https://stackoverflow.com/questions/74910196/advantages-of-pass-by-ref-val-with-impl-intoiteratoritem-impl-asrefstr )
* removed several `let _ = ...` when they don't look necessary (even a few ones that were not suggested by clippy (?))
* there were a few `then(|| ctor{})` that clippy suggested to replace with `then_some(ctor{})` -- seems reasonable?
* some unneeded assignment+return - keep the code a bit leaner
* a few `writeln!` instead of `write!`, or even consolidate write!
* a nice optimization to use `ch.is_ascii_digit` instead of `ch.is_digit(10)`
2022-12-25 05:07:47 -05:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Yuri Astrakhan
1d59c7b667
Remove non-needed clones
...
I am not certain if this will improve performance,
but it seems having a .clone() without any need should be removed.
This was done with clippy, and manually reviewed:
```
cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone
```
2022-12-23 02:20:03 -05:00
Jonas Schievink
c110481dd4
Reset parser step count when bumping
2022-12-19 16:27:00 +01:00
Dezhi Wu
258e532434
docs: update the comment and add a test to half_open_range_pat
2022-12-16 10:44:25 +08:00
Dezhi Wu
6a295fcd3b
fix: add a check for if
token in patterns parser
...
Closes #13776
2022-12-15 12:46:02 +08:00
Jonas Schievink
9e0aaf4cf3
Parse ..= X
patterns
2022-12-13 17:32:25 +01:00
Jonas Schievink
ed48bd8b9d
Fix parsing of _ = x
in closure body
2022-12-12 12:57:29 +01:00
Lukas Wirth
ffd7bf8bf9
Bump Cargo rust-version fields to latest stable
2022-11-07 12:59:51 +01:00