about summary refs log tree commit diff
path: root/src/librustc_borrowck/borrowck
AgeCommit message (Collapse)AuthorLines
2019-07-11Move rustc_borrowck -> rustc_ast_borrowckMatthew Jasper-4051/+0
2019-07-11Remove rustc_mir dependency from rustc_borrowckMatthew Jasper-1739/+117
2019-07-11Rename some things in `syntax_pos/hygiene`Vadim Petrochenkov-3/+3
More consistent with other naming: ExpnFormat -> ExpnKind ExpnKind::name -> ExpnKind::descr DesugaringKind::name -> DesugaringKind::descr Shorter, no tautology: CompilerDesugaring -> Desugaring CompilerDesugaringKind -> DesugaringKind
2019-07-04rename hir::map::local_def_id_from_hir_id to local_def_idljedrz-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-3/+3
2019-06-24HIR: rename find_by_hir_id to findljedrz-1/+1
2019-06-24HIR: rename get_parent_node_by_hir_id to get_parent_nodeljedrz-3/+3
2019-06-20rename hir::map::get_by_hir_id to getljedrz-8/+8
2019-06-20rename hir::map::expect_expr_by_hir_id to expect_exprljedrz-1/+1
2019-06-20rename hir::map::name_by_hir_id to ::nameljedrz-2/+2
2019-06-18Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-10/+14
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-8/+8
2019-06-17remove superfluous spaceljedrz-1/+1
2019-06-17renamve hir_to_string to node_to_stringljedrz-3/+3
2019-06-17remove _by_hir_id if there is no NodeId counterpartljedrz-9/+9
2019-06-17replace some uses of NodeId with HirIdljedrz-11/+8
2019-06-15Remove unnecessary `.clone()`Shotaro Yamada-1/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-13/+13
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-53/+68
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-13/+13
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-4/+4
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-41/+41
2019-06-11rustc_borrowck: deny(unused_lifetimes).Eduard-Mihai Burtescu-1/+1
2019-06-01rustc: track the body owner DefId in MC and EUV.Eduard-Mihai Burtescu-0/+2
2019-05-23Update borrowckJohn Kåre Alsaker-4/+3
2019-05-01Auto merge of #60195 - varkor:commontypes-to-common, r=eddybbors-1/+1
Split `CommonTypes` into `CommonTypes` and `CommonLifetimes` The so-called "`CommonTypes`" contains more than just types. r? @eddyb
2019-04-25Update existing usagesvarkor-1/+1
2019-04-25Update region_scope_treeJohn Kåre Alsaker-1/+1
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-122/+0
This also fully stabilizes two-phase borrows on all editions
2019-04-19Emit specific error for struct literal in conditionsEsteban Küber-3/+1
2019-03-25Auto merge of #59195 - estebank:for-loop-move, r=petrochenkovbors-0/+14
When moving out of a for loop head, suggest borrowing it When encountering code like the following, suggest borrowing the for loop head to avoid moving it into the for loop pattern: ``` fn main() { let a = vec![1, 2, 3]; for i in &a { for j in a { println!("{} * {} = {}", i, j, i * j); } } } ``` Fix #25534.
2019-03-24When moving out of a for loop head, suggest borrowing itEsteban Küber-0/+14
When encountering code like the following, suggest borrowing the for loop head to avoid moving it into the for loop pattern: ``` fn main() { let a = vec![1, 2, 3]; for i in &a { for j in a { println!("{} * {} = {}", i, j, i * j); } } } ```
2019-03-24Remove `CtorOf` from `Node::Ctor`.David Wood-1/+1
This commit removes `CtorOf` from `Node::Ctor` as the parent of the constructor can be determined by looking at the node's parent in the few places where knowing this is necessary.
2019-03-24Separate variant id and variant constructor id.David Wood-2/+1
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
2019-03-23Auto merge of #59068 - ljedrz:kill_off_NodeId_stragglers, r=Zoxcbors-13/+8
HirIdification: kill off NodeId stragglers The final stages of HirIdification (#57578). This PR, along with https://github.com/rust-lang/rust/pull/59042, should finalize the HirIdification process (at least the more straightforward bits). - replace `NodeId` with `HirId` in `trait_impls` - remove all `NodeId`s from `borrowck` - remove all `NodeId`s from `typeck` - remove all `NodeId`s from `mir` - remove `trait_auto_impl` (unused) I would be cool to also remove `NodeId` from `hir::def::Def`, `middle::privacy::AccessLevel` and `hir::ItemId`, but I don't know if this is feasible. I'll be happy to do more if I've missed anything.
2019-03-15rustc: rename item_path to def_path (except the module in ty).Eduard-Mihai Burtescu-4/+4
2019-03-10Make migrate mode work at item level granularityMatthew Jasper-0/+18
2019-03-10HirIdification: remove all NodeIds from borrowckljedrz-13/+8
2019-03-07hir: remove NodeId from PatKindljedrz-1/+1
2019-03-07HirIdification: replace NodeId method callsljedrz-9/+8
2019-03-02hir: remove NodeId from Pat and FieldPatljedrz-45/+38
2019-02-24hir: remove NodeId from Exprljedrz-18/+16
2019-02-20HirIdification: change some NodeId to HirId callsljedrz-15/+14
2019-02-13HirId-ify hir::BodyIdljedrz-1/+1
2019-02-13Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebankMazdak Farrokhzad-1/+1
Cleanup: rename node_id_to_type(_opt) Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here. In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).
2019-02-10rustc: doc commentsAlexander Regueiro-9/+9
2019-02-09cleanup: rename node_id_to_type(_opt)ljedrz-1/+1
2019-02-08librustc_borrowck => 2018Taiki Endo-45/+53
2019-02-02hir: add HirId to main Hir nodesljedrz-1/+1
2019-01-29Use ensure for borrowckJohn Kåre Alsaker-1/+1