about summary refs log tree commit diff
path: root/src/librustc_passes
AgeCommit message (Collapse)AuthorLines
2018-07-14Auto merge of #52318 - TheDarkula:master, r=oli-obkbors-129/+196
Removed the promotable field from CheckCrateVisitor... and replaced it with the custom enum Promotability. r? @oli-obk
2018-07-14Removed the promotable field from CheckCrateVisitor and replaced it with the ↵Meade Kincke-129/+196
structs Promotable and NotPromotable.
2018-07-14Address commentsVadim Petrochenkov-1/+1
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-13/+15
2018-07-12Deny bare trait objects in the rest of rustljedrz-0/+2
2018-07-07General fixes and cleanup.Meade Kincke-31/+24
2018-07-07Omitted the walk in visit_expr()Meade Kincke-65/+174
2018-07-02Fix issue-50585 testvarkor-2/+2
2018-07-02Fix an ICE using break and continue as array lengthsvarkor-1/+6
2018-07-01Auto merge of #51883 - estebank:placement-suggestion, r=varkorbors-6/+21
Suggest correct comparison against negative literal When parsing as emplacement syntax (`x<-1`), suggest the correct syntax for comparison against a negative value (`x< -1`). Fix #45651.
2018-06-28Suggest correct comparison against negative literalEsteban Küber-6/+21
When parsing as emplacement syntax (`x<-1`), suggest the correct syntax for comparison against a negative value (`x< -1`).
2018-06-27Generate the `NodeId` for `existential type` in the ASTOliver Schneider-3/+3
2018-06-23Auto merge of #51727 - varkor:expragain-to-exprcontinue, r=petrochenkovbors-2/+2
Rename hir::ExprAgain to hir::ExprContinue The current name is confusing and historical. I also used this PR to clean up the annoying indentation in `check/mod.rs`. If that's viewed as too tangential a change, I'll split it up, but it seemed reasonable to slip it in to reduce @bors's work. It's easy to compare for the two commits individually. r? @petrochenkov
2018-06-23Rename ExprAgain to ExprContinuevarkor-2/+2
2018-06-21Explicitly ban async in trait implsTaylor Cramer-0/+1
This wouldn't compile before because the return type wouldn't match, but now it's properly an error.
2018-06-21Async methodsTaylor Cramer-0/+9
2018-06-21Parse async fn header.Without Boats-2/+2
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-20Make GenericBound explicitvarkor-3/+3
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-5/+5
2018-06-20Rename TraitTyParamBound to ParamBound::Traitvarkor-2/+2
2018-06-20Take advantage of the lifetime refactoringvarkor-2/+2
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-4/+4
2018-06-20Lift bounds into GenericParamvarkor-11/+11
2018-06-20Rename structures in astvarkor-8/+8
2018-06-20Refactor generic parameters in rustdoc/cleanvarkor-24/+19
2018-06-20Remove AngleBracketedArgs implvarkor-7/+10
2018-06-20Remove methods from ast::GenericParam and ast::Genericsvarkor-1/+1
2018-06-20Refactor ast::GenericParam as a structvarkor-48/+40
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-9/+9
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Make method and variable names more consistentvarkor-6/+6
2018-06-20Rename "parameter" to "arg"varkor-10/+10
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-2/+2
2018-06-03Do not promote union field accessesOliver Schneider-1/+8
2018-06-01also check `let` arms and nested patterns for mutable borrowsNiko Matsakis-5/+34
2018-05-31Auto merge of #51182 - eddyb:not-just-visibility, r=nikomatsakisbors-8/+8
[MIR] Change "scopes" from "visibility scopes" to "source scopes". These scopes are already used for source-oriented diagnostics, lint levels and unsafety checks. This PR generalizes the naming around scopes, making the type `SourceScope`, and flips (across several commits) the relationship/priority between `LocalDecl`'s "visibility" and "syntactic" scopes. r? @nikomatsakis
2018-05-30rustc: rename mir::VisibilityScope to mir::SourceScope.Eduard-Mihai Burtescu-8/+8
2018-05-30rustc: don't visit lifetime parameters through visit_lifetime.Eduard-Mihai Burtescu-0/+7
2018-05-29rust-lang/rust#27282: Add `StatementKind::ReadForMatch` to MIR.Felix S. Klock II-0/+1
(This is just the data structure changes and some boilerplate match code that followed from it; the actual emission of these statements comes in a follow-up commit.)
2018-05-25pacify the mercilous tidyNiko Matsakis-1/+2
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+6
2018-05-24Enforce stability of const fn in promotedsOliver Schneider-4/+24
2018-05-23Rollup merge of #50849 - est31:visit_closure_args, r=michaelwoeristerkennytm-1/+2
CheckLoopVisitor: also visit closure arguments This turns the ICE #50581 in this code: ```rust fn main() { |_: [u8; break]| (); } ``` from ``` 'assertion failed: self.tcx.sess.err_count() > 0', librustc_typeck/check/mod.rs ``` to ``` librustc_mir/hair/cx/expr.rs:543: invalid loop id for break: not inside loop scope ``` which is an ICE as well but at a later stage during compilation and most importantly fixes of bug #50576 will fix this as well. As this "only" moves an ICE to a later stage, I didn't add any tests. Now I have manually verified the default impls of the visitor trait to check whether we have missed any other opportunity to visit more stuff and coudln't find anything (except the missing `break` visit I've fixed in #50829 but that one was already r+'d so I didn't want to push more commits).
2018-05-20Rollup merge of #50829 - est31:master, r=estebankkennytm-0/+2
CheckLoopVisitor: also visit break expressions Fixes #50802
2018-05-17CheckLoopVisitor: also visit closure argumentsest31-1/+2
This turns an ICE on this code: fn main() { |_: [u8; break]| (); } from 'assertion failed: self.tcx.sess.err_count() > 0', librustc_typeck/check/mod.rs to librustc_mir/hair/cx/expr.rs:543: invalid loop id for break: not inside loop scope which is at a later stage during compilation and most importantly fixes of bug #50576 will fix this as well.
2018-05-17Turn some functions from `token.rs` into methods on `Ident`Vadim Petrochenkov-4/+2
2018-05-17CheckLoopVisitor: also visit break expressionsest31-0/+2
Fixes #50802
2018-05-17Rollup merge of #50793 - jrlusby:master, r=petrochenkovkennytm-10/+95
tidy: Add a check for empty UI test files Check for empty `.stderr` and `.stdout` files in UI test directories. Empty files could still pass testing for `compile-pass` tests with no output so they can get into the repo accidentally, but they are not necessary and can be removed. This is very much an in progress pull request. I'm having an issue with rustfmt. It wanted to reformat the entire file for almost every file by default. And when I run tidy it just errors out because it catches the empty files that are already in the repo. My next step is goin got be to remove those empty file and see if running tidy again will actually reformat things outside of the context of `cargo fmt` Fixes https://github.com/rust-lang/rust/issues/50785
2018-05-17Rollup merge of #50788 - varkor:missing-const-cast, r=cramertjkennytm-1/+1
Fix an ICE when casting a nonexistent const Fixes https://github.com/rust-lang/rust/issues/50599.
2018-05-16Address review commentsest31-11/+11
2018-05-16Add feature gate label_break_valueest31-0/+1