about summary refs log tree commit diff
path: root/src/librustc_borrowck
AgeCommit message (Collapse)AuthorLines
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-10/+10
2019-02-09cleanup: rename node_id_to_type(_opt)ljedrz-1/+1
2019-02-09Rollup merge of #58260 - taiki-e:librustc_borrowck-2018, r=CentrilMazdak Farrokhzad-69/+71
librustc_borrowck => 2018 Transitions `librustc_borrowck` to Rust 2018; cc #58099 r? @Centril
2019-02-08librustc_borrowck => 2018Taiki Endo-69/+71
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-02hir: add HirId to main Hir nodesljedrz-1/+1
2019-01-29Use ensure for borrowckJohn Kåre Alsaker-1/+1
2019-01-29Add an ensure() method to TyCtxt used to ensure queries are runJohn Kåre Alsaker-1/+1
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-9/+10
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+0
2019-01-15Remove an unused function argumentOliver Scherer-17/+3
2019-01-13Rollup merge of #57102 - davidtwco:issue-57100, r=nikomatsakisMazdak Farrokhzad-6/+2
NLL: Add union justifications to conflicting borrows. Fixes #57100. This PR adds justifications to error messages for conflicting borrows of union fields. Where previously an error message would say ``cannot borrow `u.b` as mutable..``, it now says ``cannot borrow `u` (via `u.b`) as mutable..``. r? @pnkfelix
2019-01-04Improve diagnostic labels and add note.David Wood-6/+2
This commit improves diagnostic labels to mention which field a borrow overlaps with and adds a note explaining that the fields overlap.
2018-12-28Update link to rustc guideLin Clark-1/+1
2018-12-25Remove licensesMark Rousskov-131/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-5/+5
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-72/+72
2018-11-30Refer to the second borrow as the "second borrow".Daan de Graaf-1/+1
2018-11-26rustc-guide has movedMark Mansi-1/+1
2018-11-14capture_disjoint_fields(rust-lang#53488)Blitzerr-8/+8
Refactoring out the HirId of the UpvarId in another struct.
2018-11-03Remove `ReCanonical` in favor of `ReLateBound`scalexm-2/+0
2018-10-27Auto merge of #55150 - ↵bors-1/+17
pnkfelix:issues-47215-54797-fix-ice-from-moving-out-of-thread-local-under-ast-borrowck, r=nikomatsakis Do not allow moving out of thread local under ast borrowck AST borrowck failed to prevent moving out of a thread-local static. This was broken. And it also (sometimes?) caused an ICE during drop elaboration. Fix #47215 Fix #54797
2018-10-26Remove redundant cloneShotaro Yamada-4/+4
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-4/+4
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-5/+5
2018-10-18Extend closure special-casing for generators.David Wood-2/+2
This commit extends existing special-casing of closures to highlight the use of variables within generators that are causing the generator to borrow them.
2018-10-17AST-borrowck: add separate mem category for thread-locals, as they are not ↵Felix S. Klock II-1/+17
quite rvalues (and of course they are not quite statics either). Namely, they *do* have a restricted region (like rvalues), but they also cannot be moved out of (like statics).
2018-10-08Auto merge of #54847 - ljedrz:kill_graphviz_intocow, r=pnkfelixbors-3/+2
Cleanup: remove graphviz::IntoCow It's just `Into<Cow<...>>` and the applicable methods already exist for `Vec`/`[T]` and `String`/`str`.
2018-10-06rustc/middle: use Cow<'static, str> where applicableljedrz-14/+15
2018-10-05Rollup merge of #54787 - varkor:unused-mut-in-desugaring, r=nikomatsakisPietro Albini-1/+5
Only warn about unused `mut` in user-written code Fixes https://github.com/rust-lang/rust/issues/54586. r? @pnkfelix cc @blitzerr
2018-10-05Remove graphviz::IntoCowljedrz-3/+2
2018-10-04rename skolemized to placeholderNiko Matsakis-2/+2
2018-10-03Only warn about unused `mut` in user-written codevarkor-1/+5
2018-10-02Improve implicit self mutability suggestions.David Wood-1/+1
This commit adds an `ImplicitSelfKind` to the HIR and the MIR that keeps track of whether a implicit self argument is immutable by-value, mutable by-value, immutable reference or mutable reference so that the addition of the `mut` keyword can be suggested for the immutable by-value case.
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-20Auto merge of #54241 - vi:suggest_with_applicability, r=estebankbors-11/+31
Remove usages of span_suggestion without Applicability Use `Applicability::Unspecified` for all of them instead. Shall deprecations for the non-`_with_applicability` functions be added? Shall clippy be addressed somehow? r? @estebank
2018-09-17Whitespace fix again.Vitaly _Vi Shukela-17/+17
2018-09-17Auto merge of #54260 - maxdeviant:public-scope-fields, r=petrochenkovbors-5/+18
Make rustc::middle::region::Scope's fields public This PR makes the following changes to `rustc::middle::region::Scope`: - [x] Makes `region::Scope`'s fields public - [x] Removes the `impl Scope` block with constructors (as per [this comment](https://github.com/rust-lang/rust/pull/54032#discussion_r216618208)) - [x] Updates call sites throughout the compiler Closes #54122.