bors
49b4f15973
Auto merge of #15022 - HKalbasi:nightly-mir-eval-panic, r=HKalbasi
...
Fix panic in displaying unsized structs
2023-06-10 08:06:56 +00:00
hkalbasi
1dd76e8a9d
Fix panic in displaying unsized structs
2023-06-10 11:32:37 +03:30
Lukas Wirth
ccce893577
Count query entries in memory usage command
2023-06-10 01:49:32 +02:00
Lukas Wirth
b6fb35f20c
Shrink hir_expand::attr::AttrInput by boxing a variant
2023-06-10 01:21:52 +02:00
bors
993299ee3f
Auto merge of #15019 - HKalbasi:nightly-mir-eval-panic, r=HKalbasi
...
Fix panic in displaying const trait objects
I hope this fixes the panic on recent nightly stdlib, but I didn't test it locally.
2023-06-09 22:43:58 +00:00
hkalbasi
6fbf6ef514
Fix panic in displaying const trait objects
2023-06-10 02:10:52 +03:30
bors
60d952e902
Auto merge of #14979 - DropDemBits:structure-snippets-migrate-1, r=Veykril
...
internal: Migrate some assists to use the structured snippet API
Migrates the following assists:
- `add_missing_impl_members`
- `extract_type_alias`
As an additional requirement, these assists are also migrated to use the mutable AST API, since otherwise there would be overlapping `Indel` spans
2023-06-09 19:26:01 +00:00
Lukas Wirth
a02b9b279e
internal: Lazy eager macros
2023-06-09 13:02:13 +02:00
bors
9973b11218
Auto merge of #15012 - lowr:patch/generate-fn-async-ret-ty, r=HKalbasi
...
Infer return type for async function in `generate_function`
Part of #10122
In `generate_function` assist, when we infer the return type of async function we're generating, we should retrieve the type of parent await expression rather than the call expression itself.
2023-06-09 09:00:45 +00:00
bors
9c03aa1ac2
Auto merge of #14997 - lnicola:fix-warning, r=Veykril
...
internal: Fix dependency warning
Hope this doesn't break #14984 again.
2023-06-08 15:48:58 +00:00
Ryo Yoshida
32768fe310
Infer return type for async function in generate_function
2023-06-09 00:32:52 +09:00
hkalbasi
30e16e20d0
Fix unwrap on None in expanding format args
2023-06-08 00:17:22 +03:30
beyarkay
dac660dc1d
Fix typo in reload.rs
2023-06-07 20:57:27 +02:00
Joe Neeman
ad2a0d1093
Add configurable proc-macro-srv path for diagnostics
2023-06-07 08:48:19 -05:00
Joe Neeman
cdab3507eb
Add span to group.
2023-06-07 08:48:19 -05:00
Ryo Yoshida
4f0c6fac17
fix: only generate trait bound for associated types in field types
2023-06-07 20:52:49 +09:00
Laurențiu Nicola
08ef169435
Fix dependency warning
2023-06-07 12:34:38 +03:00
Lukas Wirth
a6bef7808f
fix: Fix proc-macro slow test
2023-06-07 07:03:27 +02:00
Viktor Lott
eef716d5f2
fix: use render_eval instead of inlined expr
2023-06-06 12:08:11 +02:00
Viktor Lott
2d4cb780b6
fix: Use render_eval for all builtins
2023-06-06 00:34:00 +02:00
Viktor Lott
8103a10a78
update assist to include more literals
2023-06-06 00:34:00 +02:00
Viktor Lott
094c1e7b86
feat: inline const expr as static str
2023-06-06 00:34:00 +02:00
Laurențiu Nicola
bbd695589e
Merge commit ' ed87e0a20a
' into sync-from-ra
2023-06-05 15:10:05 +03:00
Laurențiu Nicola
768a6c5931
Add back sysroot-abi feature gate to rust-analyzer
2023-06-05 14:43:31 +03:00
Laurențiu Nicola
c48062fe2a
Merge commit ' aa9bc86125
' into sync-from-ra
2023-06-05 12:04:23 +03:00
Laurențiu Nicola
c3dbe7c717
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2023-06-05 11:07:47 +03:00
bors
c6a3fe051a
Auto merge of #14978 - HKalbasi:lifetime-display, r=HKalbasi
...
Emit `'_` for lifetime generics in `HirDisplay`
This makes the generated code not linted by `rust_2018_idioms` lint. But that is an allow by default lint, so should we do this? Maybe we should only do this for `DisplayTarget::SourceCode`?
2023-06-05 07:26:30 +00:00
hkalbasi
5531d46c95
Emit '_
for lifetime generics in HirDisplay
2023-06-05 10:55:47 +03:30
DropDemBits
dd5f05590e
Migrate extract_type_alias
to mutable ast
2023-06-05 00:24:12 -04:00
DropDemBits
e6e72bf9d5
Migrate add_missing_impl_members
to mutable ast
...
`replace_derive_with_manual_impl` was slightly since it used
`add_trait_assoc_items_to_impl`
(which was also used by `add_missing_impl_members`)
2023-06-05 00:23:10 -04:00
bors
2f1b7cedcf
Auto merge of #14971 - lowr:fix/captured-item-ty-outer-binder, r=HKalbasi
...
fix: consider outer binders when folding captured items' type
Fixes #14966
Basically, the crash is caused by us producing a broken type and passing it to chalk: `&dyn for<type> [for<> Implemented(^1.0: A<^0.0>)]` (notice the innermost bound var `^0.0` has no corresponding binder). It's created in `CapturedItemWithoutTy::with_ty()`, which didn't consider outer binders when folding types to replace placeholders with bound variables.
The fix is one-liner, but I've also refactored the surrounding code a little.
2023-06-04 18:25:23 +00:00
bors
5545961df2
Auto merge of #14976 - HKalbasi:mir-fix, r=HKalbasi
...
Fix missing terminator for slice pattern
2023-06-04 17:30:16 +00:00
hkalbasi
b4907a531f
Fix missing terminator for slice pattern
2023-06-04 20:59:27 +03:30
bors
17426835d8
Auto merge of #14972 - HKalbasi:mir-fix, r=HKalbasi
...
Fix `unused-mut` false positive for `Box`
2023-06-04 12:26:39 +00:00
hkalbasi
0408af6453
Fix unused-mut
false positive for Box
2023-06-04 15:56:01 +03:30
Ryo Yoshida
f549cacc1d
Destructure InferenceResult
in resolve_all()
...
so that whenever new fields are added we don't forget to handle them.
2023-06-04 20:38:40 +09:00
Ryo Yoshida
a3789eabc9
Minor refactorings
...
- use `DefWithBodyId::as_generic_def_id()`
- add comments on `InferenceResult` invariant
- move local helper function to bottom to comply with style guide
2023-06-04 19:39:49 +09:00
Ryo Yoshida
275afd6e79
fix: consider outer binders when folding captured items' type
2023-06-04 19:38:47 +09:00
bors
9d5c34a80e
Auto merge of #14970 - HKalbasi:mir-fix, r=HKalbasi
...
Detect "bound more than once" error and suppress `need-mut` for it.
Fix the `need-mut` false positive for `izip!`
2023-06-04 09:33:53 +00:00
hkalbasi
71f3e4b08c
Detect "bound more than once" error and suppress need-mut
for it.
2023-06-04 12:39:36 +03:30
Lukas Wirth
f9a9e40c0a
Update builtin attribute list
2023-06-04 10:02:11 +02:00
Lukas Wirth
a1af9eb1f8
Revert "Add mandatory panic contexts to all threadpool tasks"
2023-06-04 09:30:21 +02:00
Lukas Wirth
2d0510e226
Add mandatory panic contexts to all threadpool tasks
2023-06-04 09:09:25 +02:00
bors
4fb1df6b7a
Auto merge of #14961 - HKalbasi:mir-fix, r=HKalbasi
...
Fix drop scopes problems in mir
Fix false positives of `need-mut` emerged from #14955
There are still 5 `need-mut` false positives on self, all related to `izip!` macro hygenic issue. I will try to do something about that before monday release.
2023-06-03 21:40:09 +00:00
hkalbasi
08f89193b5
Fix drop scopes in mir
2023-06-04 01:03:32 +03:30
ponyii
7f45cccda4
lifetime transformation: refactoring & a new test
2023-06-03 21:34:31 +04:00
ponyii
fe8f862757
made the add_missing_impl_members
and add_missing_default_members
assists transform lifetimes
2023-06-03 21:12:11 +04:00
bors
e5c56cd9a0
Auto merge of #14955 - HKalbasi:mir-fix, r=HKalbasi
...
Remove unnecessary `StorageDead`
I hope this reduces MIR memory usage.
2023-06-03 13:55:40 +00:00
hkalbasi
f44fc271d4
Remove unnecessary StorageDead
2023-06-03 17:24:10 +03:30
bors
dd0c29c934
Auto merge of #14952 - lowr:fix/assignments-are-right-associative, r=HKalbasi
...
fix: assignment operators are right associative
Fixes #14944
Assignment operators, be they simple or complex, are right associative in Rust ([reference]). We need to consider that fact when computing [binding power][bp] of infix operators.
The changes in `0072_destructuring_assignment.{rs,rast}` are unexpected, but I'm pretty sure it's a typo and fixed the `.rs` file accordingly.
[reference]: https://doc.rust-lang.org/reference/expressions.html#expression-precedence
[bp]: https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html
2023-06-03 12:01:09 +00:00