flip1995
e1da67e69c
Fix lint findings in librustc_mir
2019-04-28 21:19:27 +02:00
flip1995
6c272b78dc
Fix lint findings in librustc
2019-04-28 21:19:26 +02:00
Matthew Jasper
a962274903
Search for incompatible universes in borrow errors
...
If we have a borrow that has to live for `'static` we need to check for
any regions in incompatible universes when trying to find the cause.
2019-04-26 22:14:52 +01:00
Matthew Jasper
22226fa7fb
Remove region from borrow place contexts
2019-04-26 21:35:10 +01:00
Matthew Jasper
7ab92cde55
Use visit_terminator_kind when possible
2019-04-26 21:35:10 +01:00
Matthew Jasper
0eeab6b9a6
Remove BasicBlock parameter from mir visitor methods
2019-04-26 21:35:10 +01:00
varkor
a3470c6189
Update handling of Tuple
2019-04-26 21:09:32 +01:00
varkor
7261bd88ac
Update existing usages
2019-04-25 22:05:04 +01:00
Tyler Mandry
5a7af5480c
Support variantful generators
...
This allows generators to overlap fields using variants.
2019-04-25 10:28:09 -07:00
Mazdak Farrokhzad
5f82b5b882
Rollup merge of #56278 - eddyb:mir-debuginfo-proof, r=nikomatsakis
...
Future-proof MIR for dedicated debuginfo.
This is #56231 without the last commit (the one that actually moves to `VarDebuginfo`).
Nothing should be broken, but it should no longer depend on debuginfo for anything else.
r? @nikomatsakis
2019-04-24 05:16:17 +02:00
Eduard-Mihai Burtescu
d20da13018
rustc_mir: don't rely on mir::LocalDecl visibility_scope
s in the MIR borrowck.
2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
61fcbfcd59
rustc_mir: don't rely on mir::UpvarDecl in the MIR borrowck.
2019-04-23 17:27:54 +03:00
Matthew Jasper
d9ea132b73
Explain error when yielding a reference to a local variable
2019-04-22 18:50:26 +01:00
varkor
7f0f0e31ec
Remove double trailing newlines
2019-04-22 16:57:01 +01:00
Matthew Jasper
aa6fb6caf9
Enable migrate mode by default on the 2015 edition
...
This also fully stabilizes two-phase borrows on all editions
2019-04-21 20:50:02 +01:00
Vadim Petrochenkov
6c187cc0c6
Change return type of TyCtxt::is_static
to bool
...
Add `TyCtxt::is_mutable_static`
2019-04-21 14:41:51 +03:00
bors
72bc62047f
Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obk
...
Refactor Adjust and CastKind
fixes rust-lang#59588
2019-04-20 15:06:15 +00:00
Saleem Jaffer
5be6b0beb9
basic refactor. Adding PointerCast enum
2019-04-15 20:29:13 +05:30
Mazdak Farrokhzad
b9da8a7144
Rollup merge of #59856 - albins:update-polonius, r=nikomatsakis
...
update polonius-engine
This updates polonius-engine to [version 0.7.0](https://github.com/rust-lang/polonius/blob/master/RELEASES.md#v070 ), which adds a hybrid algorithm that starts off with performing a cheaper, location-insensitive analysis before proceeding with the full analysis.
r? @nikomatsakis
2019-04-14 17:49:18 +02:00
bors
e4c66afba5
Auto merge of #59612 - matthewjasper:dataflow-usual-newtype-index, r=estebank
...
Use normal newtype_index macro for MIR dataflows
* Makes the definition of these structs contain `struct IndexName`
* Avoids having an offset by removing high values, rather than 0
* Implements some traits for us.
2019-04-13 16:42:51 +00:00
Albin Stjerna
c440c0a0fd
update polonius-engine
2019-04-10 22:44:07 +02:00
Felix S Klock II
4ff459f76c
Fix out-of-date comment
...
A comment in one match arm make a blanket statement about "reads/reservations", but in fact the whole point of this PR is that reservations are *not* handled by that particular arm anymore.
2019-04-04 18:50:03 +01:00
Matthew Jasper
f8e2beb3d4
Treat two-phase borrow reservations as mutable accesses
2019-04-04 18:47:13 +01:00
flip1995
e4b87f5edb
Deny internal lints on librustc_mir
2019-04-03 19:18:07 +02:00
Mazdak Farrokhzad
d31d80b7d4
Rollup merge of #59630 - nnethercote:shrink-mir-Statement, r=pnkfelix
...
Shrink `mir::Statement`.
The `InlineAsm` variant is extremely rare, and `mir::Statement` often
contributes significantly to peak memory usage.
2019-04-03 04:36:14 +02:00
Mazdak Farrokhzad
a96e3883c1
Rollup merge of #59514 - tmandry:remove-adt-def-from-projection-elem, r=eddyb
...
Remove adt_def from projections and downcasts in MIR
As part of optimizing generator layouts in MIR, we'd like to allow downcasting generators to variants which do not have a corresponding `def_id`, since they are created by the compiler.
This refactor hopes to allow that, without regressing perf.
r? @eddyb
2019-04-03 04:36:12 +02:00
Nicholas Nethercote
d00d639c54
Shrink mir::Statement
.
...
The `InlineAsm` variant is extremely rare, and `mir::Statement` often
contributes significantly to peak memory usage.
2019-04-03 09:09:59 +11:00
Tyler Mandry
4122d2221e
Remove adt_def from PlaceTy and make it a struct
2019-04-02 12:02:17 -07:00
Tyler Mandry
ac29ca75e0
Replace adt_def with name in mir::ProjectionElem::Downcast
2019-04-02 12:02:17 -07:00
Mazdak Farrokhzad
85a82ac334
Rollup merge of #59607 - kenta7777:renames-EvalErrorKind-to-InterpError, r=oli-obk
...
Renames `EvalErrorKind` to `InterpError`
This PR renames `EvalErrorKind` to `InterpError`.
This is related to #54395 .
2019-04-02 13:47:30 +02:00
Matthew Jasper
9eb6f32d45
Use normal newtype_index macro for MIR dataflow
2019-04-01 19:38:00 +01:00
kenta7777
3c8caaca7d
renames EvalErrorKind to InterpError
2019-04-02 01:02:18 +09:00
Mazdak Farrokhzad
0d01fbaeb8
Rollup merge of #58919 - estebank:impl-trait-return-lifetime, r=pnkfelix
...
Suggest using anonymous lifetime in `impl Trait` return
Fix #48467 .
r? @nikomatsakis
2019-04-01 17:29:51 +02:00
Mazdak Farrokhzad
9f9529acd5
Rollup merge of #58507 - Zoxc:time-extended, r=michaelwoerister
...
Add a -Z time option which prints only passes which runs once
This ensures `-Z time-passes` fits on my screen =P
r? @michaelwoerister
2019-04-01 17:29:48 +02:00
Esteban Küber
30c247f881
Suggest using anonymous lifetime in impl Trait
return without hacks
...
Fallback to `static_impl_trait` for nice error message by peeking at the
return type and the lifetime type. Point at the return type instead of
the return expr/stmt in NLL mode.
2019-03-31 09:11:47 -07:00
Taiki Endo
07021e07ed
Allow closure to unsafe fn coercion
2019-04-01 00:00:43 +09:00
Mazdak Farrokhzad
0f26958cea
Rollup merge of #59429 - estebank:for-loop-move-nll, r=petrochenkov
...
When moving out of a for loop head, suggest borrowing it in nll mode
Follow up to #59195 for NLL.
2019-03-28 13:35:44 +01:00
Mazdak Farrokhzad
90c2d641eb
Rollup merge of #59232 - saleemjaffer:mir_place_refactor, r=oli-obk
...
Merge `Promoted` and `Static` in `mir::Place`
fixes #53848
2019-03-26 09:05:40 +01:00
Esteban Küber
4bad56e54c
When moving out of a for loop head, suggest borrowing it in nll mode
2019-03-25 19:29:02 -07:00
Vadim Petrochenkov
2cbc25e6fc
Merge DefPathData::VariantCtor
and DefPathData::StructCtor
2019-03-24 17:59:18 +03:00
Saleem Jaffer
fb93f10dac
code review fixes
2019-03-24 08:59:11 +05:30
bors
0633c55d20
Auto merge of #59068 - ljedrz:kill_off_NodeId_stragglers, r=Zoxc
...
HirIdification: kill off NodeId stragglers
The final stages of HirIdification (#57578 ).
This PR, along with https://github.com/rust-lang/rust/pull/59042 , should finalize the HirIdification process (at least the more straightforward bits).
- replace `NodeId` with `HirId` in `trait_impls`
- remove all `NodeId`s from `borrowck`
- remove all `NodeId`s from `typeck`
- remove all `NodeId`s from `mir`
- remove `trait_auto_impl` (unused)
I would be cool to also remove `NodeId` from `hir::def::Def`, `middle::privacy::AccessLevel` and `hir::ItemId`, but I don't know if this is feasible.
I'll be happy to do more if I've missed anything.
2019-03-23 17:34:18 +00:00
Saleem Jaffer
752544b284
adding mir::StaticKind enum for static and promoted
2019-03-23 20:18:52 +05:30
Saleem Jaffer
cf2f1bb072
review fixes
2019-03-21 22:13:09 +05:30
John Kåre Alsaker
e842f570d9
Add a -Z time option which prints only passes which runs once
2019-03-20 07:54:46 +01:00
Saleem Jaffer
a837b8a368
cleaner code as per review
2019-03-18 15:03:30 +05:30
Saleem Jaffer
7fb1c22da1
promoted is still left in 2 places
2019-03-18 15:03:29 +05:30
Oliver Scherer
5cd2806621
Revert the LazyConst
PR
2019-03-16 21:04:10 +01:00
Eduard-Mihai Burtescu
cafd83d1d5
rustc: don't keep RegionHighlightMode in a thread-local.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
e0c75ff40d
rustc: rename item_path to def_path (except the module in ty).
2019-03-15 13:25:10 +02:00