Commit graph

850 commits

Author SHA1 Message Date
Lukas Wirth
7c6f31a45b Allow hir::Param to refer to other entity params aside from functions 2024-05-18 12:35:55 +02:00
bors
d28111dce8 Auto merge of #17224 - Veykril:lock-bump, r=Veykril
Bump Cargo.lock
2024-05-14 08:59:34 +00:00
Lukas Wirth
2a4be8d1f7 Bump Cargo.lock 2024-05-14 10:57:02 +02:00
Lukas Wirth
a39c0493a1 Render literal escaping errors in hovers 2024-05-13 12:51:57 +02:00
Lukas Wirth
e1aeed3aed Implement unsafe attribute parsing 2024-05-06 12:11:29 +02:00
bors
4c08e2d32f Auto merge of #16938 - Nilstrieb:dont-panic-tests, r=Veykril
Implement `BeginPanic` handling in const eval

for #16935, needs some figuring out of how to write these tests correctly
2024-04-21 16:22:02 +00:00
roife
3e232bb78a fix: replace unescape fn with the one in ra-ap-rustc_lexer 2024-04-19 20:32:53 +08:00
Lukas Wirth
5df690e13f Fixup some issues with minicore 2024-04-18 12:20:54 +02:00
Lukas Wirth
a483d3bc37 internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros 2024-04-14 16:02:38 +02:00
Lukas Wirth
83370fe5d7 Use Edition::CURRENT 2024-04-14 15:30:29 +02:00
Lukas Wirth
9c75e9fa7d Deduplicate Edition enum 2024-04-14 15:29:01 +02:00
Johann Hemmann
2cf5d8811a Raise edition one more level 2024-04-14 15:11:33 +02:00
Johann Hemmann
454e481422 Add edition to all parse functions of the parser crate 2024-04-14 15:07:43 +02:00
Lukas Wirth
b38d5394bb internal: Move grammar codegen into xtask 2024-03-19 10:57:53 +01:00
Lukas Wirth
4b679f90dd Generate AST in a more stable manner 2024-03-18 09:24:10 +01:00
Lukas Wirth
77607ab99a More precise highlighting rules for constant modifier 2024-03-17 11:26:05 +01:00
Lukas Wirth
c50c4f8bbb internal: Use assoc items as anchors for spans 2024-03-15 09:28:39 +01:00
Niklas Lindorfer
2a4ba4295b
fix: hide destructure_struct_binding assist if no public fields 2024-03-04 21:50:01 +00:00
Lukas Wirth
c3c9f5ffe1 internal: Compute syntax validation errors on demand 2024-03-04 12:06:15 +01:00
Lukas Wirth
4303e741de Cleanup 2024-03-04 11:10:06 +01:00
bors
4ef6a49b44 Auto merge of #16702 - Veykril:intra-doc-links-generic, r=Veykril
fix: Ignore generic arguments in intra doc link path resolution

Fixes https://github.com/rust-lang/rust-analyzer/issues/16699
2024-03-02 09:51:16 +00:00
Niklas Lindorfer
ed230048dc
Add destructure_struct_binding action
Separate into create and apply edit

Rename usages

Hacky name map

Add more tests

Handle non-exhaustive

Add some more TODOs

Private fields

Use todo

Nesting

Improve rest token generation

Cleanup

Doc -> regular comment

Support mut
2024-02-29 13:17:44 +00:00
Lukas Wirth
ab533d887d fix: Ignore generic arguments in intra doc link path resolution 2024-02-28 14:47:47 +01:00
Michael Goulet
36020bb512 Update grammar
Bounds are CONSTNESS ASYNCNESS POLARITY
2024-02-16 16:16:37 +00:00
DropDemBits
eb6d6ba17c
Migrate generate_trait_from_impl to mutable ast 2024-02-15 21:34:29 -05:00
DropDemBits
115646d7d5
Align set_visibility with the rest of the set_ edit-in-place methods 2024-02-15 20:40:14 -05:00
Maybe Waffle
e146139957 Add support for become expr/tail calls 2024-02-14 14:57:18 +00:00
Lukas Wirth
ed57008510 fix: Validate literals in proc-macro-srv FreeFunctions::literal_from_str 2024-02-13 12:33:51 +01:00
bors
925705e0c9 Auto merge of #16446 - Tyrubias:literal_from_str, r=Veykril
Implement `literal_from_str` for proc macro server

