about summary refs log tree commit diff
path: root/src/librustc_passes
AgeCommit message (Collapse)AuthorLines
2018-09-17Whitespace fix again.Vitaly _Vi Shukela-6/+8
2018-09-17Fill in suggestions Applicability according to @estebankVitaly _Vi Shukela-2/+2
Also fix some formatting along the way.
2018-09-17Fix style according to review comments.Vitaly _Vi Shukela-1/+2
2018-09-16Remove usages of span_suggestion without ApplicabilityVitaly _Vi Shukela-3/+7
Use Applicability::Unspecified for all of them instead.
2018-09-13introduce SelfCtorF001-2/+3
2018-09-12Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakisbors-1/+0
stabilize outlives requirements https://github.com/rust-lang/rust/issues/44493 r? @nikomatsakis
2018-09-12Rollup merge of #54031 - ljedrz:cleanup_passes, r=oli-obkkennytm-128/+96
A few cleanups and minor improvements to rustc_passes - prefer `if let` to `match` when only one branch matters - prefer equality checks to pattern matching - prefer `is_empty` to `len() == 0` - collapse a couple of `if` expressions - rename `label` to `destination` when destructuring `hir::ExprKind::Continue` - `derive Copy` for `Promotability` - `impl BitAndAssign` for `Promotability` - a few formatting fixes - a few other minor cleanups
2018-09-11Auto merge of #53873 - ↵bors-1/+1
nikomatsakis:nll-universe-subtyping-and-pattern-ascription, r=pnkfelix support ascription for patterns in NLL This implements the strategy outlined in [this comment](https://github.com/rust-lang/rust/issues/47184#issuecomment-416669986): - We first extend the NLL subtyping code so it can handle inference variables and subtyping. - Then we extend HAIR patterns with type ascription. - Then we treat the type `T` in `let pat: T = ...` as an ascription. Before landing, a few things: - [x] Fix the WF rule bug (filed a FIXME https://github.com/rust-lang/rust/issues/54105) - [x] Fix an ICE I encountered locally around bound regions, or else file a follow-up - [x] More tests probably =) r? @pnkfelix
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-10add the `AscribeUserType` statement kindNiko Matsakis-1/+1
Make it have the semantics of subtype.
2018-09-10Auto merge of #53854 - davidtwco:issue-53668, r=nikomatsakisbors-0/+51
if- and while-let-chains, take 2 - edition changes Part of #53668. r? @nikomatsakis
2018-09-07A few cleanups and minor improvements to rustc_passesljedrz-128/+96
2018-09-07Added note referencing issue which added error.David Wood-0/+3
2018-09-02Moved let-chain warning/error to ast_validation and changed to unconditional ↵David Wood-0/+48
error.
2018-09-01Auto merge of #53815 - F001:if-let-guard, r=petrochenkovbors-1/+1
refactor match guard This is the first step to implement RFC 2294: if-let-guard. Tracking issue: https://github.com/rust-lang/rust/issues/51114 The second step should be introducing another variant `IfLet` in the Guard enum. I separated them into 2 PRs for the convenience of reviewers. r? @petrochenkov
2018-09-01Auto merge of #53604 - oli-obk:min_const_fn, r=Centril,varkorbors-3/+1
Implement the `min_const_fn` feature gate cc @RalfJung @eddyb r? @Centril implements the feature gate for #53555 I added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all. The `min_const_fn` checks are run first, and if they succeeded, the `const_fn` checks are run additionally to ensure we didn't miss anything.
2018-08-31Auto merge of #53699 - oli-obk:promotion_stability_hole, r=nikomatsakisbors-3/+0
Fix promotion stability hole in old borrowck r? @nikomatsakis I screwed up the promotion stability checks. Big time. They were basically nonexistant. We had tests for it. I also screwed up said tests. This is in stable already :( Basically stability checks of promotion only worked if you tried to use a const fn defined in the same crate. cc @eddyb
2018-08-31Implement the `min_const_fn` feature gateOliver Schneider-3/+1
2018-08-30introduce Guard enumF001-1/+1
2018-08-27Rename hir::map::NodeKind to hir::Nodevarkor-4/+4
2018-08-27Remove path prefixes from NodeKindvarkor-3/+3
2018-08-27Rename hir::map::Node to hir::map::NodeKindvarkor-2/+2
2018-08-25Properly prevent the promotion of unstable const fnsOliver Schneider-3/+0
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-22Auto merge of #53607 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-1/+3
Rollup of 10 pull requests Successful merges: - #53418 (Mark some suggestions as MachineApplicable) - #53431 (Moved some feature gate ui tests to correct location) - #53442 (Update version of rls-data used with save-analysis) - #53504 (Set applicability for more suggestions.) - #53541 (Fix missing impl trait display as ret type) - #53544 (Point at the trait argument when using unboxed closure) - #53558 (Normalize source line and column numbers.) - #53562 (Lament the invincibility of the Turbofish) - #53574 (Suggest direct raw-pointer dereference) - #53585 (Remove super old comment on function that parses items) Failed merges: - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.) - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()) r? @ghost
2018-08-22Rollup merge of #53504 - ekse:suggestions-applicability-2, r=estebankGuillaume Gomez-1/+3
Set applicability for more suggestions. Converts a couple more calls to `span_suggestion_with_applicability` (#50723). To be on the safe side, I marked suggestions that depend on the intent of the user or that are potentially lossy conversions as MaybeIncorrect. r? @estebank
2018-08-22Remove Ty prefix from ↵varkor-3/+3
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-20Auto merge of #51880 - varkor:generics-hir-generalisation-followup, r=eddybbors-4/+3
The Great Generics Generalisation: HIR Followup Addresses the final comments in #48149. r? @eddyb, but there are a few things I have yet to clean up. Making the PR now to more easily see when things break. cc @yodaldevoid
2018-08-20Fix diagnostic regressionvarkor-1/+3
2018-08-20Set applicability for more suggestions.Sébastien Duquette-1/+3
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-08-19Address minor commentsvarkor-4/+1
2018-08-11Clean up and add extra testsvarkor-2/+2
2018-08-11Emit an error during parsingvarkor-13/+8
2018-08-11Improve diagnosticsvarkor-2/+10
2018-08-11Fix handling of trait methods with bodies and improve efficiencyvarkor-12/+14
2018-08-11Suggest replacing patterns with underscoresvarkor-2/+5
2018-08-11Emit error for pattern arguments in trait methodsvarkor-1/+13
The error and check for this already existed, but the parser didn't try to parse trait method arguments as patterns, so the error was never emitted. This surfaces the error, so we get better errors than simple parse errors.
2018-08-09[nll] librustc_passes: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-07Add HirId to VisibilityKind::RestrictedMark Rousskov-2/+2
2018-08-04Use diagnostic API on SessionMark Rousskov-1/+1
2018-07-29Change order of copy and borrow to avoid conflictMatthew Jasper-1/+2
Note that the first argument is `self as &mut dyn Delegate`, so this isn't allowed with two-phase borrows.
2018-07-28Rollup merge of #52781 - ljedrz:avoid_vec_arguments, r=nikomatsakiskennytm-1/+1
Use a slice where a vector is not necessary
2018-07-27Use slices where a vector is not necessaryljedrz-1/+1
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-23Promoteds are statics and statics have a place, not just a valueOliver Schneider-12/+2
2018-07-16ExprKindcsmoe-37/+37
2018-07-16DeclKindcsmoe-2/+2
2018-07-16StmtKindcsmoe-3/+3
2018-07-16BinOpKindcsmoe-3/+3