about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-02-26reduce repetitions of (n << amt) >> amtkenta7777-7/+8
2019-02-26update scoped_tls to 1.0Marcel Hellwig-1/+1
2019-02-26Auto merge of #58561 - ljedrz:HirIdify_some_nodes, r=Zoxcbors-258/+230
Remove NodeId from some HIR nodes The next iteration of https://github.com/rust-lang/rust/pull/57578. Removes `NodeId` from: - [x] `Lifetime` - [x] `Ty` - [x] `GenericParam` - [x] `WhereClause` - [x] `WhereEqPredicate` - [x] `MacroDef` - [x] `Block` - [x] `Expr` r? @Zoxc
2019-02-25Allow lang and lib features to share namesvarkor-4/+8
2019-02-25Auto merge of #58649 - ↵bors-1/+10
pnkfelix:issue-57464-avoid-ice-when-region-sneaks-into-impl-trait, r=pnkfelix avoid ICE when region sneaks into impl trait Addresses non-NLL instances of #57464
2019-02-25Rollup merge of #58723 - Centril:deny-elided_lifetimes_in_paths-librustc, ↵Mazdak Farrokhzad-2/+0
r=oli-obk librustc: deny(elided_lifetimes_in_paths) As part of the Rust 2018 transition, remove `#![allow(elided_lifetimes_in_paths)]` from `librustc`. r? @oli-obk
2019-02-25Rollup merge of #58690 - kenta7777:reduce-code-repetition-miri-related, ↵Mazdak Farrokhzad-3/+2
r=oli-obk Reduce a Code Repetition like `(n << amt) >> amt` Fixes a part of [#49937](https://github.com/rust-lang/rust/issues/49937).
2019-02-25librustc: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-2/+0
2019-02-25Auto merge of #57609 - matthewjasper:more-restrictive-match, r=pnkfelixbors-5/+15
Use normal mutable borrows in matches `ref mut` borrows are currently two-phase with NLL enabled. This changes them to be proper mutable borrows. To accommodate this, first the position of fake borrows is changed: ```text [ 1. Pre-match ] | [ (old create fake borrows) ] [ 2. Discriminant testing -- check discriminants ] <-+ | | | (once a specific arm is chosen) | | | [ (old read fake borrows) ] | [ 3. Create "guard bindings" for arm ] | [ (create fake borrows) ] | | | [ 4. Execute guard code ] | [ (read fake borrows) ] --(guard is false)-----------+ | | (guard results in true) | [ 5. Create real bindings and execute arm ] | [ Exit match ] ``` The following additional changes are made to accommodate `ref mut` bindings: * We no longer create fake `Shared` borrows. These borrows are no longer needed for soundness, just to avoid some arguably strange cases. * `Shallow` borrows no longer conflict with existing borrows, avoiding conflicting access between the guard borrow access and the `ref mut` borrow. There is some further clean up done in this PR: * Avoid the "later used here" note for Shallow borrows (since it's not relevant with the message provided) * Make any use of a two-phase borrow activate it. * Simplify the cleanup_post_borrowck passes into a single pass. cc #56254 r? @nikomatsakis
2019-02-25Rollup merge of #58697 - taiki-e:question-in-macros, r=CentrilMazdak Farrokhzad-6/+6
Use ? in some macros
2019-02-24Deny `async fn` in 2015 editionNathan Corbyn-10/+10
Fix style issues and update diagnostic messages Update src/librustc_passes/diagnostics.rs Co-Authored-By: doctorn <me@nathancorbyn.com> Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition
2019-02-24hir: remove NodeId from Exprljedrz-103/+100
2019-02-24hir: remove NodeId from Blockljedrz-28/+25
2019-02-24Auto merge of #58315 - gnzlbg:returns_twice, r=alexcrichtonbors-0/+3
Implement unstable ffi_return_twice attribute This PR implements [RFC2633](https://github.com/rust-lang/rfcs/pull/2633) r? @eddyb
2019-02-24Use ? in some macrosTaiki Endo-6/+6
2019-02-24hir: remove NodeId from MacroDefljedrz-5/+3
2019-02-24middle: partially HirIdify stabilityljedrz-29/+23
2019-02-24hir: remove NodeId from WhereEqPredicateljedrz-4/+1
2019-02-24hir: remove NodeId from WhereClauseljedrz-9/+3
2019-02-24hir: remove NodeId from GenericParamljedrz-24/+22
2019-02-24hir: remove NodeId from Lifetime and Tyljedrz-58/+49
2019-02-24hir: impl Display for HirIdljedrz-0/+6
2019-02-24Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJungMazdak Farrokhzad-6/+6
Const to op simplification r? @RalfJung alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-24reduce a code repetition like (n << amt) >> amtkenta7777-3/+2
2019-02-24Auto merge of #58232 - ljedrz:HirIdification_continued, r=Zoxcbors-200/+201
HirId-ify intravisit A big step towards https://github.com/rust-lang/rust/pull/57578. This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
2019-02-23Auto merge of #57051 - Eijebong:parking_lot, r=nikomatsakisbors-1/+1
Update parking_lot to 0.7 Unfortunately this'll dupe parking_lot until the data_structures crate is published and be updated in rls in conjunction with crossbeam-channel
2019-02-23Implement ffi_returns_twice attributegnzlbg-0/+3
2019-02-23Type check coercions to pointer typesMatthew Jasper-8/+16
2019-02-23Rollup merge of #58476 - nnethercote:rm-LazyTokenStream, r=petrochenkovMazdak Farrokhzad-7/+7
Remove `LazyTokenStream`. `LazyTokenStream` was added in #40939. Perhaps it was an effective optimization then, but no longer. This PR removes it, making the code both simpler and faster. r? @alexcrichton
2019-02-22Fix #57979 by allowing a legitimate type error to take precedence over an ICE.Felix S. Klock II-1/+10
2019-02-22Update parking_lot to 0.7Bastien Orivel-1/+1
Unfortunately this'll dupe parking_lot until the data_structures crate is published and be updated in rls in conjunction with crossbeam-channel
2019-02-21Use normal mutable borrows in MIR match loweringMatthew Jasper-5/+15
2019-02-21partially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbcNiko Matsakis-1/+19
This preserves the error you currently get on stable for the old-lub-glb-object.rs test.
2019-02-21update test files to reflect new outputNiko Matsakis-0/+12
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-02-21restore the actual leak-checkNiko Matsakis-14/+193
2019-02-21introduce a dummy leak check and invoke it in all the right placesNiko Matsakis-39/+105
This set of diffs was produced by combing through b68fad670bb3612cac26e50751e4fd9150e59977 and seeing where the `leak_check` used to be invoked and how.
2019-02-21reintroduce `commit_if_ok` calls to `subtype_predicate`Niko Matsakis-14/+16
2019-02-21reintroduce `commit_if_ok` call into `higher_ranked_sub`Niko Matsakis-26/+25
2019-02-21s/skol_/placeholder_/Niko Matsakis-10/+10
2019-02-20Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelixbors-26/+90
make generalization code create new variables in correct universe In our type inference system, when we "generalize" a type T to become a suitable value for a type variable V, we sometimes wind up creating new inference variables. So, for example, if we are making V be some subtype of `&'X u32`, then we might instantiate V with `&'Y u32`. This generalized type is then related `&'Y u32 <: &'X u32`, resulting in a region constriant `'Y: 'X`. Previously, however, we were making these fresh variables like `'Y` in the "current universe", but they should be created in the universe of V. Moreover, we sometimes cheat in an invariant context and avoid creating fresh variables if we know the result must be equal -- we can only do that when the universes work out. Fixes #57843 r? @pnkfelix
2019-02-20Auto merge of #58578 - kennytm:rollup, r=kennytmbors-22/+26
Rollup of 24 pull requests Successful merges: - #56470 (Modify doctest's auto-`fn main()` to allow `Result`s) - #58044 (Make overflowing and wrapping negation const) - #58303 (Improve stability tags display) - #58336 (Fix search results interactions) - #58384 (Fix tables display) - #58392 (Use less explicit shifting in std::net::ip) - #58409 (rustdoc: respect alternate flag when formatting impl trait) - #58456 (Remove no longer accurate diagnostic code about NLL) - #58528 (Don't use an allocation for ItemId in StmtKind) - #58530 (Monomorphize less code in fs::{read|write}) - #58534 (Mention capping forbid lints) - #58536 (Remove UB in pointer tests) - #58538 (Add missing fmt structs examples) - #58539 (Add alias methods to PathBuf for underlying OsString (#58234)) - #58544 (Fix doc for rustc "-g" flag) - #58545 (Add regression test for a specialization-related ICE (#39448)) - #58546 (librustc_codegen_llvm => 2018) - #58551 (Explain a panic in test case net::tcp::tests::double_bind) - #58553 (Use more impl header lifetime elision) - #58562 (Fix style nits) - #58565 (Fix typo in std::future::Future docs) - #58568 (Fix a transposition in driver.rs.) - #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`) - #58576 (Stabilize iter::successors and iter::from_fn)
2019-02-20adjust intravisit HirIdificationljedrz-16/+12
2019-02-20hir: remove parent_node from NodeCollectorljedrz-24/+17
2019-02-20hir: change HirIdValidator.hir_ids_seen to a setljedrz-10/+15
2019-02-20hir: add and use hir_to_node_id in NodeCollectorljedrz-32/+34
2019-02-20hir: HirId-ify intravisitljedrz-181/+186
2019-02-20Rollup merge of #58562 - dlrobertson:fix_nits, r=alexregkennytm-12/+19
Fix style nits Fix style nits discovered in reading code. r? @alexreg
2019-02-20Rollup merge of #58528 - Zoxc:stmtkind-item, r=oli-obkkennytm-6/+7
Don't use an allocation for ItemId in StmtKind
2019-02-20Rollup merge of #58456 - lzutao:nll, r=Centrilkennytm-4/+0
Remove no longer accurate diagnostic code about NLL r? @steveklabnik
2019-02-19Auto merge of #57896 - oli-obk:permissive_existence, r=cramertjbors-3/+19
Be more permissive with required bounds on existential types fixes #54184 r? @pnkfelix