about summary refs log tree commit diff
path: root/src/librustc/ich
AgeCommit message (Collapse)AuthorLines
2019-02-24hir: remove NodeId from MacroDefljedrz-1/+0
2019-02-24hir: remove NodeId from WhereEqPredicateljedrz-1/+0
2019-02-24hir: remove NodeId from WhereClauseljedrz-1/+0
2019-02-24hir: remove NodeId from GenericParamljedrz-1/+0
2019-02-24hir: remove NodeId from Lifetime and Tyljedrz-2/+0
2019-02-24Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJungMazdak Farrokhzad-1/+1
Const to op simplification r? @RalfJung alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-23Type check coercions to pointer typesMatthew Jasper-0/+1
2019-02-21Use normal mutable borrows in MIR match loweringMatthew Jasper-1/+6
2019-02-19Auto merge of #57896 - oli-obk:permissive_existence, r=cramertjbors-0/+5
Be more permissive with required bounds on existential types fixes #54184 r? @pnkfelix
2019-02-19Auto merge of #58503 - varkor:const-generics-hir, r=petrochenkovbors-1/+10
Add const generics to the HIR Split out from https://github.com/rust-lang/rust/pull/53645. cc @yodaldevoid r? @eddyb
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-1/+1
2019-02-15Take Const into account in HIRvarkor-1/+10
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-0/+4
2019-02-13HirId-ify hir::BodyIdljedrz-2/+2
2019-02-07Add const params to Defvarkor-0/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-05move librustc to 2018Mark Mansi-58/+58
2019-02-02hir: add HirId to main Hir nodesljedrz-4/+16
2019-02-01Restrict concrete types to equivalent typesOliver Scherer-0/+5
2019-01-30Add suggestions to deprecation lintsOliver Scherer-1/+1
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-1/+1
2019-01-26Auto merge of #55641 - nagisa:optimize-attr, r=pnkfelixbors-0/+9
Implement optimize(size) and optimize(speed) attributes This PR implements both `optimize(size)` and `optimize(speed)` attributes. While the functionality itself works fine now, this PR is not yet complete: the code might be messy in places and, most importantly, the compiletest must be improved with functionality to run tests with custom optimization levels. Otherwise the new attribute cannot be tested properly. Oh, and not all of the RFC is implemented – attribute propagation is not implemented for example. # TODO * [x] Improve compiletest so that tests can be written; * [x] Assign a proper error number (E9999 currently, no idea how to allocate a number properly); * [ ] Perhaps reduce the duplication in LLVM attribute assignment code…
2019-01-25Auto merge of #57714 - matthewjasper:wellformed-unreachable, r=pnkfelixbors-3/+9
[NLL] Clean up handling of type annotations * Renames (Canonical)?UserTypeAnnotation -> (Canonical)?UserType so that the name CanonicalUserTypeAnnotation is free. * Keep the inferred type associated to user type annotations in the MIR, so that it can be compared against the annotated type, even when the annotated expression gets removed from the MIR. (#54943) * Use the inferred type to allow infallible handling of user type projections (#57531) * Uses revisions for the tests in #56993 * Check the types of `Unevaluated` constants with no annotations (#46702) * Some drive-by cleanup Closes #46702 Closes #54943 Closes #57531 Closes #57731 cc #56993 leaving this open to track the underlying issue: we are not running tests with full NLL enabled on CI at the moment r? @nikomatsakis
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-0/+9
2019-01-20Auto merge of #57651 - JohnTitor:give-char-type, r=estebankbors-0/+2
Implement new literal type `Err` Fixes #57384 I removed `return Ok`, otherwise, two errors occur. Any solutions? r? @estebank
2019-01-20Mark incorrect recovered `char` literals as `TyErr` to avoid type errorsYuki Okushi-0/+1
2019-01-19Rollup merge of #57689 - nnethercote:redo-hir-Stmt, r=petrochenkovMazdak Farrokhzad-10/+10
Redo `hir::Stmt` A couple of changes that make things simpler and more consistent. This should probably wait until after 1.32 lands to land, to avoid late breakage for tools.
2019-01-19Handle lifetime annotations in unreachable codeMatthew Jasper-1/+1
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-19Use a struct for user type annotationsMatthew Jasper-0/+6
2019-01-19Rename UserTypeAnnotation -> UserTypeMatthew Jasper-3/+3
2019-01-19Rollup merge of #57486 - nnethercote:simplify-TokenStream-more, r=petrochenkovMazdak Farrokhzad-1/+1
Simplify `TokenStream` some more These commits simplify `TokenStream`, remove `ThinTokenStream`, and avoid some clones. The end result is simpler code and a slight perf win on some benchmarks. r? @petrochenkov
2019-01-17Remove `hir::StmtKind::Decl`.Nicholas Nethercote-7/+2
It's a level of indirection that hurts far more than it helps. The code is simpler without it. (This commit cuts more than 120 lines of code.) In particular, this commit removes some unnecessary `Span`s within `DeclKind` that were always identical to those in the enclosing `Stmt`, and some unnecessary allocations via `P`.
2019-01-17Make `hir::Stmt` a separate struct.Nicholas Nethercote-4/+9
Benefits: - It lets us move the `NodeId` field out of every `hir::StmtKind` variant `NodeId` to a more sensible spot. - It eliminates sadness in `Stmt::fmt`. - It makes `hir::Stmt` match `ast::Stmt`.
2019-01-16Remove `hir::Label`.Nicholas Nethercote-1/+1
It's identical to `ast::Label`.
2019-01-16Add new literal type ErrYuki Okushi-0/+1
2019-01-14Remove `ThinTokenStream`.Nicholas Nethercote-1/+1
`TokenStream` is now almost identical to `ThinTokenStream`. This commit removes the latter, replacing it with the former.
2019-01-05Rollup merge of #57219 - matthewjasper:mir-cleanup, r=nikomatsakiskennytm-16/+0
Remove some unused code Closes #57096
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-1/+5
2018-12-30Refactor `UserTypeAnnotation`.David Wood-17/+26
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-29Auto merge of #56225 - alexreg:type_alias_enum_variants, r=petrochenkovbors-4/+4
Implement RFC 2338, "Type alias enum variants" This PR implements [RFC 2338](https://github.com/rust-lang/rfcs/pull/2338), allowing one to write code like the following. ```rust #![feature(type_alias_enum_variants)] enum Foo { Bar(i32), Baz { i: i32 }, } type Alias = Foo; fn main() { let t = Alias::Bar(0); let t = Alias::Baz { i: 0 }; match t { Alias::Bar(_i) => {} Alias::Baz { i: _i } => {} } } ``` Since `Self` can be considered a type alias in this context, it also enables using `Self::Variant` as both a constructor and pattern. Fixes issues #56199 and #56611. N.B., after discussing the syntax for type arguments on enum variants with @petrochenkov and @eddyb (there are also a few comments on the [tracking issue](https://github.com/rust-lang/rust/issues/49683)), the consensus seems to be treat the syntax as follows, which ought to be backwards-compatible. ```rust Option::<u8>::None; // OK Option::None::<u8>; // OK, but lint in near future (hard error next edition?) Alias::<u8>::None; // OK Alias::None::<u8>; // Error ``` I do not know if this will need an FCP, but let's start one if so.
2018-12-29Remove unused types from rustc::mir::interpretMatthew Jasper-16/+0
The types are no longer used with the change to stacked borrows for validation.
2018-12-27Auto merge of #56999 - petrochenkov:macrecov2, r=estebankbors-2/+2
AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-end This way we can avoid aborting compilation if expansion produces errors and generate `ExprKind::Err`s instead.
2018-12-27Handle sub-typing in chalk-enginescalexm-0/+4
2018-12-27Integrate chalk enginescalexm-0/+7
2018-12-27Add a def-id in `ty::ParamEnv`scalexm-1/+2
2018-12-27Get rid of `Block::recovered`Vadim Petrochenkov-1/+0
2018-12-27AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-endVadim Petrochenkov-1/+2
2018-12-26Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`.Alexander Regueiro-4/+4
2018-12-25Remove licensesMark Rousskov-90/+0
2018-12-23stabilize min_const_unsafe_fn in 1.33.Mazdak Farrokhzad-1/+0
2018-12-20Auto merge of #56741 - RalfJung:retag-to-raw, r=oli-obkbors-2/+2
treat ref-to-raw cast like a reborrow: do a special kind of retag r? @oli-obk Cc @nikomatsakis