Oliver Scherer
20f462d9fc
Rollup merge of #61261 - spastorino:is-union-return-ty, r=oli-obk
...
is_union returns ty to avoid computing it twice
r? @oli-obk
2019-05-29 14:41:06 +02:00
Mazdak Farrokhzad
dcfc15b23c
Rollup merge of #61249 - spastorino:local-or-deref-local, r=oli-obk,Centril
...
Rename Place::local to Place::local_or_deref_local
r? @oli-obk
2019-05-29 08:15:59 +02:00
Mazdak Farrokhzad
ee08261c8c
Rollup merge of #60928 - TheSirC:fix/60229, r=eddyb
...
Changes the type `mir::Mir` into `mir::Body`
Fixes part 1 of #60229 (previously attempted in #60242 ).
I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date.
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.
2019-05-29 00:19:55 +02:00
Eduard-Mihai Burtescu
3e5beb2c6f
rustc: rename Mir to mir::Body in comments and to MIR in error strings.
2019-05-29 00:26:56 +03:00
varkor
c94ba6382d
Rename OpportunisticTypeResolver
to OpportunisticVarResolver
2019-05-28 21:34:42 +01:00
Claude-Alban RANÉLY-VERGÉ-DÉPRÉ
6e5e0daff2
Changes the type mir::Mir
into mir::Body
...
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.
Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`
Fixing the missing import on `AggregateKind`
2019-05-28 19:17:51 +02:00
Santiago Pastorino
5e4d83e972
Rename Place::local to Place::local_or_deref_local
2019-05-28 18:50:55 +02:00
Santiago Pastorino
bb94fc0069
Use closure to avoid self.describe_place(...).unwrap_or_else(...) repetition
2019-05-28 18:30:27 +02:00
Santiago Pastorino
1b86bd73cd
is_union returns ty to avoid computing it twice
2019-05-28 18:29:40 +02:00
Mazdak Farrokhzad
16ef483b79
Rollup merge of #61164 - RalfJung:scalar, r=oli-obk
...
rename Scalar::Bits to Scalar::Raw and bits field to data
Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor).
r? @oli-obk
2019-05-28 18:15:39 +02:00
Mazdak Farrokhzad
149c53fc44
Rollup merge of #61248 - spastorino:use-place-local-fn, r=oli-obk
...
Use Place::local
r? @oli-obk
2019-05-28 11:49:09 +02:00
Mazdak Farrokhzad
1dc9bbbffe
Rollup merge of #61247 - spastorino:eval-place-iterate, r=wesleywiser
...
Make eval_place iterate instead of recurse
r? @oli-obk
2019-05-28 11:49:08 +02:00
Mazdak Farrokhzad
ffb4ceb27f
Rollup merge of #61242 - spastorino:dest-needs-borrow-iterate, r=oli-obk
...
Make dest_needs_borrow iterate instead of recurse
r? @oli-obk
2019-05-28 11:49:04 +02:00
Mazdak Farrokhzad
c33b3492e7
Rollup merge of #61241 - spastorino:check-place-iterative, r=oli-obk
...
Check place iterative
r? @oli-obk
2019-05-28 11:49:02 +02:00
bors
837b72c805
Auto merge of #60955 - agnxy:rename-assoc, r=oli-obk,Centril
...
Rename "Associated*" to "Assoc*"
This change is for #60163 .
r? @oli-obk
2019-05-28 05:28:13 +00:00
Santiago Pastorino
38ecea4c11
Use Place::local
2019-05-27 23:03:38 +02:00
Santiago Pastorino
c3e71f210e
Make eval_place iterate instead of recurse
2019-05-27 22:52:03 +02:00
Santiago Pastorino
fb4b62b87b
Make check_place iterate instead of recurse
2019-05-27 22:17:42 +02:00
Santiago Pastorino
b922e8a97d
Make dest_needs_borrow iterate instead of recurse
2019-05-27 22:16:39 +02:00
Santiago Pastorino
acaf284e55
Remove unused tcx and mir params
2019-05-27 21:46:15 +02:00
bors
1a56ec4dae
Auto merge of #59627 - LooMaclin:issue_57128_improve_miri_error_reporting_in_check_in_alloc, r=RalfJung
...
Improve miri error reporting in check_in_alloc
Fixes https://github.com/rust-lang/rust/issues/57128
r? @RalfJung @oli-obk
2019-05-27 12:46:12 +00:00
bors
ab7cf71d4c
Auto merge of #61035 - nnethercote:avoid-more-symbol-interning, r=petrochenkov
...
Avoid more symbol interning
r? @petrochenkov
2019-05-27 06:53:53 +00:00
Nicholas Nethercote
9c7d28d4fd
Pre-intern "0", "1", ..., "9", and use where appropriate.
2019-05-27 13:58:38 +10:00
bors
ed2a5115da
Auto merge of #61147 - estebank:suggest-as-ref, r=oli-obk
...
When encountering move error on an `Option`, suggest using `as_ref`
Fix #61109 , cc #15457 .
2019-05-27 01:10:22 +00:00
Ralf Jung
aad13a176a
centralize Scalar size sanity checks and also do them in release builds
2019-05-26 14:13:12 +02:00
Mazdak Farrokhzad
c3e1f99a69
Rollup merge of #61120 - spastorino:eval-place-iterate, r=oli-obk
...
Make eval_place iterate instead of recurse
r? @oli-obk
2019-05-26 13:37:57 +02:00
Mazdak Farrokhzad
a40b82bead
Rollup merge of #61102 - spastorino:move-path-for-iterate, r=oli-obk
...
Move path for iterate
r? @oli-obk
2019-05-26 13:37:56 +02:00
Andrew Xu
46b9ed4fa1
Rename "Associated*" to "Assoc*"
...
We are going to uniform the terminology of all associated items.
Methods that may or may not have `self` are called "associated
functions". Because `AssociatedFn` is a bit long, we rename `Associated`
to `Assoc`.
2019-05-26 17:49:02 +08:00
Ralf Jung
082da0c698
rename Scalar::Bits to Scalar::Raw and bits field to data
2019-05-26 11:08:03 +02:00
Mazdak Farrokhzad
8d247e716b
Rollup merge of #61193 - spastorino:add-comment, r=RalfJung
...
Add comment to explain why we change the layout for Projection
r? @RalfJung
Addresses the comment in https://github.com/rust-lang/rust/pull/61104/files#r287556257
2019-05-26 02:13:35 +02:00
Mazdak Farrokhzad
d8b828beea
Rollup merge of #61184 - wesleywiser:const_prop_tracing, r=oli-obk
...
Add additional trace statements to the const propagator
This makes it easier to figure out when const propagation fails.
2019-05-26 02:13:32 +02:00
Mazdak Farrokhzad
b4a3d44a87
Rollup merge of #61144 - estebank:issue-61108, r=matthewjasper
...
Suggest borrowing for loop head on move error
Fix #61108 .
2019-05-26 02:13:27 +02:00
Santiago Pastorino
294dc18208
Make move_path_for iterate instead of recurse
2019-05-26 00:51:55 +02:00
Santiago Pastorino
a0700d062e
Inline move_path_for_projection inside move_path_for
2019-05-25 23:52:43 +02:00
Santiago Pastorino
e8beea7019
Make eval_place iterate instead of recurse
2019-05-25 23:36:55 +02:00
Santiago Pastorino
e6aa4b8033
Add comment to explain why we change the layout for Projection
2019-05-25 22:28:15 +02:00
Esteban Küber
1cc42ea675
Add support for suggesting as_ref to Result accesses
2019-05-25 11:12:41 -07:00
bors
f492693982
Auto merge of #59276 - oli-obk:cleanups, r=eddyb
...
Cleanup (pretty) printing of `ty::Const`
r? @eddyb
addresses 5cd2806621 (r266243236)
and 5cd2806621 (r266243336)
2019-05-25 16:08:11 +00:00
Wesley Wiser
9bfbbd2a78
Add additional trace statements to the const propagator
...
This makes it easier to figure out when const propagation fails.
2019-05-25 11:02:59 -04:00
bors
02f5786a32
Auto merge of #61151 - Centril:rollup-5rpyhfo, r=Centril
...
Rollup of 6 pull requests
Successful merges:
- #61092 (Make sanitize_place iterate instead of recurse)
- #61093 (Make borrow_of_local_data iterate instead of recurse)
- #61094 (Make find_local iterate instead of recurse)
- #61099 (Make ignore_borrow iterate instead of recurse)
- #61103 (Make find iterate instead of recurse)
- #61104 (Make eval_place_to_op iterate instead of recurse)
Failed merges:
r? @ghost
2019-05-25 09:30:02 +00:00
varkor
e694807650
Fix missing tcx
2019-05-25 10:07:02 +02:00
Oliver Scherer
fa459a08e1
Fix rebase fallout
2019-05-25 10:07:02 +02:00
Oliver Scherer
fa17654f79
Make ConstValue::Slice
solely take [u8]
and str
2019-05-25 10:07:01 +02:00
Oliver Scherer
e694b63cd1
Don't use ty::Const
without immediately interning
2019-05-25 10:07:01 +02:00
Oliver Scherer
8d4f4cdada
Reuse the pretty printing architecture for printing of constants
2019-05-25 10:07:01 +02:00
Mazdak Farrokhzad
1cd3dddc94
Rollup merge of #61104 - spastorino:eval-place-to-op-iterate, r=oli-obk
...
Make eval_place_to_op iterate instead of recurse
r? @oli-obk
2019-05-25 04:57:38 +02:00
Mazdak Farrokhzad
dd33e8a84a
Rollup merge of #61103 - spastorino:find-iterate, r=oli-obk
...
Make find iterate instead of recurse
r? @oli-obk
2019-05-25 04:57:37 +02:00
Mazdak Farrokhzad
e30300d6e8
Rollup merge of #61099 - spastorino:ignore-borrow-iterate, r=oli-obk
...
Make ignore_borrow iterate instead of recurse
r? @oli-obk
2019-05-25 04:57:36 +02:00
Mazdak Farrokhzad
af015527aa
Rollup merge of #61094 - spastorino:find-local-iterate, r=oli-obk
...
Make find_local iterate instead of recurse
r? @oli-obk
2019-05-25 04:57:34 +02:00
Mazdak Farrokhzad
b4f6e5baeb
Rollup merge of #61093 - spastorino:borrow-of-local-data-iterate, r=oli-obk
...
Make borrow_of_local_data iterate instead of recurse
r? @oli-obk
2019-05-25 04:57:33 +02:00