Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ rust-analyzer #105855

Merged
merged 378 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
378 commits
Select commit Hold shift + click to select a range
a2beeb8
Auto merge of #13721 - Veykril:incoherent-impls, r=Veykril
bors Dec 4, 2022
fb60b10
Add JSON schema contribution
MariaSolOs Dec 4, 2022
4794572
feat: allow unwrap block in let initializers
feniljain Dec 5, 2022
fc627e6
Update to Chalk 88
detrumi Dec 5, 2022
a75bffc
Increase Chalk fuel from 100 to 1000
detrumi Dec 5, 2022
f9bd487
Auto merge of #13728 - detrumi:chalk-update, r=lnicola
bors Dec 5, 2022
cf54b8c
Parse and collect derive helpers for builtin derive macros
lowr Nov 7, 2022
051c659
Resolve macro2's derive helpers in IDE layer
lowr Dec 6, 2022
df07c8f
Auto merge of #13730 - lowr:feat/builtin-macro-helper-attr, r=Veykril
bors Dec 6, 2022
fed74c8
fix: add fallback case in generated `PartialEq` impl
rami3l Dec 6, 2022
5f79279
Add `remove_parentheses` assist
WaffleLapkin Dec 6, 2022
ab06194
Consider expression precedense in `remove_parentheses` assist
WaffleLapkin Dec 6, 2022
05906da
use rustc crates instead of copy paste
HKalbasi Dec 6, 2022
948a8f0
Add a fixme comment in current_target_data_layout
HKalbasi Dec 6, 2022
57fb18e
fix: refine fallback case in generated `PartialEq` impl
rami3l Dec 7, 2022
6e8a54d
Auto merge of #13490 - HKalbasi:layout, r=jonas-schievink
bors Dec 7, 2022
46e1486
Disallow access to free `BoundVar`s outside `TyLoweringContext`
lowr Dec 7, 2022
19e3085
Only shift `BoundVar`s that come from outside `TyLoweringContext`
lowr Dec 8, 2022
2870b01
Explicitly say that the assist removes *redundant* parentheses
WaffleLapkin Dec 8, 2022
8d42439
Move precedence handling to `crates/syntax`
WaffleLapkin Dec 8, 2022
ba6f0be
Simplify `remove_parentheses`'s implementation
WaffleLapkin Dec 8, 2022
e80674e
Show type info on hover of enum variant fields
Veykril Dec 9, 2022
83e2639
Auto merge of #13722 - MariaSolOs:add-json-contrib, r=Veykril
bors Dec 9, 2022
34e654c
Auto merge of #13733 - WaffleLapkin:remove_parens, r=Veykril
bors Dec 9, 2022
d7183fb
fix: make make_body respect comments in extract_function
feniljain Dec 9, 2022
7d46657
Add numThreads in config to avoid spawning lots of threads every time
vtta Dec 9, 2022
9f5a547
Regenerate config
vtta Dec 9, 2022
1efcb6a
Import the initial implementation of AsciiDoc-to-Markdown conversion
noritada Dec 9, 2022
a0296c2
Auto merge of #13745 - Veykril:ty-hint-variant-field, r=Veykril
bors Dec 9, 2022
7c9a85b
fix: Don't show duplicated adjustment hints for blocks, ifs and matches
WaffleLapkin Dec 9, 2022
34b11d9
fix: normalize projection after discarding free `BoundVar`s in RPIT
lowr Dec 9, 2022
1449204
Auto merge of #13749 - WaffleLapkin:remove_some_redudant_adjustment_h…
bors Dec 9, 2022
240fc25
Add image/video media support in AsciiDoc-to-Markdown conversion
noritada Dec 10, 2022
518e39b
Auto merge of #13742 - lowr:fix/assoc-type-shorthand-with-gats, r=flo…
bors Dec 10, 2022
632f804
Auto merge of #13750 - lowr:fix/rpit-in-projection, r=flodiebold
bors Dec 10, 2022
7012b50
feat: resolve const for trait impls(close #13694)
bvanjoi Dec 5, 2022
a3ea20a
Auto merge of #13725 - bvanjoi:resolve-const-triat-impls, r=flodiebold
bors Dec 10, 2022
d3cb032
Make assoc_resolutions always have a Substitution
flodiebold Dec 10, 2022
21e61be
Auto merge of #13756 - flodiebold:simplify-assoc-item-subst, r=flodie…
bors Dec 10, 2022
0eb537f
Add support for list nesting in AsciiDoc-to-Markdown conversion
noritada Dec 11, 2022
f06a29f
Implement `xtask publish-release-notes` to publish release notes on G…
noritada Dec 11, 2022
97ec0ea
Update the release process documentation to run `xtask publish-releas…
noritada Dec 11, 2022
86621a7
Correct complex list item support in AsciiDoc-to-Markdown conversion
noritada Dec 12, 2022
ed48bd8
Fix parsing of `_ = x` in closure body
Dec 12, 2022
16c70fe
Auto merge of #13762 - jonas-schievink:underscore-expr-first, r=jonas…
bors Dec 12, 2022
3a7215b
Auto merge of #13732 - rami3l:fix/gen-partial-eq, r=jonas-schievink
bors Dec 12, 2022
e7dff74
Auto merge of #13726 - feniljain:fix_assists, r=jonas-schievink
bors Dec 12, 2022
15ff8a5
Auto merge of #13715 - feniljain:fix_completions, r=jonas-schievink
bors Dec 12, 2022
4596847
Auto merge of #13746 - feniljain:fix_extract_function, r=jonas-schievink
bors Dec 12, 2022
7ed0871
Fix "needs parens" check in `remove_parentheses` assist
WaffleLapkin Dec 13, 2022
c7c6c6b
Make `curl` fail on errors in `xtask publish-release-notes`
noritada Dec 13, 2022
ef4a9f0
Fix wrong config patching logic for addCallParenthesis
Dec 13, 2022
9e0aaf4
Parse `..= X` patterns
Dec 13, 2022
a77336b
Implement inline macro handling for AsciiDoc-to-Markdown conversion
noritada Dec 13, 2022
fd5be91
Integrate inline macro support with the main AsciiDoc-to-Markdown con…
noritada Dec 14, 2022
c78d759
Add a link to the original changelog from release notes on GitHub Rel…
noritada Dec 14, 2022
37b404d
minor: Set the `experimental` AsciiDoc document attribute to generate…
noritada Dec 14, 2022
12b05d2
fix: add generic `TypeBoundList` in generated derivable impl
rami3l Dec 13, 2022
5bd9373
Auto merge of #13766 - rust-lang:fix-config-patch, r=Veykril
bors Dec 14, 2022
bb99d2a
fix: resolve all inference vars in `InferenceResult::assoc_resolutions`
lowr Dec 14, 2022
fb4e935
Auto merge of #13769 - jonas-schievink:parse-half-open-range-pat, r=j…
bors Dec 14, 2022
16de9a7
Auto merge of #13774 - lowr:fix/no-infer-vars-in-inference-result, r=…
bors Dec 14, 2022
95671d5
Auto merge of #13772 - noritada:minor/set-experimental-attr-to-change…
bors Dec 14, 2022
6a295fc
fix: add a check for `if` token in patterns parser
dzvon Dec 15, 2022
0c6fd4d
Split the input/output data of the conversion from the test code to t…
noritada Dec 15, 2022
fccc094
Make minor improvements and cleanups
noritada Dec 15, 2022
258e532
docs: update the comment and add a test to `half_open_range_pat`
dzvon Dec 16, 2022
4909d4f
Auto merge of #13777 - dzvon:fix-13776, r=jonas-schievink
bors Dec 16, 2022
b6c2bb2
Add parentheses for binding mode hints when they attach to an Or-pattern
Veykril Dec 16, 2022
8f6d0cd
Auto merge of #13783 - Veykril:bm-hints, r=Veykril
bors Dec 16, 2022
ba3e328
Deduplicate inserted parentheses in binding mode hints
Veykril Dec 16, 2022
19c2ede
Auto merge of #13784 - Veykril:bm-hints, r=Veykril
bors Dec 16, 2022
a04feb9
Add command for manually running flychecks
Veykril Dec 16, 2022
e0aa5af
Auto merge of #13785 - Veykril:run-flycheck, r=Veykril
bors Dec 16, 2022
cfa9149
refactor: use `generate_trait_impl_text_intransitive` for `From`-like…
rami3l Dec 14, 2022
cdfe98f
Make manual flycheck runs work when checkOnSave is disabled
Veykril Dec 17, 2022
d8ddde2
Make cancelFlycheck request a notification
Veykril Dec 17, 2022
cf8d89e
Add a command to clear flycheck diagnostics
Veykril Dec 17, 2022
9ed1829
Auto merge of #13792 - Veykril:flycheck, r=Veykril
bors Dec 17, 2022
c110481
Reset parser step count when bumping
Dec 19, 2022
1f74b1b
Auto merge of #13794 - jonas-schievink:reset-step-limit-after-bump, r…
bors Dec 19, 2022
5706910
Use the correct edition when formatting path deps
Dec 19, 2022
ffedfc6
Auto merge of #13795 - jonas-schievink:fix-rustfmt-edition-in-path-de…
bors Dec 19, 2022
e027ac0
fix: don't let mbe expr fragments match let exprs and inline consts
lowr Dec 20, 2022
ccbf8fe
Auto merge of #13800 - lowr:fix/mbe-expr-backwards-compat, r=Veykril
bors Dec 20, 2022
191cfba
Split inlay hints into modules
WaffleLapkin Dec 16, 2022
1c8bcf0
Move inlay hints tests into implementation modules
WaffleLapkin Dec 20, 2022
046a567
Add docs to make tidy tests happy :')
WaffleLapkin Dec 20, 2022
9dfb9df
Auto merge of #13804 - WaffleLapkin:inlay_hint_mods, r=Veykril
bors Dec 20, 2022
babd4c7
Don't panic in `Expr::needs_parens_in`
WaffleLapkin Dec 20, 2022
1116cc9
return immediately from `render_tuple_lit` if `snippet_cap` is None
ntBre Dec 20, 2022
694ae77
pass `snippet_cap` to `format_literal_label`, return early if None
ntBre Dec 20, 2022
5c8f00f
Auto merge of #13805 - ntBre:master, r=jonas-schievink
bors Dec 20, 2022
927d56a
Auto merge of #13764 - WaffleLapkin:badassexprs, r=Veykril
bors Dec 20, 2022
91a89ef
Save source & target types in `hir`'s `expr_adjustments`
WaffleLapkin Dec 20, 2022
874ff2b
Skip adjustment hints if the adjustment doesn't adjust
WaffleLapkin Dec 20, 2022
761b127
Auto merge of #13806 - WaffleLapkin:typed_blåhaj, r=Veykril
bors Dec 20, 2022
801a223
Implement location link for type inlay hints
HKalbasi Dec 1, 2022
33591cd
Calculate the TargetDataLayout correctly for the selected target
Veykril Dec 21, 2022
e1aa73e
Disable inlay hint location links on vscode < 1.76
HKalbasi Dec 21, 2022
4748357
Drive-by cleanup: fully qualify `ast::Expr` in `hir`
WaffleLapkin Dec 21, 2022
3c00b19
Auto merge of #13771 - noritada:feature/release-notes-on-github-relea…
bors Dec 21, 2022
3bfe704
Add an option to hide adjustment hints outside of unsafe blocks
WaffleLapkin Dec 21, 2022
a694c34
Fix tests not using appropriate target data
Veykril Dec 21, 2022
c2840c8
Auto merge of #13814 - Veykril:layout, r=Veykril
bors Dec 21, 2022
8f8200e
Simplify
Veykril Dec 21, 2022
608dc49
Move `is_inside_unsafe` to `Semantics` impl
WaffleLapkin Dec 21, 2022
113f17b
Auto merge of #13818 - Veykril:layout, r=Veykril
bors Dec 21, 2022
271f7b4
Auto merge of #13699 - HKalbasi:inlaylink, r=Veykril
bors Dec 21, 2022
1038db5
Apply suggestions from code review
WaffleLapkin Dec 21, 2022
b9341e2
Fix binding mode hints always adding parentheses to or-patterns
Veykril Dec 22, 2022
eb3963b
Auto merge of #13817 - WaffleLapkin:hide_adjustment_hints_outside_of_…
bors Dec 22, 2022
ef4c816
Pass `FamousDefs` around in inlay hints
WaffleLapkin Dec 22, 2022
b48a1ae
Auto merge of #13822 - WaffleLapkin:famous, r=Veykril
bors Dec 22, 2022
a065255
Auto merge of #13820 - Veykril:or-pat-bm-fix, r=Veykril
bors Dec 22, 2022
1d59c7b
Remove non-needed clones
nyurik Dec 23, 2022
f1785f7
Auto merge of #13828 - nyurik:rm-dup-clone, r=lnicola
bors Dec 23, 2022
e341e99
Clippy-fix explicit auto-deref
nyurik Dec 23, 2022
19e5adc
Auto merge of #13829 - nyurik:explicit-auto-deref, r=lnicola
bors Dec 23, 2022
ec55dd1
Minor manual cleanu
nyurik Dec 23, 2022
df8fc78
Enum variant discriminants hints
Veykril Dec 23, 2022
67cbd8f
fix(completion): remove bound insert of type in trait
bvanjoi Dec 23, 2022
16654ce
Create new inline_macro assist.
tfpk Dec 23, 2022
fb0db2a
Auto merge of #13831 - bvanjoi:fix_bound_type_in_trait_insert, r=Veykril
bors Dec 23, 2022
1927c2e
Auto merge of #13830 - nyurik:lints, r=lnicola
bors Dec 24, 2022
e16c76e
Inline all format arguments where possible
nyurik Dec 23, 2022
a639917
fix: handle lifetime variables in `CallableSig` query
lowr Dec 24, 2022
b8f5115
fix: generate delegate async methods
xor-bits Dec 25, 2022
2872e05
Auto merge of #13835 - nyurik:inline_format_args, r=lnicola
bors Dec 25, 2022
d3dbf9c
Moar linting: needless_borrow, let_unit_value, ...
nyurik Dec 24, 2022
a1a4083
Add regression test
lowr Dec 25, 2022
74ae2dd
Auto merge of #13840 - lowr:fix/hir-callable-sig-escaping-boundvars, …
bors Dec 25, 2022
47c6c8e
Extract multi-character punct handling into a method
lowr Dec 24, 2022
ec7148b
mbe: split `Op::Leaf` and handle multi-character puncts
lowr Dec 27, 2022
767351f
mbe: treat `<-` as one punct
lowr Dec 27, 2022
a7d4114
mbe: handle multi-character separator
lowr Dec 27, 2022
3033c3d
Auto merge of #13841 - nyurik:lints2, r=lnicola
bors Dec 27, 2022
16264a3
fixup a doc comment
WaffleLapkin Dec 28, 2022
eecab99
Allow `break` and co to go through `try{}` blocks
WaffleLapkin Dec 28, 2022
797da9e
Actually test `async{}` blocks in `async_blocks_are_borders`
WaffleLapkin Dec 28, 2022
ef303f2
Actually test closures in `closures_are_borders`
WaffleLapkin Dec 28, 2022
aaa682c
Implement `try{}` block type inference
WaffleLapkin Dec 28, 2022
4a16afa
Parse `do yeet` expressions
WaffleLapkin Dec 28, 2022
346bf5f
Implement `do yeet` expression
WaffleLapkin Dec 28, 2022
da7ce6f
derive 'Hash'
danieleades Dec 30, 2022
ba5067a
suppress 'clippy::approx_constant' lint in test case
danieleades Dec 30, 2022
3aae785
Avoid useless format
lnicola Dec 30, 2022
d96c489
Rephrase clippy policy
lnicola Dec 30, 2022
72afcf2
Use `rustc_safe_intrinsic` attribute to check for intrinsic safety
Noratrieb Dec 30, 2022
6892b16
Auto merge of #13865 - lnicola:nits2, r=Veykril
bors Dec 30, 2022
ea8897c
Auto merge of #13856 - WaffleLapkin:typeck_try{}, r=Veykril
bors Dec 30, 2022
20b0ae4
Auto merge of #13857 - WaffleLapkin:yeet, r=Veykril
bors Dec 30, 2022
09bc37c
Auto merge of #13861 - danieleades:derive-hash, r=Veykril
bors Dec 30, 2022
0d76b94
Auto merge of #13866 - Nilstrieb:rustc_safe_intrinsic, r=Veykril
bors Dec 30, 2022
5d54c55
Fallback to invisible associated functions and constants if no visibl…
Veykril Dec 30, 2022
0430b68
Remove unused known `Name`s
lowr Dec 31, 2022
f1c4150
Auto merge of #13868 - lowr:patch/unused-known-names-bye, r=Veykril
bors Dec 31, 2022
b196e5b
fixup
danieleades Dec 31, 2022
1d782a9
Add test for private method inference fallback
Veykril Dec 31, 2022
dbeee34
Auto merge of #13867 - Veykril:meth-res-fallback, r=Veykril
bors Dec 31, 2022
ec125fe
Improve exit point highlighting for non-loop loops in tail position
Veykril Dec 31, 2022
f5e7bf2
Auto merge of #13869 - Veykril:exit-points, r=Veykril
bors Dec 31, 2022
332dd6a
fix: merge multiple intersecting ranges
lowr Dec 31, 2022
e3d144d
Diagnose private field accesses
Veykril Dec 31, 2022
da15d92
Auto merge of #13870 - Veykril:private-field-diag, r=Veykril
bors Dec 31, 2022
f31733b
Auto merge of #13871 - lowr:fix/extract-module-merge-multiple-ranges,…
bors Dec 31, 2022
eee7de0
Diagnose private assoc item accesses
Veykril Jan 1, 2023
643bc02
Auto merge of #13875 - Veykril:private-field-diag, r=Veykril
bors Jan 1, 2023
34bc240
Package release artifacts as ZIP
lnicola Jan 1, 2023
cf2fa14
fix: prefix prelude items whose name collides in current scope
lowr Jan 2, 2023
e986de0
Auto merge of #13877 - lowr:fix/find-path-prefix-shadowed-prelude, r=…
bors Jan 2, 2023
790759f
Auto merge of #13854 - lowr:fix/mbe-glue-punct, r=Veykril
bors Jan 2, 2023
17cc78f
Auto merge of #13832 - Veykril:discriminant-hints, r=Veykril
bors Jan 2, 2023
7705167
use inline format args
danieleades Dec 30, 2022
ed12887
remove needless borrows
danieleades Dec 30, 2022
7530d76
use pointer args
danieleades Dec 30, 2022
cc80c5b
remove unnecessary lazy evaluations
danieleades Dec 30, 2022
efd2c20
remove useless conversions
danieleades Dec 30, 2022
8615bba
use 'unwrap_or_default'
danieleades Dec 30, 2022
4f8ffd0
remove unnecessary lifetimes that can be elided
danieleades Dec 30, 2022
0a08179
return value directly from if/else block
danieleades Dec 30, 2022
aa90d02
remove useless operations
danieleades Dec 30, 2022
bb083b8
remove useless casts
danieleades Dec 30, 2022
f51111a
Write down adjustments introduced by binary operators
Veykril Jan 2, 2023
506895f
Fix spelling mistake
Veykril Jan 2, 2023
e75e2f8
Auto merge of #13882 - Veykril:bin-op-adjust, r=Veykril
bors Jan 2, 2023
ddc0147
Fix diagnostic code
veber-alex Dec 27, 2022
50801b7
Auto merge of #13853 - veber-alex:diag_fix, r=Veykril
bors Jan 3, 2023
b996a54
Skip lifetime elision on fn pointers and fn trait types
Veykril Jan 3, 2023
5033213
Auto merge of #13885 - Veykril:bin-op-adjust, r=Veykril
bors Jan 3, 2023
c4d8cf1
Use ZWNJ to prevent VSCode from forming ligatures between hints and code
Veykril Jan 3, 2023
0b14cd9
Auto merge of #13886 - Veykril:inlay-ligatures, r=Veykril
bors Jan 3, 2023
b6bb1e9
Only set machine-applicable rustc diagnostics as preferred
Veykril Jan 3, 2023
a97c71f
Auto merge of #13887 - Veykril:rustc-diag-preferred, r=Veykril
bors Jan 3, 2023
21ea004
fix: unescape inline module names in module resolution
lowr Jan 4, 2023
ae73628
fix: keep whitespace in extract function handler
bvanjoi Jan 4, 2023
150da92
return immediately from `render_record_lit` if `snippet_cap` is None
ntBre Jan 4, 2023
80cabf7
Auto merge of #13893 - ntBre:master, r=lnicola
bors Jan 4, 2023
1bfc732
Store diverging flag for type variables as bitflags
lowr Jan 5, 2023
b183612
Add `INTEGER` and `FLOAT` flags for type variables
lowr Jan 5, 2023
d01630c
Apply fallback to scalar type variables before final obligation resol…
lowr Jan 5, 2023
9f6567f
Fix option_env expansion
lnicola Jan 6, 2023
f1a9901
Auto merge of #13898 - lnicola:option-env, r=Veykril
bors Jan 6, 2023
7449f9f
Auto merge of #13894 - lowr:patch/fallback-before-final-obligation-re…
bors Jan 7, 2023
1bd1a09
Auto merge of #13876 - lnicola:zip-artifacts, r=lnicola
bors Jan 7, 2023
41d290d
Bump d3-color and d3-graphviz in /editors/code
dependabot[bot] Jan 7, 2023
f77b68a
Auto merge of #13860 - danieleades:clippy, r=lnicola
bors Jan 8, 2023
25717af
Auto merge of #13905 - rust-lang:dependabot/npm_and_yarn/editors/code…
bors Jan 9, 2023
0dd2682
Refactor replace_arith assists into one module
Veykril Jan 9, 2023
9290399
fix: rename to extract_expressions_from_format_string
unvalley Nov 26, 2022
796a106
fix: ide assist handlers order
unvalley Nov 26, 2022
13267ad
fix: to leave Ident in parse_format_exprs
unvalley Nov 27, 2022
29f3d7d
test: fix arg_type test
unvalley Nov 27, 2022
285f09c
feat: extract only expressions from format string
unvalley Nov 27, 2022
872df2f
chore: update assist label name
unvalley Nov 27, 2022
a310fc0
docs: update assist comment
unvalley Nov 27, 2022
9eabc2c
fix: add_format_like_completions to handle no exprs
unvalley Nov 28, 2022
814ff01
Auto merge of #13458 - cameron1024:suggest-checked-wrapping-saturatin…
bors Jan 9, 2023
1e20bf3
Auto merge of #13684 - unvalley:extract-expressions-from-format-strin…
bors Jan 9, 2023
fe8ee9c
Auto merge of #13744 - vtta:numthreads, r=Veykril
bors Jan 9, 2023
ae65912
Auto merge of #13763 - rami3l:fix/gen-partial-eq-generic, r=Veykril
bors Jan 9, 2023
87d57f5
Rename checkOnSave settings to flycheck
Veykril Dec 20, 2022
d2bb62b
Rename checkOnSave settings to check
Veykril Jan 9, 2023
b89c4f0
Implement postfix adjustment hints
WaffleLapkin Dec 20, 2022
b0214d8
Auto merge of #13843 - Overpeek:master, r=Veykril
bors Jan 9, 2023
12b7f9f
Add an option to minimize parentheses for adjustment hints
WaffleLapkin Dec 21, 2022
a9676cf
Add a "bug" test for adjustment hints to check for status quo
WaffleLapkin Dec 21, 2022
b6169c2
Add a fixme to remove hacks
WaffleLapkin Jan 9, 2023
ec96819
Auto merge of #13816 - WaffleLapkin:postfix_adjustment_hints, r=Veykril
bors Jan 9, 2023
44c84a8
Add `convert_ufcs_to_method` assist
WaffleLapkin Dec 6, 2022
769273c
Simplify code with @Veykril's suggestion.
tfpk Jan 9, 2023
938a39a
Auto merge of #13891 - bvanjoi:reverse-whitespace-in-assists, r=Veykril
bors Jan 9, 2023
c782353
Rename assist: `convert_ufcs_to_method` => `unqualify_method_call`
WaffleLapkin Jan 9, 2023
336608a
Auto merge of #13810 - tfpk:tfpk/macro-inline, r=Veykril
bors Jan 9, 2023
bdaad9e
Make `qualify_method_call` `RefactorRewrite`
WaffleLapkin Jan 9, 2023
d33fa38
Auto merge of #13825 - WaffleLapkin:ufcs_to_method_call_and_back, r=V…
bors Jan 9, 2023
ba204ef
Auto merge of #13863 - danieleades:approx-constant, r=Veykril
bors Jan 9, 2023
e125bee
Auto merge of #13890 - lowr:fix/unescape-inline-mod-name, r=Veykril
bors Jan 9, 2023
f920b03
Auto merge of #13914 - WaffleLapkin:qualify_method_call_rewrite, r=ln…
bors Jan 9, 2023
fd300ee
Auto merge of #13799 - Veykril:flycheck, r=Veykril
bors Jan 9, 2023
9eb50d3
Make it clearer when the server expects an initialized notification
Veykril Jan 9, 2023
f32e20e
Auto merge of #13915 - Veykril:lsp-server-msg, r=Veykril
bors Jan 9, 2023
1b8141b
Parse + decorate rendered ANSI cargo output
ian-h-chamberlain Jan 3, 2023
4020790
Default to use colored ANSI diagnostics
ian-h-chamberlain Dec 28, 2022
c3e4bc3
Update docs to include note about ANSI diagnostics
ian-h-chamberlain Dec 25, 2022
738ce83
Strip colors before matching preview diagnostics
ian-h-chamberlain Jan 3, 2023
65cf7ab
Use experimental capability to enable color codes
ian-h-chamberlain Jan 4, 2023
283dfc4
Add docs for `colorDiagnosticOutput` capability
ian-h-chamberlain Jan 9, 2023
368e0bb
Auto merge of #13848 - ian-h-chamberlain:feature/color-compiler-diagn…
bors Jan 9, 2023
06e705f
:arrow_up: rust-analyzer
arcnmx Jan 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
89 changes: 81 additions & 8 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"

[[package]]
name = "camino"
version = "1.1.1"
Expand Down Expand Up @@ -171,9 +177,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "chalk-derive"
version = "0.86.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5499d415d855b5094366a824815341893ad3de0ecb6048c430118bdae6d27402"
checksum = "4df80a3fbc1f0e59f560eeeebca94bf655566a8ad3023c210a109deb6056455a"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -183,9 +189,9 @@ dependencies = [

[[package]]
name = "chalk-ir"
version = "0.86.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3800118c76a48507b0eece3a01f3a429b5c478d203c493096e6040c67ab960e1"
checksum = "f39e5272016916956298cceea5147006f897972c274a768ed4d6e074efe5d3fb"
dependencies = [
"bitflags",
"chalk-derive",
Expand All @@ -194,9 +200,9 @@ dependencies = [

[[package]]
name = "chalk-recursive"
version = "0.86.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1baf60628fd73104d1f8562586a52d48f37f1e84435aab2e62674b1fd935b8c8"
checksum = "d9d60b42ad7478d3e027e2f9ea4e99fbbb8fdee0c8c3cf068be269f57e603618"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand All @@ -207,9 +213,9 @@ dependencies = [

[[package]]
name = "chalk-solve"
version = "0.86.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e9c3c068f9358786348e58a1b94ef0a5cf90a9810fc1f10fda896f0b5d80185"
checksum = "ab30620ea5b36819525eaab2204f4b8e1842fc7ee36826424a28bef59ae7fecf"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand Down Expand Up @@ -510,6 +516,8 @@ dependencies = [
"fst",
"hashbrown",
"hir-expand",
"hkalbasi-rustc-ap-rustc_abi",
"hkalbasi-rustc-ap-rustc_index",
"indexmap",
"itertools",
"la-arena",
Expand Down Expand Up @@ -555,6 +563,7 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"base-db",
"bitflags",
"chalk-derive",
"chalk-ir",
"chalk-recursive",
Expand All @@ -564,6 +573,7 @@ dependencies = [
"expect-test",
"hir-def",
"hir-expand",
"hkalbasi-rustc-ap-rustc_index",
"itertools",
"la-arena",
"limit",
Expand All @@ -581,6 +591,27 @@ dependencies = [
"typed-arena",
]

[[package]]
name = "hkalbasi-rustc-ap-rustc_abi"
version = "0.0.20221221"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adabaadad9aa7576f97af02241cdf5554d62fb3d51a84cb05d77ba28edd3013f"
dependencies = [
"bitflags",
"hkalbasi-rustc-ap-rustc_index",
"tracing",
]

[[package]]
name = "hkalbasi-rustc-ap-rustc_index"
version = "0.0.20221221"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4d3c48474e09afb0f5efbd6f758e05411699301a113c47d454d28ec7059d00e"
dependencies = [
"arrayvec",
"smallvec",
]

[[package]]
name = "home"
version = "0.5.4"
Expand Down Expand Up @@ -631,6 +662,7 @@ dependencies = [
"ide-db",
"itertools",
"profile",
"smallvec",
"sourcegen",
"stdx",
"syntax",
Expand Down Expand Up @@ -1750,6 +1782,33 @@ dependencies = [
"tikv-jemalloc-sys",
]

[[package]]
name = "time"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
dependencies = [
"itoa",
"serde",
"time-core",
"time-macros",
]

[[package]]
name = "time-core"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"

[[package]]
name = "time-macros"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
dependencies = [
"time-core",
]

[[package]]
name = "tinyvec"
version = "1.6.0"
Expand Down Expand Up @@ -2148,4 +2207,18 @@ dependencies = [
"write-json",
"xflags",
"xshell",
"zip",
]

[[package]]
name = "zip"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080"
dependencies = [
"byteorder",
"crc32fast",
"crossbeam-utils",
"flate2",
"time",
]
14 changes: 11 additions & 3 deletions src/tools/rust-analyzer/crates/base-db/src/fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl ChangeFixture {
Ok(Vec::new()),
false,
origin,
meta.target_data_layout.as_deref().map(Arc::from),
);
let prev = crates.insert(crate_name.clone(), crate_id);
assert!(prev.is_none());
Expand Down Expand Up @@ -197,6 +198,7 @@ impl ChangeFixture {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
} else {
for (from, to, prelude) in crate_deps {
Expand All @@ -210,6 +212,8 @@ impl ChangeFixture {
.unwrap();
}
}
let target_layout =
crate_graph.iter().next().and_then(|it| crate_graph[it].target_layout.clone());

if let Some(mini_core) = mini_core {
let core_file = file_id;
Expand All @@ -234,6 +238,7 @@ impl ChangeFixture {
Ok(Vec::new()),
false,
CrateOrigin::Lang(LangCrateOrigin::Core),
target_layout.clone(),
);

for krate in all_crates {
Expand Down Expand Up @@ -271,6 +276,7 @@ impl ChangeFixture {
Ok(proc_macro),
true,
CrateOrigin::CratesIo { repo: None, name: None },
target_layout,
);

for krate in all_crates {
Expand Down Expand Up @@ -391,6 +397,7 @@ struct FileMeta {
edition: Edition,
env: Env,
introduce_new_source_root: Option<SourceRootKind>,
target_data_layout: Option<String>,
}

fn parse_crate(crate_str: String) -> (String, CrateOrigin, Option<String>) {
Expand All @@ -400,9 +407,9 @@ fn parse_crate(crate_str: String) -> (String, CrateOrigin, Option<String>) {
Some((version, url)) => {
(version, CrateOrigin::CratesIo { repo: Some(url.to_owned()), name: None })
}
_ => panic!("Bad crates.io parameter: {}", data),
_ => panic!("Bad crates.io parameter: {data}"),
},
_ => panic!("Bad string for crate origin: {}", b),
_ => panic!("Bad string for crate origin: {b}"),
};
(a.to_owned(), origin, Some(version.to_string()))
} else {
Expand Down Expand Up @@ -432,8 +439,9 @@ impl From<Fixture> for FileMeta {
introduce_new_source_root: f.introduce_new_source_root.map(|kind| match &*kind {
"local" => SourceRootKind::Local,
"library" => SourceRootKind::Library,
invalid => panic!("invalid source root kind '{}'", invalid),
invalid => panic!("invalid source root kind '{invalid}'"),
}),
target_data_layout: f.target_data_layout,
}
}
}
Expand Down
21 changes: 17 additions & 4 deletions src/tools/rust-analyzer/crates/base-db/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl fmt::Display for CrateName {
impl ops::Deref for CrateName {
type Target = str;
fn deref(&self) -> &str {
&*self.0
&self.0
}
}

Expand Down Expand Up @@ -211,7 +211,7 @@ impl fmt::Display for CrateDisplayName {
impl ops::Deref for CrateDisplayName {
type Target = str;
fn deref(&self) -> &str {
&*self.crate_name
&self.crate_name
}
}

Expand Down Expand Up @@ -270,6 +270,7 @@ pub struct CrateData {
pub display_name: Option<CrateDisplayName>,
pub cfg_options: CfgOptions,
pub potential_cfg_options: CfgOptions,
pub target_layout: Option<Arc<str>>,
pub env: Env,
pub dependencies: Vec<Dependency>,
pub proc_macro: ProcMacroLoadResult,
Expand Down Expand Up @@ -328,6 +329,7 @@ impl CrateGraph {
proc_macro: ProcMacroLoadResult,
is_proc_macro: bool,
origin: CrateOrigin,
target_layout: Option<Arc<str>>,
) -> CrateId {
let data = CrateData {
root_file_id,
Expand All @@ -340,6 +342,7 @@ impl CrateGraph {
proc_macro,
dependencies: Vec::new(),
origin,
target_layout,
is_proc_macro,
};
let crate_id = CrateId(self.arena.len() as u32);
Expand Down Expand Up @@ -615,8 +618,8 @@ impl CyclicDependenciesError {
impl fmt::Display for CyclicDependenciesError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let render = |(id, name): &(CrateId, Option<CrateDisplayName>)| match name {
Some(it) => format!("{}({:?})", it, id),
None => format!("{:?}", id),
Some(it) => format!("{it}({id:?})"),
None => format!("{id:?}"),
};
let path = self.path.iter().rev().map(render).collect::<Vec<String>>().join(" -> ");
write!(
Expand Down Expand Up @@ -649,6 +652,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
let crate2 = graph.add_crate_root(
FileId(2u32),
Expand All @@ -661,6 +665,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
let crate3 = graph.add_crate_root(
FileId(3u32),
Expand All @@ -673,6 +678,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
assert!(graph
.add_dep(crate1, Dependency::new(CrateName::new("crate2").unwrap(), crate2))
Expand All @@ -699,6 +705,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
let crate2 = graph.add_crate_root(
FileId(2u32),
Expand All @@ -711,6 +718,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
assert!(graph
.add_dep(crate1, Dependency::new(CrateName::new("crate2").unwrap(), crate2))
Expand All @@ -734,6 +742,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
let crate2 = graph.add_crate_root(
FileId(2u32),
Expand All @@ -746,6 +755,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
let crate3 = graph.add_crate_root(
FileId(3u32),
Expand All @@ -758,6 +768,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
assert!(graph
.add_dep(crate1, Dependency::new(CrateName::new("crate2").unwrap(), crate2))
Expand All @@ -781,6 +792,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
let crate2 = graph.add_crate_root(
FileId(2u32),
Expand All @@ -793,6 +805,7 @@ mod tests {
Ok(Vec::new()),
false,
CrateOrigin::CratesIo { repo: None, name: None },
None,
);
assert!(graph
.add_dep(
Expand Down
4 changes: 2 additions & 2 deletions src/tools/rust-analyzer/crates/base-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ pub trait SourceDatabase: FileLoader + std::fmt::Debug {
}

fn parse_query(db: &dyn SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> {
let _p = profile::span("parse_query").detail(|| format!("{:?}", file_id));
let _p = profile::span("parse_query").detail(|| format!("{file_id:?}"));
let text = db.file_text(file_id);
SourceFile::parse(&*text)
SourceFile::parse(&text)
}

/// We don't want to give HIR knowledge of source roots, hence we extract these
Expand Down
Loading