summary refs log tree commit diff
path: root/src/librustc_borrowck
AgeCommit message (Collapse)AuthorLines
2019-03-16Make migrate mode work at item level granularityMatthew Jasper-0/+18
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.
2018-09-17Fill in suggestions Applicability according to @estebankVitaly _Vi Shukela-2/+7
Also fix some formatting along the way.
2018-09-17Fix tidy's too long lines.Vitaly _Vi Shukela-10/+10
2018-09-17Fix style according to review comments.Vitaly _Vi Shukela-9/+18
2018-09-16Fixup inaccurate rebaseVitaly _Vi Shukela-1/+1
2018-09-16Remove usages of span_suggestion without ApplicabilityVitaly _Vi Shukela-8/+14
Use Applicability::Unspecified for all of them instead.
2018-09-15Make rustc::middle::region::Scope's fields publicMarshall Bowers-5/+18
2018-09-12use structured suggestion for "missing mut" labelAndy Russell-3/+5
Fixes #54133.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis