Mazdak Farrokhzad
17e1f23209
Rollup merge of #64817 - csmoe:closure, r=nikomatsakis
...
Replace ClosureSubsts with SubstsRef
Addresses https://github.com/rust-lang/rust/issues/42340 part 3
https://github.com/rust-lang/rust/pull/59312 might benefit from this clean up.
r? @nikomatsakis
2019-10-04 07:24:34 +02:00
csmoe
9b91bef78b
generate ClosureSubsts from SubstsRef
2019-10-03 19:24:59 +08:00
csmoe
64f61c7888
remove indexed_vec re-export from rustc_data_structures
2019-09-29 16:48:31 +00:00
csmoe
d20183dbbf
remove bit_set re-export from rustc_data_structures
2019-09-29 16:11:30 +00:00
varkor
e2e0f9af85
Rename sty
to kind
2019-09-25 15:50:04 +01:00
Santiago Pastorino
d1f763f60d
Use while let slice_pattern instead of carrying an index around
2019-09-16 15:53:08 -03:00
bors
a6946a817a
Auto merge of #63420 - spastorino:place2_5, r=oli-obk
...
[Place 2.0] Convert Place's projection to a boxed slice
This is still work in progress, it's not compiling right now I need to review a bit more to see what's going on but wanted to open the PR to start discussing it.
r? @oli-obk
2019-09-13 15:37:15 +00:00
Santiago Pastorino
87420cd1bc
Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytes
2019-09-11 16:28:06 -03:00
Eduard-Mihai Burtescu
1e7faef220
rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly.
2019-09-10 13:43:54 +03:00
Santiago Pastorino
e9c41148c0
Convert Place's projection to a boxed slice
2019-09-09 18:16:49 -03:00
Alexander Regueiro
022d9c8eb5
Fixed grammar/style in error messages and reblessed tests.
2019-09-06 03:46:08 +01:00
Yuki Okushi
8c921beebb
Apply review comments
2019-08-28 07:11:12 +09:00
Yuki Okushi
82f2b37635
Add Option<Span> to require_lang_item
2019-08-28 07:11:12 +09:00
Eduard-Mihai Burtescu
b565ece5d8
Remove redundant ty
fields from mir::Constant
and hair::pattern::PatternRange
.
2019-08-16 15:20:27 +03:00
Ralf Jung
8e6fbbec83
add tuple_fields convenience method and use it in a few places
2019-08-11 12:04:49 +02:00
Oliver Scherer
7710820d18
Fiddle param env through to try_eval_bits
in most places
2019-08-05 17:48:05 +02:00
Oliver Scherer
9b87d22ea8
Don't abort on unevaluated constants without at least tryting to eval them
2019-08-05 17:48:04 +02:00
Santiago Pastorino
d0accade3e
Migrate from Place enum to Place struct
2019-07-20 05:08:38 +02:00
bors
d36b7f6944
Auto merge of #62322 - wesleywiser:promoted_query, r=oli-obk
...
Add a query to get the `promoted`s for a `mir::Body`
This is a builidng block toward removing a lot of duplicated code
between miri and the cosnt-propagator pass.
See this thread for more info:
https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Using.20.60InterpCx.60.20more/near/169030661
r? @spastorino but feel free to hand it off to somebody else
2019-07-16 12:19:35 +00:00
Matthew Jasper
9709b73561
pub(crate)
-> crate
...
The borrow checker code is already using `crate` extensively, so prefer
being consistent with it.
2019-07-14 20:22:20 +01:00
Matthew Jasper
abfd4d1e55
Move suggest_ref_mut into rustc_mir::borrow_check
2019-07-14 20:22:19 +01:00
Matthew Jasper
2cc2b942cf
Remove BorrowckErrors trait
...
Its methods are now inherent methods of `MirBorrowckCtxt`
2019-07-14 20:22:19 +01:00
Matthew Jasper
37a99038d0
Remove rustc_mir::borrowck_errors::Origin
2019-07-14 20:20:50 +01:00
Matthew Jasper
2975c01747
Remove unused BorrowckErrors methods
2019-07-14 20:19:16 +01:00
Matthew Jasper
be085d7c0f
Remove rustc_mir dependency from rustc_borrowck
2019-07-11 18:54:02 +01:00
Mazdak Farrokhzad
88c007cd04
Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, r=dtolnay,Centril
...
Use mem::take instead of mem::replace with default
2019-07-04 01:38:46 +02:00
Jeremy Stucki
d28832dde9
Remove needless lifetimes
2019-07-03 10:01:02 +02:00
Wesley Wiser
57c98d3392
Add a query to get the promoted
s for a mir::Body
...
This is a builidng block toward removing a lot of duplicated code
between miri and the cosnt-propagator pass.
See this thread for more info:
https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Using.20.60InterpCx.60.20more/near/169030661
2019-07-02 20:52:58 -04:00
Chris Gregory
636f5e6d11
Convert more usages over
2019-07-01 20:21:12 -07:00
Mazdak Farrokhzad
70ea57bcb3
Rollup merge of #62063 - ecstatic-morse:dataflow-backward-order, r=nagisa
...
Use a more efficient iteration order for backward dataflow
This applies the same basic principle as #62062 to the reverse dataflow analysis used to compute liveness information. It is functionally equivalent, except that post-order is used instead of reverse post-order.
In the long-term, `BitDenotation` should probably be extended to support both forward and backward dataflow, but there's some more work needed to get to that point.
2019-06-30 21:57:24 +02:00
Dylan MacKenzie
e2479e263e
Use more efficient iteration order for backward dataflow
...
This applies the same basic principle as #62062 to the reverse dataflow
analysis used to compute liveness information. It is functionally
equivalent, except that post-order is used instead of reverse post-order.
Some `mir::Body`s contain basic blocks which are not reachable from the
`START_BLOCK`. We need to add them to the work queue as well to preserve
the original semantics.
2019-06-27 11:40:35 -07:00
Santiago Pastorino
099f9e4e8a
Implement From<Local> for Place and PlaceBase
2019-06-25 15:46:23 +02:00
Matthew Jasper
d0311e7154
Deny explicit_outlives_requirements in the compiler
2019-06-22 17:13:19 +01:00
Eduard-Mihai Burtescu
ea78c3aa33
Run rustfmt --file-lines ...
for changes from previous commits.
2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
4c4fc7512e
rustc: reintroduce lifetime bounds where necessary.
2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
b25b466a88
rustc: remove 'x: 'y bounds (except from comments/strings).
2019-06-18 18:10:21 +03:00
Eduard-Mihai Burtescu
afc39bbf24
Run rustfmt --file-lines ...
for changes from previous commits.
2019-06-14 18:58:32 +03:00
Eduard-Mihai Burtescu
f3f9d6dfd9
Unify all uses of 'gcx and 'tcx.
2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu
fff08cb043
Run rustfmt --file-lines ...
for changes from previous commits.
2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
17cdd356da
rustc: replace TyCtxt<'tcx, 'gcx, 'tcx>
with TyCtxt<'gcx, 'tcx>
.
2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
2441253508
Fix fallout from deny(unused_lifetimes)
.
2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
37799a5552
rustc: replace TyCtxt<'a, 'gcx, 'tcx>
with TyCtxt<'tcx, 'gcx, 'tcx>
.
2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
1d720ec27c
Run rustfmt --file-lines ...
for changes from previous commits.
2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
d110d309b6
rustc_mir: deny(unused_lifetimes).
2019-06-11 14:11:58 +03:00
Jad Ghalayini
80ff07f30d
Changed usages of mir
in librustc::mir and librustc_mir to body
2019-06-09 16:05:05 -04:00
Matthew Jasper
6c9a018b60
Don't run MIR passes on constructor shims
2019-06-06 16:10:37 +01:00
Matthew Jasper
f7e86a5a49
Improve cannot move errors
...
* Show the place and type being moved
* Give a special error for variables in match guard
* Simplify search for overloaded deref
* Search for overloaded index
2019-06-03 14:55:29 +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
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
Oliver Scherer
e694b63cd1
Don't use ty::Const
without immediately interning
2019-05-25 10:07:01 +02:00