bors
16ac6c284c
Auto merge of #15756 - harpsword:fix_typo_in_mbe_lib, r=lnicola
...
fix typo in mbe/lib.rs comment
fix typo in mbe/lib.rs comment
2023-10-14 06:23:12 +00:00
harpsword
3f4368a090
fix: fix typo in mbe/lib.rs comment
2023-10-14 14:13:24 +08:00
cui fliter
58239f2990
Remove repetitive words
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-10-05 19:40:41 +08:00
Lukas Wirth
cba39f8553
fix: Fix float parser hack creating empty NameRef tokens
2023-08-08 14:44:33 +02:00
Lukas Wirth
75607fc34c
Simplify
2023-08-01 17:47:52 +02:00
bors
151c750dac
Auto merge of #15367 - Veykril:eager-macro-inputs, r=Veykril
...
fix: Strip unused token ids from eager macro input token maps
2023-08-01 11:23:02 +00:00
Lukas Wirth
c7b34e4873
fix: Strip unused token ids from eager macro input token maps
2023-07-31 17:12:17 +02:00
Ryo Yoshida
fd7435d463
Fixup path fragments upon MBE transcription
2023-07-30 23:36:42 +09:00
Lukas Wirth
6a7b905c86
Fix the eager token maps by re-mapping the textranges between the input and input expansion
2023-07-13 09:22:38 +02:00
Lukas Wirth
2366c16bf9
Fix eager token mapping panics
2023-07-11 13:54:28 +02:00
Lukas Wirth
f6c09099da
Don't unnecessarily clone the input tt for decl macros
2023-07-10 16:28:23 +02:00
Lukas Wirth
d5f64f875a
Infallibe ExpandDatabase::macro_def
2023-07-10 16:23:29 +02:00
Lukas Wirth
4ff93398fd
Skip buildin subtrees for builtin derives
2023-07-10 15:19:00 +02:00
Ryo Yoshida
4e793e7859
Use anonymous lifetime where possible
2023-06-29 23:27:28 +09:00
Ryo Yoshida
0d4d1d7e3b
Implement ${count()}
metavariable expression
2023-05-28 19:54:36 +09:00
Lukas Wirth
90499d4390
Use boxed slices instead ovecs in decl macros
2023-05-02 17:04:53 +02:00
Lukas Wirth
d1ca505525
fix: Fix pat fragment handling in 2021 edition
2023-04-24 22:21:37 +02:00
Jake Heinz
a497e9a05e
mbe: fix token conversion for doc comments
2023-04-22 03:06:06 +00: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
Lukas Wirth
a2a3fecae3
Option begone part 2
2023-04-16 19:20:48 +02:00
Lukas Wirth
71b50f9f09
Record eager expansion errors in EagerCallInfo
2023-04-16 16:11:59 +02:00
Lukas Wirth
a756c9ad08
Fixup comments
2023-02-07 18:08:05 +01:00
Lukas Wirth
e59487de38
Add tests for float access macro call inputs
2023-02-07 17:12:24 +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
9053bcc65c
Make mbe compile with parser changes
2023-02-03 21:39:24 +01:00
Lukas Wirth
41a46a78f2
Make tt generic over the span data
2023-01-31 14:58:16 +01:00
bors
f32f64bffc
Auto merge of #13929 - danieleades:simplify, r=lnicola
...
internal: a number of code simplifications
2023-01-11 09:38:34 +00:00
Daniel Eades
ac3844a0bb
a number of code simplifications
2023-01-10 18:48:51 +00:00
Daniel Eades
95d14c393c
avoid 'cloning' types that implement 'Copy'
2023-01-10 18:20:12 +00:00
Daniel Eades
4f8ffd0ba4
remove unnecessary lifetimes that can be elided
2023-01-02 15:02:54 +00:00
Daniel Eades
efd2c20e96
remove useless conversions
2023-01-02 15:02:54 +00:00
Daniel Eades
cc80c5bd07
remove unnecessary lazy evaluations
2023-01-02 15:02:54 +00:00
Daniel Eades
ed128872eb
remove needless borrows
2023-01-02 14:52:32 +00:00
Ryo Yoshida
a7d411425c
mbe: handle multi-character separator
2022-12-28 00:59:56 +09:00
Ryo Yoshida
767351fb87
mbe: treat <-
as one punct
2022-12-27 18:34:46 +09:00
Ryo Yoshida
ec7148b091
mbe: split Op::Leaf
and handle multi-character puncts
2022-12-27 18:23:01 +09:00
Ryo Yoshida
47c6c8e2f3
Extract multi-character punct handling into a method
2022-12-27 18:21:01 +09: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
Ryo Yoshida
e027ac0fbf
fix: don't let mbe expr fragments match let exprs and inline consts
2022-12-20 20:31:47 +09:00
Ryo Yoshida
41b0c54c07
Fix tt::Punct
's spacing calculation
2022-11-05 19:42:09 +09:00
Ryo Yoshida
b87a23b91b
Rename convertor -> converter
2022-11-05 19:41:08 +09:00
Lukas Wirth
78f33c0e96
Expand unmatched mbe fragments to reasonable default token trees
...
Currently we expand unmatched fragments by not replacing them at all,
leaving us with `$ident`. This trips up the parser or subsequent macro
calls. Instead it makes more sense to replace these with some reasonable
default depending on the fragment kind which should make more recursive
macro calls work better for completions.
2022-10-10 14:27:05 +02:00
Jonas Platte
c4a87ee0ce
mbe: Remove unneeded unwrap
2022-09-14 23:49:08 +02:00
Jonas Platte
d6f0fd04ee
mbe: Remove unnecessary reference to usize
2022-09-14 23:42:11 +02:00
Jonas Platte
54305545a5
mbe: Remove Vec reference in container
2022-09-14 23:35:12 +02:00
Jonas Platte
b6aed7914d
mbe: Remove double reference in container
2022-09-14 23:30:44 +02:00
Jonas Platte
f7f6d2870f
mbe: Use extend instead of push in loop
2022-09-14 23:26:24 +02:00
Jonas Platte
5e2f9e322f
mbe: Return Bindings from build_inner
2022-09-14 23:22:38 +02:00
Dezhi Wu
23747419ca
fix: a bunch of typos
...
This PR will fix some typos detected by [typos].
There are also some other typos in the function names, variable names, and file
names, which I leave as they are. I'm more certain that typos in comments
should be fixed.
[typos]: https://github.com/crate-ci/typos
2022-08-17 21:44:58 +08:00