19 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
0cb9e36090 rustc -> rustc_middle part 2 2020-03-30 07:16:56 +02:00
Eduard-Mihai Burtescu
10f08abd2e rustc: keep upvars tupled in {Closure,Generator}Substs. 2020-03-21 14:23:50 +02:00
Mazdak Farrokhzad
a6d0c35e86
Rollup merge of #70089 - eddyb:closure-sig-infer, r=nikomatsakis
rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly known.

That is, `ClosureSubsts` is always created (in `rustc_typeck::check::closure`) with a `FnSig`, as the number of inputs is known, even if they might all have inference types.
The only useful thing `InferCtxt::closure_sig` was doing is resolving an inference variable used just to get the `ty::FnPtr` containing that `FnSig` into `ClosureSubsts`.

The ideal way to solve this would be to add a constructor for `ClosureSubsts`, that combines the parent `Substs`, the closure kind, the signature, and capture types together, but for now I've went with resolving the inference types just after unifying them with the real types.

r? @nikomatsakis
2020-03-21 08:51:18 +01:00
Eduard-Mihai Burtescu
f3ec069886 rustc: use LocalDefId instead of DefIndex in HirId. 2020-03-19 11:16:08 +02:00
Eduard-Mihai Burtescu
0c692797d7 rustc: rename DefId::to_local to expect_local and use it instead of LocalDefId::from_def_id. 2020-03-19 11:15:35 +02:00
Eduard-Mihai Burtescu
e11dd47503 rustc: use LocalDefId instead of DefIndex for query keys. 2020-03-19 11:15:35 +02:00
Eduard-Mihai Burtescu
63811bc38f rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly known. 2020-03-18 02:16:01 +02:00
Matthias Krüger
83980aca20 Don't redundantly repeat field names (clippy::redundant_field_names) 2020-03-06 19:42:18 +01:00
Mark Mansi
66500effea add generator_kind query 2020-02-22 13:17:03 -06:00
Mark Mansi
4d22e757cd minor cleanup 2020-02-22 13:11:15 -06:00
Mark Mansi
7f7709e3d4 Generalized article_and_description 2020-02-22 13:11:15 -06:00
Camille GILLOT
1637aab15e Make librustc_mir compile. 2020-02-16 11:57:49 +01:00
Jonas Schievink
f2c1468965 Add resume arg place to Yield MIR terminator 2020-02-02 13:20:57 +01:00
Mazdak Farrokhzad
ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad
7901c7f707 canonicalize FxHash{Map,Set} imports 2020-01-04 18:57:22 +01:00
Matthew Kraai
9ec924c97d Change "be returning" to "return" 2019-12-28 07:05:44 -08:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Mark Mansi
697853117f fix imports 2019-12-11 21:35:50 -06:00
Mark Mansi
52a9eff7ad get rid of nll submod 2019-12-11 21:35:50 -06:00