YangzeLuo
b22e772cab
feat: Support for GOTO def from *inside* files included with include! macro
2024-01-27 23:36:01 +08:00
Alain Siegrist
7ec32d091a
Remove letelse control flow snippets
2024-01-27 14:35:22 +01:00
Alain Siegrist
51d57b9bb6
Make return a snippet
2024-01-27 14:35:22 +01:00
Alain Siegrist
57934ac47a
Add postfix completion for let else
2024-01-27 14:35:22 +01:00
davidsemakula
da798bccf7
make ast::UseTree::wrap_in_tree_list
more robust
2024-01-27 14:22:16 +03:00
bors
7219414e81
Auto merge of #16427 - Young-Flash:fix_no_such_field_diagnostics, r=Veykril
...
fix: filter out cfg disabled filed when lowering `RecordPat`
we should filter out field with disabled cfg when lowering ast `RecordPat` to hir.
close https://github.com/rust-lang/rust-analyzer/issues/16169
2024-01-27 10:52:36 +00:00
bors
27c3ed9de8
Auto merge of #16434 - Veykril:things, r=Veykril
...
internal: Restructure and cleanup hir-expand a bit
2024-01-27 10:16:35 +00:00
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
bors
4a23744d7d
Auto merge of #16435 - SomeoneToIgnore:less_resolve_data, r=lnicola
...
Do not return code lens data after resolving
2024-01-27 07:20:31 +00:00
Kirill Bulatov
ad5e2cfa3b
Do not return code lens data after resolving
2024-01-27 02:03:15 +02:00
Lukas Wirth
6cf7b5f8d7
Don't parse intra doc links as syntax trees
2024-01-26 20:00:47 +01:00
bors
596e5c77cf
Auto merge of #16431 - Ar4ys:fix-E0107-error-range-in-proc-macro, r=Veykril
...
Replaced adjusted_display_range with adjusted_display_range_new in mismatched_arg_count
For detailed description - see related issue.
Fixes : #16407
2024-01-26 18:53:03 +00:00
Lukas Wirth
5a343415e8
Add some size assertions
2024-01-26 19:28:39 +01:00
Lukas Wirth
d8ef6c24cc
Cleanup convert_path
2024-01-26 19:28:39 +01:00
Lukas Wirth
880baa9e56
Shuffle hir-expand things around
2024-01-26 19:28:39 +01:00
Lukas Wirth
e320004dad
Remove tt -> ast -> tt round trips in attrs lowering
2024-01-26 19:28:39 +01:00
Young-Flash
96ebad0409
minor: update conflict extension detect logic
2024-01-26 20:12:13 +08:00
bors
f09020567e
Auto merge of #16415 - Waqar144:work/make-try-to-nav-pub, r=Veykril
...
internal: Make TryToNav trait public
Currently there is no proper way to get a target FileRange for a given Definition.
2024-01-26 07:48:37 +00:00
Ar4ys
8f05e7ce55
Replaced adjusted_display_range with it's new version in mismatched_arg_count
2024-01-25 20:15:46 +01:00
Young-Flash
1374bc8c93
test: ensure no_such_field
diagnostic don't work for field with disabled cfg
2024-01-25 19:30:04 +08:00
Young-Flash
4505f03fbf
fix: filter out cfg disabled filed when lowering RecordPat
2024-01-25 19:27:37 +08:00
bors
38f7a3498e
Auto merge of #16426 - lnicola:bump-rustc, r=lnicola
...
minor: Bump rustc crates
This also reverts the earlier revert.
2024-01-25 04:49:36 +00:00
Laurențiu Nicola
ea94c10db0
Bump rustc_index and rustc_abi
2024-01-25 06:44:13 +02:00
Laurențiu Nicola
b1b99cbcf9
Bump rustc_lexer and rustc_parse_format
2024-01-25 06:42:48 +02:00
Laurențiu Nicola
b1b6e0c41a
Reapply "Detect NulInCStr
error earlier."
...
This reverts commit 0ea056552a
.
2024-01-25 06:40:07 +02:00
Nicholas Nethercote
858f4aca6c
Rename the unescaping functions.
...
`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string`
becomes `unescape_mixed`. Because rfc3349 will mean that C string
literals will no longer be the only mixed utf8 literals.
2024-01-25 12:28:11 +11:00
Nicholas Nethercote
56514076ac
Rework CStrUnit
.
...
- Rename it as `MixedUnit`, because it will soon be used in more than
just C string literals.
- Change the `Byte` variant to `HighByte` and use it only for
`\x80`..`\xff` cases. This fixes the old inexactness where ASCII chars
could be encoded with either `Byte` or `Char`.
- Add useful comments.
- Remove `is_ascii`, in favour of `u8::is_ascii`.
2024-01-25 12:28:11 +11:00
Nicholas Nethercote
85d56eeb63
Fix copy/paste error.
...
The `CString` handling code is erroneously identical to the `ByteString`
handling code.
2024-01-25 12:26:25 +11:00
dfireBird
e0446a0eb5
implement assist for let stmt with TryEnum type to guarded return
2024-01-25 00:13:16 +05:30
bors
0d52934d19
Auto merge of #16420 - Nadrieril:use-upstream-pattern-analysis, r=Veykril
...
Use upstream exhaustiveness checker!
Because it has been librarified!
The extra `Apache-2.0 WITH LLVM-exception` license is for `rustc_apfloat`. Also this duplicates `rustc_index` because the other upstream deps are still on an earlier version. They should be bumpable now though. Good thing is that we don't need this new crate to be synchronized with the others, which will make our lives easier.
2024-01-24 14:34:42 +00:00
Nadrieril
2370b70f25
Replace local copy of exhaustiveness checking with upstream librarified version
2024-01-23 15:54:00 +01:00
Young-Flash
56f54c87e7
fix lint and fmt
2024-01-22 19:33:26 +08:00
Young-Flash
e15f40e842
feat: add conflict ext (panicbit.cargo) detect
2024-01-22 18:49:39 +08:00
Waqar Ahmed
231f730e87
internal: Make TryToNav trait public
...
Currently there is no proper way to get a target FileRange for a given
Definition.
2024-01-22 15:20:58 +05:00
bors
d410d4a2ba
Auto merge of #16412 - lnicola:sync-from-rust, r=lnicola
...
internal: Sync from downstream
2024-01-21 19:22:25 +00:00
Laurențiu Nicola
56077149df
Format code
2024-01-21 21:16:53 +02:00
Laurențiu Nicola
0ea056552a
Revert "Detect NulInCStr
error earlier."
...
This reverts commit 6001c50cac
.
2024-01-21 21:10:05 +02:00
Laurențiu Nicola
ef6e6dfb1a
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2024-01-21 21:08:04 +02:00
Laurențiu Nicola
8af2b4dbee
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2024-01-21 21:07:48 +02:00
bors
47b0f466f5
Auto merge of #16409 - mu001999:master, r=HKalbasi
...
Remove unused codes
Detected by https://github.com/rust-lang/rust/pull/118257
2024-01-21 16:10:04 +00:00
Laurențiu Nicola
e4866b6ddb
Merge commit 'a9116523604c998e7781f60d3b5a6f586e0414a9' into sync-from-ra
2024-01-21 16:53:06 +02:00
Nadrieril
0661390ad4
Rollup merge of #120084 - weihanglo:pkgid-spec, r=Mark-Simulacrum
...
fix(rust-analyzer): use new pkgid spec to compare
Starting from rust-lang/cargo#13311 , Cargo's compiler artifact message
uses Package ID specification as package's identifier format.
Zulip topic: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/proc-macro-test.20bootstrap.20and.20pkgid.20JSON
cc `@ehuss`
2024-01-21 06:38:38 +01:00
r0cky
1a9ef233b7
Remove unused codes
2024-01-21 12:56:23 +08:00
bors
a911652360
Auto merge of #16406 - davidsemakula:editorconfig, r=lnicola
...
internal: add `max_line_length` to `.editorconfig`
This helps with setting proper visual guides/rulers for the right margin in some editors/IDEs (e.g. CLion)
2024-01-20 16:24:02 +00:00
bors
d4926c10b2
Auto merge of #16405 - dfireBird:guarded-return-for-loop, r=lnicola
...
fix: Include `for` construct in convert to guarded return conditions
2024-01-20 16:13:31 +00:00
davidsemakula
5aa7583a0d
add max_line_length to .editorconfig
2024-01-20 17:14:00 +03:00
dfireBird
721e79035d
include for
in convert to guarded return assist
2024-01-20 19:26:50 +05:30
bors
0c764216d5
Auto merge of #16396 - Young-Flash:fix_marco, r=Veykril
...
fix panic with reference in macro
it panic at `builder.make_mut(segment)`, where segment is from macro expand. And the usage reference in orginal macro call isn't a `PathSegment` so we can't update it in `apply_references`, I can't find a way to deal with it properly so here just filter out the reference in macro. LMK if there are better way to fix this
try to close https://github.com/rust-lang/rust-analyzer/issues/16328
2024-01-20 08:12:44 +00:00
Young-Flash
f9b5e0d219
minor: use reference.range
to get original range
2024-01-20 14:43:42 +08:00
bors
67cfbf231c
Auto merge of #16404 - Urhengulas:satisfy-clippy, r=Veykril
...
Work through temporarily allowed clippy lints, part 1
This is the first batch of not allowing but actually fixing the clippy lints. Each commit removes one lint from the lint table and then fixes the resulting warnings.
Follow-up to #16401
2024-01-19 20:47:05 +00:00