Closes #16233

Todos and unanswered questions:

- [x] Is this the correct approach? Can both the legacy and `rust_analyzer_span` servers depend on the `syntax` crate?
- [ ] How should we handle suffixes for string literals? It doesn't seem like `rust-analyzer` preservers suffix information after parsing.
- [x] Why are the `expect` tests failing? Specifically `test_fn_like_macro_clone_literals`
2024-02-13 10:41:36 +00:00
Victor Song
4923b8a74b Return Option<Parse<ast::Literal>> from ast::Literal::parse 2024-02-13 00:00:02 -06:00
Victor Song
1918f9b9e0 Address PR comments 2024-02-13 00:00:02 -06:00
Victor Song
6cd458f3d0 Move raw_delimiter_count to syntax crate 2024-02-13 00:00:02 -06:00
Chengxu Bian
ca64359945 remove eprintln! overwrite 2024-02-12 23:54:32 -05:00
Tavo Annus
a946970e2d Add quantified trees to reduce autocomplete options 2024-02-11 13:33:29 +02:00
Tetsuharu Ohzeki
81c35d1f56 syntax: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
Tetsuharu Ohzeki
2601d19bac clippy: Enable non_canonical_clone_impl rule 2024-02-09 22:37:42 +09:00
DropDemBits
e28f5514e1
Add AssocItemList::add_item_at_start
Needed to recreate the behavior of `generate_new` addding the `new` method at the start of the impl
2024-02-08 19:13:10 -05:00
DropDemBits
f1293a8fc4
Add newline to body when where clause is present 2024-02-08 19:13:09 -05:00
DropDemBits
039b3d0abb
Add make::ext::expr_self
Shortcut version of `make::expr_path(make::path_unqualified(make::path_segment_self()))`
2024-02-08 19:09:33 -05:00
DropDemBits
3924a0ef7c
Add ast versions of generate{_trait}_impl_text{_intransitive} 2024-02-08 19:09:33 -05:00
DropDemBits
8c0661b2de
Use GenericArgList for make::impl{_trait}
`make::impl_` no longer merges generic params and args in order to be in line
with `make::impl_`, which doesn't do it either.
2024-02-08 19:09:32 -05:00
bors
66cec4d11a Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
internal: Lint debug prints and disallowed types with clippy
2024-02-05 17:20:43 +00:00
Laurențiu Nicola
4f09335063 Merge remote-tracking branch 'upstream/master' into sync-from-rust 2024-02-02 08:40:28 +02:00
Lukas Wirth
9e8a0fae0c Lint debug prints and disallowed types with clippy 2024-02-01 17:57:27 +01:00
Johann Hemmann
771c6c9271 format_collect 2024-01-31 19:06:36 +01:00
bors
355c9444e1 Auto merge of #16448 - Young-Flash:typos, r=lnicola
minor: correct typos

I use [crate-ci/typos](https://github.com/crate-ci/typos) to check typos in codebase, if it's ok with you, I'd like to add a typo check CI using [typos](https://github.com/crate-ci/typos) (with Apache-2.0, MIT licenses).

BTW, we can add a [_typos.toml](https://github.com/crate-ci/typos/blob/master/docs/reference.md) as white list for some intentional typos
2024-01-31 13:29:55 +00:00
David Barsky
e1ea7c8844 internal: switch to tracing from log
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
Young-Flash
db9fd370ee minor: correct typos 2024-01-30 21:43:43 +08:00
Laurențiu Nicola
f43cea0878 Merge commit '7219414e81810fd4d967136c4a0650523892c157' into sync-from-ra 2024-01-28 15:56:54 +02:00
davidsemakula
da798bccf7 make ast::UseTree::wrap_in_tree_list more robust 2024-01-27 14:22:16 +03:00