Releases: rust-lang/rust-analyzer
2023-04-10
Changelog #176
Commit: 01120f1
Release: 2023-04-10
(v0.3.1472
)
New Features
-
#14433
(first contribution) add#[doc(alias(..))]
-based completions. -
#14512
highlight escapes inchar
literals: -
#14455
add assist to convert nested functions to closures. -
#14432
drop support for non-syroot proc macro ABIs (proc macros no longer expand with Rust 1.63).
Fixes
#14486
desugarasync fn
completely.#14481
fix VS Code project linking pop-up buttons being swapped.#14482
use the correct path accessor in the project linking pop-up.#14483
do autoderef in "Generate delegate methods".#14493
insert whitespace between text and attribute macros.#14505
fix block-local trait impl solving regressions.#14520
unify types ininfer_expr_coerce_never()
.
Internal Improvements
#14521
,#14526
,#14528
add bounds for fields in derive macros.#14436
normalize associated types in paths in expressions.#14490
use an arena instead of a hash map in the crate graph.#14442
implement structured API for snippets.#14509
resolve labels in body lowering.#14511
always reborrow mutable reference receiver in methods.#14517
shuffle around somehir-def
modules.#14519
don't recreateHygiene
unnecessarily.#14518
remove unnecessaryName
s fromFunctionData::params
.#14525
remove parameter names from function item tree.#14524
render function parameters inhir-def
pretty printing.
See also the changelog post.
2023-04-04
Auto merge of #14468 - lowr:patch/expand-macro-bang, r=Veykril Expand Macro Recursively: don't append "!" to non-bang macro name When we run `Expand Macro Recursively`, we prepend a comment "Recursive expansion of foo! macro" to the expansion result. I've noticed we unconditionally render the macro name with "!" and, while super subtle, I feel a bit awkward when the macro is either a derive or attribute macro.
2023-04-03
Changelog #175
Commit: 2365762
Release: 2023-04-03
(v0.3.1459
)
New Features
#14366
prompting the user to add aCargo.toml
of unlinked file to thelinkedProjects
.
Fixes
#14422
(first contribution) don't escape double hashes outside of Rust code blocks.#14444
(first contribution) pass environment variables to debug runnables.#14424
check ancestor blocks for local trait impls.#14434
usestruct_tail_without_normalization
inExpectation::rvalue_hint
.#14440
handle box and raw pointers correctly inbuiltin_deref
.#14461
use async block in async function type inference.#14435
add missing autoborrow adjustment for index expressions.#14426
fix stack overflow in inhabitedness checking.#14464
fix false-positiveneeds-mut
on array.#14449
recover frompub()
visibility modifier.#14468
don't append ! to derive and attribute macros in "Expand macro recursively".#14419
use the rightCrateId
s for proc macros inrust-project.json
workspaces.#14427
allow subsequentrust-project.json
-based workspaces to get proc macro expansion.#14430
canonicalizerust-project.json
manifest path.
Internal Improvements
#14465
(first contribution) add limited syntax support for return type notations.#14425
(first contribution) fix typo in comment.#14410
add config to specifiy LRU capacities for all queries.#14445
introduceStructFlags
.#14448
don't exposeInferenceTable
outside ofhir-ty
.#14439
set durability to high forenable_proc_attr_macros
input.#14454
refineCrateOrigin
variants.#14458
clean upCrateGraph
construction.
See also the changelog post.
2023-03-27
Changelog #174
Commit: b99d5eb
Release: 2023-03-27
(v0.3.1451
)
New Features
#14405
,#14409
,#14415
load proc macros asynchronously.#14368
MIR episode 3, add support for?
, function pointers and trait objects.
Fixes
#14385
(first contribution) fix VS Code status message formatting error.#14407
fix renames of locals used in macro calls.
Internal Improvements
#14380
coalesce adjacentIndel
s.#14402
reject symlinks inrust-project.json
.#14408
only intern blocks that declare items.#14412
handle proc macro fetching viaOpQueue
.#14404
remove client side proc-macro version check.
See also the changelog post.
2023-03-20
Changelog #173
Commit: 825833c
Release: 2023-03-20
(v0.3.1443
)
New Features
-
#14281
add quick fix for inserting anunsafe
block:add-unsafe.mp4
-
#13789
prioritize missing variants in match pattern completions: -
#14354
add signature help for record and tuple struct patterns: -
#13994
lint incoherent inherent impls:
Fixes
#12958
fix return type of async closures.#14337
allow the status bar item to be clicked again.#14347
addStorageDead
forlet
bindings without initializer (fixes false positiveneeds-mut
in loops).#14348
fix rustc proc-macro handling in the rustc workspace.#14349
respect parent blocks in visibility resolution.#14338
only skip reborrow adjustment hints for block,if
andmatch
expressions.#14353
don't replaceSyntaxToken
withSyntaxNode
in "Inline call".#14355
don't emit unnecessary reference completions.#14357
don't pass feature flags to rustc private crates metadata invocation.#14359
don't retry inlay hint requests.#14361
fixast::IfExpr
child accessors.
Internal Improvements
#14307
add Cargo-style project discovery for Buck and Bazel users.#14362
prioritize "Removedbg!
" assist over "Inline macro".#14358
report sysroot and rustc crate loading errors.#14334
,#14336
addis_float
,is_char
andas_slice
tohir::Type
.#14378
bumpchalk
to fix a GAT bug.#14342
add path of workspace root folders to status output.#14340
renameAstDatabase
toExpandDatabase
.
See also the changelog post.
2023-03-13
Changelog #172
Commit: f1e51af
Release: 2023-03-13
(v0.3.1435
)
New Features
-
#14232
,#14316
MIR episode 2, addneed-mut
and experimentalunused-mut
diagnostics: -
#14313
add fancy buttons to the VS Code status message: -
#14266
makereplace_or_with_or_else
assists more generally applicable. -
#14328
allow passing extracargo
args when running build scripts.
Fixes
#14323
(first contribution) fix source root de-duplication.#14267
mark unresolved field, unresolved method and expected function diagnostics as experimental.#14297
addlibcore
dependency to proc macros.#14282
load proc macros forrustc_private
crates.#14260
tightenreplace_match_with_if_let
applicability range.#14271
don't trigger unresolved method/field diagnostics on types containing errors.#14284
highlight unresolved derives as such.#14248
show diagnostic for}
followed byelse
inlet-else
statement.#14283
don't send error notifications for workspace failures if server status is supported.#14286
fix block defmap not looking into tail expressions for macro calls.#14291
fix handling of multiple definition bindings inconvert_match_to_let_else
.#14299
fix searching inside bodies of attributed items.#14300
watch both stdout and stderr in flycheck.#14306
fix block with no termination in or-patterns.
Internal Improvements
#14261
reuse the resolver inInferenceContext
instead of rebuilding it when needed.#14302
add missing queries toper_query_memory_usage
.#14311
don't attempt to compute diagnostics in library crates.#14326
renamematch_expr
field ofhir::diagnostics::MissingMatchArms
.
See also the changelog post.
2023-03-06
Changelog #171
Commit: 0a956ec
Release: 2023-03-06
(v0.3.1426
)
New Features
-
#14240
diagnosebreak
with value in incorrect positions: -
#14243
diagnose unresolved field, method call and call expression: -
#14238
allow "Generate function" to create functions in a different local crate. -
#14222
,#14245
implement pattern mismatch diagnostics, but keep them disabled.
Fixes
#14185
(first contribution) fix running doctests for structs with lifetime parameters.#14208
(first contribution) fix path resolution in the presence of functions and structs with the same name.#14223
implement rendering of tuples in constant values.#14225
removing nesteddbg!()
s in "Removedbg!()
".#14176
fix associated item visibility in block-local impls.#14239
load the sysroot in all CLI commands.#14247
generate correct completion edits for missing macro arguments.#14255
bring back the hex display in const hover.
Internal Improvements
#14040
introduce a MIR and use it for constant evaluation.#14218
,#14234
de-duplicate source roots that have overlapping include paths.#14184
handle trait alias definitions.#14244
report type metrics for patterns.#14251
set unit type expectation for expression statements without a semicolon.#14252
handle fields called as method calls as the fields they resolve to.#14213
add API to getraw_ptr
type.
See also the changelog post.
2023-02-27
Changelog #170
Commit: 4e29820
Release: 2023-02-27
(v0.3.1410
)
New Features
-
#14175
(first contribution) add "Open Docs" command to the context menu: -
#14207
(first contribution) respectCARGO_HOME
in toolchain detection.
Fixes
#14203
(first contribution) add check for extra path segments after a fully qualified one.
Internal Improvements
#14183
try to improve therustfmt.overrideCommand
docs.
See also the changelog post.
2023-02-20
Changelog #169
Commit: a6603fc
Release: 2023-02-20
(v0.3.1410
)
New Features
- GitHub Discussions are now enabled on the
rust-analyzer
repository. #14141
support UTF-32 position encoding; together with this change, fixes Emacslsp-mode
emoji crashes.
Fixes
#14162
(first contribution) check snippet capability in "Generate getter".#14140
fix delimiter stripping inproc-macro-server
.#14123
don't trigger postfix completion beforeelse
.#14122
don't expand macros in the same expansion tree after overflow.#14144
strip prefix when searching for raw identifiers.#14138
don't includer#
prefix in filesystem changes.#14157
adjust binding mode inlay hints to render better with@
patterns.#14160
bring back hovering call parentheses for return type information.#14149
trigger call info for more signature completions.
Internal Improvements
#14153
(first contribution) add v7 proc macro metadata support.#14171
(first contribution) fix link inarchitecture.md
.#14128
improve parser recovery for delimited lists.#14150
don't allocate thegeneric_args
Vec
inhir_def::Path
if every element isNone
(~9 MB win onanalysis-stats self
).#14152
replace some often emptyVec
s with boxed slices (~2 MB win onanalysis-stats self
).#14151
enablesmallvec
'sunion
feature (~4 MB win onanalysis-stats self
).#14156
don't reconstruct ref match completion into_proto
manually.#14165
makeCompletionItem
more POD-like.#14147
don't rely on VSCode internal commands in the server.
See also the changelog post.
2023-02-13
Changelog #168
Commit: 646f973
Release: 2023-02-13
(0.3.1402
)
New Features
-
#14095
(first contribution) addunsafe
postfix completions. -
#14098
(first contribution) add support forDidChangeWorkspaceFolders
notifications. -
#13991
add an "Add braces: assist: -
#13986
add a setting to limit the number of completions. -
#14127
buildi686-pc-windows-msvc
binaries. -
#14135
add Lapce installation instructions. -
#14134
add clippy configuration section to the manual.
Fixes
#14114
(first contribution) insert spaces when inlining macros.#14084
fix parsing of nested tuple field accesses (in a cursed way).#14092
don't panic on broken syntax trees in adjustment inlay hints.#14099
properly use location links for type hints ofimpl Future
and its associated type.#14103
don't insert a semicolon when typing=
if parse errors are encountered.#14110
fix completions after functions with no bodies.#14111
hide proc macro server version detection errors.#14125
don't render bind pattern inlay hints for constants.#14116
render discriminant inlay hints for mixed variants if at least one discriminant is specified.#13975
suppress extra indent after the end of field and function chains.
Internal Improvements
#14091
support sysroot library source being defined inside the workspace.#14100
allow specifying what proc-macro server to run inrust_analyzer::load_cargo
.#14119
remove a few allocations inhir_ty::utils
.#14090
unify language configuration folding markers with server behaviour.
See also the changelog post.