b-naber
6af8fb7936
address review again
2022-09-14 17:30:25 +02:00
Jack Huey
aae37f8763
Use Predicate ConstraintCategory when normalizing
2022-09-13 20:18:49 -04:00
Jack Huey
c75817b0a7
Better errors for implied static bound
2022-09-13 20:18:04 -04:00
Jack Huey
ff623ffc39
Cleanup retrieve_closure_constraint_info
2022-09-13 19:58:53 -04:00
Jack Huey
2be6301857
Remove unused body args
2022-09-13 19:58:53 -04:00
Camille GILLOT
494af379c4
Use def_span for external requirements.
2022-09-13 19:18:24 +02:00
Camille GILLOT
1f370d9437
Use tcx.hir() utils for spans in MIR building.
...
This corrects the `span_with_body` in the case of closures, which was
incorrectly shortened to the `def_span`.
2022-09-13 19:18:23 +02:00
Camille GILLOT
ffe20d61d6
Only keep one version of ImplicitSelfKind.
2022-09-13 19:18:23 +02:00
b-naber
bea0a6dc84
address review
2022-09-13 17:44:53 +02:00
b-naber
372c4fd67f
remove visit_const from mir visitors
2022-09-13 17:44:52 +02:00
b-naber
2554fa1c8e
renumber regions in mir constants correctly
2022-09-13 17:41:02 +02:00
b-naber
a4bbb8db5c
use ty::Unevaluated<'tcx, ()> in type system
2022-09-13 17:40:59 +02:00
Michael Goulet
b2ed2dcaae
Rename some variants
2022-09-12 16:55:59 -07:00
Eric Holk
549c105bb3
dyn* through more typechecking and MIR
2022-09-12 16:55:56 -07:00
KaDiWa
66211d83f9
Avoid Iterator::last
2022-09-11 17:23:00 +02:00
bors
2287107588
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
...
Remove ReEmpty
r? rust-lang/types
2022-09-10 20:54:01 +00:00
Camille GILLOT
05812df603
Handle generic parameters.
2022-09-09 01:31:46 +00:00
Jack Huey
1ca9eb8ec3
Remove ReEmpty
2022-09-08 20:55:55 -04:00
Jack Huey
e7e5feb637
In ReverseMapper, don't fallback to ReEmpty, instead ReStatic
2022-09-08 17:57:34 -04:00
Jack Huey
f29c91bf12
Create VarValue::Empty
2022-09-08 17:57:32 -04:00
Dylan DPC
720a82dd52
Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obk
...
Remove unnecessary `PartialOrd` and `Ord`
2022-09-08 20:48:38 +05:30
Takayuki Maeda
bdc865d8f7
remove unnecessary PartialOrd
and Ord
2022-09-08 06:15:33 +09:00
Oli Scherer
a0130e62ec
Check all operands, they may contain indirections in their place
2022-09-06 15:32:35 +00:00
Oli Scherer
b7413511dc
Generalize the Assume intrinsic statement to a general Intrinsic statement
2022-09-06 14:18:32 +00:00
Oli Scherer
3f07645120
Lower the assume intrinsic to a MIR statement
2022-09-06 14:18:32 +00:00
bors
6c358c67d4
Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot
...
`BindingAnnotation` refactor
* `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`)
* `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)`
* Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}`
One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`.
I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-06 03:16:29 +00:00
bors
b44197abb0
Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, r=cjgillot
...
Separate the receiver from arguments in HIR
Related to #100232
cc `@cjgillot`
2022-09-05 16:21:40 +00:00
Takayuki Maeda
9cde34e180
use propagate_through_exprs
instead of propagate_through_expr
...
fix `ExprKind` static_assert_size
fix hir-stats
2022-09-05 23:11:34 +09:00
bors
2dc703fd6e
Auto merge of #101228 - nnethercote:simplify-hir-PathSegment, r=petrochenkov
...
Simplify `hir::PathSegment`
r? `@petrochenkov`
2022-09-05 13:36:54 +00:00
Takayuki Maeda
fea1c5f5c8
refactor: remove unnecessary variables
2022-09-05 22:31:02 +09:00
Takayuki Maeda
87c6da363f
separate the receiver from arguments in HIR
2022-09-05 22:25:49 +09:00
Michael Goulet
7e226e6d3f
Look at move place's type when suggesting mutable reborrow
2022-09-05 05:00:33 +00:00
Michael Goulet
41d4ea2314
Don't suggest reborrow if usage is inside a closure
2022-09-05 04:27:07 +00:00
Nicholas Nethercote
bb0ae3c446
Make hir::PathSegment::hir_id
non-optional.
2022-09-05 14:20:25 +10:00
Cameron Steffen
02ba216e3c
Refactor and re-use BindingAnnotation
2022-09-02 12:55:05 -05:00
Matthias Krüger
1bafe0b020
Rollup merge of #101285 - TaKO8Ki:do-not-suggest-adding-move-when-closure-is-already-marked-as-move, r=oli-obk
...
Do not suggest adding `move` to closure when `move` is already used
Fixes #101227
2022-09-01 21:37:21 +02:00
Oli Scherer
1fc9ef1edd
tracing::instrument cleanup
2022-09-01 14:54:27 +00:00
Oli Scherer
ee3c835018
Always import all tracing macros for the entire crate instead of piecemeal by module
2022-09-01 14:54:27 +00:00
Oli Scherer
d3b22c7267
Directly use the instrument
macro instead of its full path
2022-09-01 14:53:46 +00:00
Takayuki Maeda
78e9bea598
do not suggest adding move
to closure when move
is already used
2022-09-01 23:50:51 +09:00
bors
a0d07093f8
Auto merge of #100812 - Nilstrieb:revert-let-chains-nightly, r=Mark-Simulacrum
...
Revert let_chains stabilization
This is the revert against master, the beta revert was already done in #100538 .
Bumps the stage0 compiler which already has it reverted.
2022-08-30 05:48:22 +00:00
Matthias Krüger
7b84298f1b
Rollup merge of #101146 - jackh726:borrowck-logging, r=compiler-errors
...
Various changes to logging of borrowck-related code
Cleanups found when doing other changes
r? `@compiler-errors`
2022-08-29 21:12:59 +02:00
Nilstrieb
d1ef8180f9
Revert let_chains stabilization
...
This reverts commit 326646074940222d602f3683d0559088690830f4.
This is the revert against master, the beta revert was already done in #100538 .
2022-08-29 19:34:11 +02:00
Jack Huey
8033c3c27d
Various changes to logging of borrowck-related code
2022-08-29 10:59:21 -04:00
Matthias Krüger
d182081de1
Rollup merge of #99027 - tmiasko:basic-blocks, r=oli-obk
...
Replace `Body::basic_blocks()` with field access
Since the refactoring in #98930 , it is possible to borrow the basic blocks
independently from other parts of MIR by accessing the `basic_blocks` field
directly.
Replace unnecessary `Body::basic_blocks()` method with a direct field access,
which has an additional benefit of borrowing the basic blocks only.
2022-08-29 06:34:43 +02:00
Matthias Krüger
c5770219f2
Rollup merge of #101002 - estebank:hashmap-idx, r=davidtwco
...
Provide structured suggestion for `hashmap[idx] = val`
2022-08-28 09:35:18 +02:00
Tomasz Miąsko
b48870b451
Replace Body::basic_blocks()
with field access
2022-08-26 14:27:08 +02:00
AndyJado
622217da59
diag-mig
2022-08-26 10:32:59 +08:00
Esteban Küber
752902957b
Provide structured suggestion for hashmap[idx] = val
2022-08-25 08:44:36 -07:00
Matthias Krüger
75b1b69171
Rollup merge of #100940 - TaKO8Ki:do-not-suggest-adding-bound-to-opaque-type, r=fee1-dead
...
Do not suggest adding a bound to a opaque type
fixes #100442
2022-08-24 18:20:20 +02:00