Commit Graph

34 Commits

Author SHA1 Message Date
csmoe 64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
Wesley Wiser e63b992030 Resolve PR comments 2019-08-22 06:36:31 -04:00
Wesley Wiser 34fe28bc67 Fix tidy 2019-08-22 06:36:31 -04:00
Wesley Wiser 73814654b2 Move promoted out of mir::Body 2019-08-22 06:36:30 -04: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
Jad Ghalayini 80ff07f30d Changed usages of `mir` in librustc::mir and librustc_mir to `body` 2019-06-09 16:05:05 -04: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
Oliver Scherer 5cd2806621 Revert the `LazyConst` PR 2019-03-16 21:04:10 +01:00
Matthew Jasper 60eeed34af Include bounds from promoted constants in NLL
Previously, a promoted that contains a function item wouldn't have the
function items bounds propagated to
the main function body.
2019-03-01 18:53:14 +00:00
csmoe ccfa5d6df8 replace &'tcx Substs with SubstsRef 2019-02-26 19:30:57 +08:00
Matthew Jasper 65fe251634 Handle lifetime annotations in unreachable code
We  equate the type in the annotation with the inferred type first so
that we have a fully inferred type to perform the well-formedness check
on.
2019-01-19 16:30:45 +00:00
Matthew Jasper ed871cb368 Use a struct for user type annotations 2019-01-19 15:15:07 +00:00
Matthew Jasper ab7bc3a23d Rename UserTypeAnnotation -> UserType 2019-01-19 15:15:07 +00:00
Oliver Scherer b903cb9d60 Move the `Unevaluated` constant arm upwards in the type structure 2019-01-01 20:05:02 +01:00
David Wood 24a7a010d1
Refactor `UserTypeAnnotation`.
This commit refactors the `UserTypeAnnotation` type to be referred to by
an index within `UserTypeProjection`. `UserTypeAnnotation` is instead
kept in an `IndexVec` within the `Mir` struct.

Further, instead of `UserTypeAnnotation` containing canonicalized types,
it now contains normal types and the entire `UserTypeAnnotation` is
canonicalized. To support this, the type was moved from the `rustc::mir`
module to `rustc::ty` module.
2018-12-30 14:25:20 +01:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Matthew Jasper b16985a354 Remove mir::StatementKind::EndRegion
Since lexical MIR borrow check is gone, and validation no longer uses
these, they can be removed.
2018-11-18 11:05:19 +00:00
Niko Matsakis aed6e4a083 introduce a `UserTypeAnnotation` enum 2018-10-15 16:24:46 -04:00
Niko Matsakis a609384561 do not skip renumbering the place in place-type-ascriptions 2018-10-08 19:20:37 -04:00
Niko Matsakis 16f4e8ac1d generalize `AscribeUserType` to handle sub or super type 2018-09-10 08:28:31 -04:00
Niko Matsakis dd3cc9669a add the `AscribeUserType` statement kind
Make it have the semantics of subtype.
2018-09-10 08:22:31 -04:00
Niko Matsakis 40498bae65 simplify `NLLRegionVariableOrigin` 2018-07-25 06:38:19 +03:00
John Kåre Alsaker 710b4ad2a5 Store the GeneratorInterior in the new GeneratorSubsts 2018-05-08 16:21:58 +02:00
David Wood 692a931887
UserAssertTy can handle inference variables.
This commit modifies the UserAssertTy statement to take a canonicalized
type rather than a regular type so that we can handle the case where the
user provided type contains a inference variable.
2018-03-22 21:11:02 +00:00
David Wood d4b9a7874b
Added comment in renumberer about UserAssertTy. 2018-03-22 21:11:02 +00:00
David Wood ee4c7ac154
Added override in renumberer for UserAssertTy. 2018-03-22 21:11:01 +00:00
Niko Matsakis d201e83f71 renumber regions in the generator interior
Fixes #47189.
2018-01-11 06:05:05 -05:00
Niko Matsakis 93afb1affc connect NLL type checker to the impl trait code
We now add the suitable `impl Trait` constraints.
2017-12-20 14:04:52 -05:00
Niko Matsakis e9824c50ed impose inputs/ouputs on MIR after the fact
The input/output types found in `UniversalRegions` are not normalized.
The old code used to assign them directly into the MIR, which would
lead to errors when there was a projection in a argument or return
type. This also led to some special cases in the `renumber` code.

We now renumber uniformly but then pass the input/output types into
the MIR type-checker, which equates them with the types found in MIR.
This allows us to normalize at the same time.
2017-12-15 10:27:53 -05:00
Niko Matsakis ab1c1bc6bc mir-borrowck returns closure requirements, mir-typeck enforces 2017-12-07 05:28:00 -05:00
Niko Matsakis e5dc4ba280 renumber types in `ty::Const` and relate them to `mir::Constant` 2017-12-07 05:27:03 -05:00
Niko Matsakis 243bf3f718 rename "free region" to "universally quantified region"
This has been bugging me. All the regions appear free in the source;
the real difference is that some of them are universally quantified
(those in the function signature) and some are existentially
quantified (those for which we are inferring values).
2017-12-04 09:14:38 -05:00
Paul Daniel Faria a9cb25b23a inform constraint generation using maybe-init
In particular, if we see a variable is DROP-LIVE, but it is not
MAYBE-INIT, then we can ignore the drop. This leavess attempt to use
more complex refinements of the idea (e.g., for subpaths or subfields)
to future work.
2017-12-04 08:51:11 -05:00