Rémy Rakic
8275d115fb
Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"
...
This reverts commit 03770f0e2b
, reversing
changes made to 01ef4b21dc
.
2022-12-19 15:31:20 +00:00
bors
03770f0e2b
Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr
...
Use non-ascribed type as field's type in mir
Fixes https://github.com/rust-lang/rust/issues/96514
r? `@lcnr`
2022-12-16 12:47:49 +00:00
b-naber
ff41359e65
address review
2022-12-14 21:32:42 +01:00
Jakob Degen
9fb8da8f8f
Remove unneeded field from SwitchTargets
2022-12-09 04:53:10 -08:00
Matthias Krüger
04dac4285a
Rollup merge of #105455 - lcnr:correct-reveal-in-validate, r=jackh726
...
use the correct `Reveal` during validation
supersedes #105454 . Deals with https://github.com/rust-lang/rust/issues/105009#issuecomment-1342395333 , not closing #105009 as the ICE may leak into beta
The issue was the following:
- we optimize the mir, using `Reveal::All`
- some optimization relies on the hidden type of an opaque type
- we then validate using `Reveal::UserFacing` again which is not able to observe the hidden type
r? `@jackh726`
2022-12-09 07:25:47 +01:00
lcnr
dd9d05cec4
validate: use the correct reveal during opts
2022-12-08 11:24:25 +01:00
Ralf Jung
9397ea1368
make retagging work even with 'unstable' places
2022-12-06 10:33:34 +01:00
Oli Scherer
c2166ec628
Don't go through the formatting infrastructure just to get the name of a phase
2022-12-01 08:31:54 +00:00
kadmin
f9750c1554
Add empty ConstKind::Abstract
...
Initial pass at expr/abstract const/s
Address comments
Switch to using a list instead of &[ty::Const], rm `AbstractConst`
Remove try_unify_abstract_consts
Update comments
Add edits
Recurse more
More edits
Prevent equating associated consts
Move failing test to ui
Changes this test from incremental to ui, and mark it as failing and a known bug.
Does not cause the compiler to ICE, so should be ok.
2022-11-25 09:28:43 +00:00
b-naber
9061ffba8c
use no type in ProjectionElem::Field for PlaceBuilder::UpVar
2022-11-23 21:25:27 +01:00
cui fliter
442f848d74
fix some typos in comments
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-11-13 15:26:17 +08:00
Nilstrieb
7bfef19844
Use tidy-alphabetical
in the compiler
2022-10-12 17:49:10 +05:30
ouz-a
d59c7ff000
Remove mir::CastKind::Misc
2022-10-06 15:32:41 +03:00
Pietro Albini
3975d55d98
remove cfg(bootstrap)
2022-09-26 10:14:45 +02:00
Michael Howell
0d2e57cb04
Rollup merge of #101976 - RalfJung:mir-semantic-phases, r=oli-obk
...
MirPhase: clarify that linting is not a semantic change
r? ```@JakobDegen```
2022-09-20 10:12:58 -07:00
Ralf Jung
eed6fdb0eb
clarify that linting is not a semantic change
2022-09-18 14:14:42 +02:00
Oli Scherer
40e2de8c41
Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank""
...
This reverts commit 4a742a691e
.
2022-09-16 11:36:39 +00:00
Oli Scherer
a5ab8da1e2
derive TypeVisitable and TypeFoldable for mir types
2022-09-15 14:42:43 +00:00
Oli Scherer
d376012a43
Derive TypeFoldable and TypeVisitable for mir::PlaceElement
2022-09-15 13:43:44 +00:00
Eric Holk
549c105bb3
dyn* through more typechecking and MIR
2022-09-12 16:55:56 -07: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
Michael Benfield
d7a750b504
Use niche-filling optimization even when multiple variants have data.
...
Fixes #46213
2022-09-07 20:12:45 +00:00
Oli Scherer
7348284073
Update docs
2022-09-06 14:18:32 +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
Dezhi Wu
b1430fb7ca
Fix a bunch of typo
...
This PR will fix some typos detected by [typos].
I only picked the ones I was sure were spelling errors to fix, mostly in
the comments.
[typos]: https://github.com/crate-ci/typos
2022-08-31 18:24:55 +08:00
Jakob Degen
aad14c701e
Refactor MIR phases
2022-08-30 01:40:14 -07:00
Matthias Krüger
e6bb00fff5
Rollup merge of #100003 - nnethercote:improve-size-assertions, r=lqd
...
Improve size assertions.
- For any file with four or more size assertions, move them into a
separate module (as is already done for `hir.rs`).
- Add some more for AST nodes and THIR nodes.
- Put the `hir.rs` ones in alphabetical order.
r? `@lqd`
2022-08-01 16:49:33 +02:00
Nicholas Nethercote
9037ebba0c
Improve size assertions.
...
- For any file with four or more size assertions, move them into a
separate module (as is already done for `hir.rs`).
- Add some more for AST nodes and THIR nodes.
- Put the `hir.rs` ones in alphabetical order.
2022-08-01 09:15:05 +10:00
Cameron Steffen
cf2433a74f
Use LocalDefId for closures more
2022-07-30 15:59:17 -05:00
Oli Scherer
4a742a691e
Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank"
...
This reverts commit 6f8fb911ad
, reversing
changes made to 7210e46dc6
.
2022-07-20 07:55:58 +00:00
Oli Scherer
84a444a1f4
Introduce opaque type to hidden type projection
2022-07-15 15:49:22 +00:00
ouz-a
cb0017f2f8
add new rval, pull deref early
2022-07-12 14:26:41 +03:00
Jakob Degen
4939f6c64b
Clarify MIR semantics of storage statements
2022-07-08 16:58:24 -07:00
Guillaume Gomez
4b88cba353
Rollup merge of #98984 - pierwill:patch-4, r=RalfJung
...
Remove erroneous doc comment
Fixes the formatting issue shown here:
<img width="803" alt="Screen Shot 2022-07-06 at 12 50 56 PM" src="https://user-images.githubusercontent.com/19642016/177612734-2d881c6a-2850-4c1b-8f1a-08339ad5bfbc.png ">
2022-07-06 20:43:29 +02:00
pierwill
482bb39032
Remove erroneous doc comment
2022-07-06 12:52:02 -05:00
pierwill
fb579435a5
docs: Add overview of rustc_middle::mir::TerminatorKind
2022-07-06 12:48:19 -05:00
bors
5b8cf49c51
Auto merge of #98206 - eggyal:align-to-chalk-folding-api, r=jackh726
...
Split TypeVisitable from TypeFoldable
Impl of rust-lang/compiler-team#520 following MCP approval.
r? `@ghost`
2022-07-06 05:48:11 +00:00
Alan Egerton
e4b9625b87
Add #[derive(TypeVisitable)]
2022-07-05 22:25:15 +01:00
Ralf Jung
2f6e996662
always check overflow in CheckedBinOp in CTFE
2022-07-05 07:32:38 -04:00
Matthias Krüger
cb2d3bb198
Rollup merge of #98878 - lcnr:more-rustc_pass_by_value, r=oli-obk
...
add more `rustc_pass_by_value`
r? ```@oli-obk``` cc #98766
2022-07-04 23:11:12 +02:00
lcnr
658b7f3652
more rustc_pass_by_value
2022-07-04 09:40:58 +02:00
Tomasz Miąsko
b88479738e
Clarify MIR semantics of checked binary operations
2022-06-30 00:00:00 +00:00
Ralf Jung
6c990f48af
fix doc issues
2022-06-29 19:18:30 -04:00
Ralf Jung
ab01a73151
move MIR syntax into a dedicated file and ping some people whenever it changes
2022-06-29 16:03:24 -04:00