summary refs log tree commit diff
path: root/src/librustc_borrowck
AgeCommit message (Collapse)AuthorLines
2018-06-01change `PointerKind::Implicit` to a noteNiko Matsakis-6/+2
`PointerKind` is included in `LoanPath` and hence forms part of the equality check; this led to having two unequal paths that both represent `*x`, depending on whether the `*` was inserted automatically or explicitly. Bad mojo. The `note` field, in contrast, is intended more-or-less primarily for this purpose of adding extra data.
2018-03-28Stabilize match_default_bindingsTaylor Cramer-1/+1
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-20Rollup merge of #49092 - mark-i-m:deptrack_readme, r=nikomatsakiskennytm-0/+5
Replace many of the last references to readmes In particular, this removes the dep track readme, so it should not be merged before https://github.com/rust-lang-nursery/rustc-guide/pull/92 Fix #47935 cc #48478 r? @nikomatsakis
2018-03-16Replace many of the last references to readmesMark Mansi-0/+5
2018-03-16change &self to self and fix lifetime annotationscsmoe-14/+14
2018-03-13add `canonicalize` method to `InferCtxt` [VIC]Niko Matsakis-0/+2
2018-03-05Turn features() into a query.Michael Woerister-1/+1
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-4/+7
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2018-02-06Rollup merge of #47543 - topecongiro:issue-42344, r=nikomatsakiskennytm-11/+1
Disallow mutable borrow to non-mut statics Closes #42344.
2018-02-04Remove delay_span_bug() in check_aliasabilitySeiichi Uchida-11/+1
This path was considered to be unreachable. However, `&mut` could potentially live inside `static`. For example, `static TAB: [&mut [u8]; 0] = [];`.
2018-02-02Auto merge of #47465 - estebank:include-space-after-mut, r=nikomatsakisbors-1/+1
Include space in suggestion `mut` in bindings Fix #46614.
2018-01-29rustc_borrowck: replace "lvalue" terminology with "place" in docs.Eduard-Mihai Burtescu-80/+80
2018-01-29rustc: replace "lvalue" terminology with "place" in the code.Eduard-Mihai Burtescu-3/+3
2018-01-27end_point handling multibyte characters correctly.David Wood-3/+4
2018-01-26Consider all whitespace when preparing spanEsteban Küber-1/+1
2018-01-26Include space in suggestion `mut` in bindingsEsteban Küber-1/+1
2018-01-23Use delay_span_bug for things that should be errorsJohn Kåre Alsaker-3/+11
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-68/+100
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-15Do not suggest to make `mut` binding external to `Fn` closureEsteban Küber-3/+25
2018-01-14Auto merge of #47261 - estebank:immutable-arg, r=petrochenkovbors-1/+2
Assignment to immutable argument: diagnostic tweak Re #46659.
2018-01-10Modify message to match labelEsteban Küber-0/+1
2018-01-09Rollup merge of #47258 - rkruppe:struct-assert, r=eddybkennytm-3/+3
rustc::ty: Rename struct_variant to non_enum_variant r? @eddyb
2018-01-07Assignment to immutable argument: diagnostic tweakEsteban Küber-1/+1
2018-01-08rustc::ty: Rename `struct_variant` to `non_enum_variant`Robin Kruppe-3/+3
It is also intended for use with unions.
2018-01-07Try to fix a perf regression by updating logMalo Jaffré-1/+1
Upgrade `log` to `0.4` in multiple crates.
2018-01-04Auto merge of #47124 - estebank:loan-paths, r=nikomatsakisbors-7/+21
Reword reason for move note On move errors, when encountering an enum variant, be more ambiguous and do not refer to the type on the cause note, to avoid referring to `(maybe as std::prelude::v1::Some).0`, and instead refer to `the value`. Sidesteps part of the problem with #41962: ``` error[E0382]: use of partially moved value: `maybe` --> file.rs:5:30 | 5 | if let Some(thing) = maybe { | ----- ^^^^^ value used here after move | | | value moved here = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` --> file.rs:5:21 | 5 | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait error: aborting due to 2 previous errors ``` Previous discussion: #44360 r? @arielb1
2018-01-03Add mir test, review commentsEsteban Küber-3/+3
2018-01-02Be ambiguous when type cannot be properly mentionedEsteban Küber-16/+24
2018-01-01Address review comments: make label shorterEsteban Küber-8/+14
2018-01-01Move reason for move to labelEsteban Küber-11/+11
2018-01-01Delay panic for aliasing violation for static items.matthewjasper-8/+13
2017-12-31Reword trying to operate in immutable fieldsEsteban Küber-23/+41
The previous message ("cannot assign/mutably borrow immutable field") when trying to modify a field of an immutable binding gave the (incorrect) impression that fields can be mutable independently of their ADT's binding. Slightly reword the message to read "cannot assign/mutably borrow field of immutable binding".
2017-12-20feature nll implies borrowck=mirSantiago Pastorino-1/+1
2017-12-20Auto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1bors-0/+1
nll part 5 Next round of changes from the nll-master branch. Extensions: - we now propagate ty-region-outlives constraints out of closures and into their creator when necessary - we fix a few ICEs that can occur by doing liveness analysis (and the resulting normalization) during type-checking - we handle the implicit region bound that assumes that each type `T` outlives the fn body - we handle normalization of inputs/outputs in fn signatures Not included in this PR (will come next): - handling `impl Trait` - tracking causal information - extended errors r? @arielb1
2017-12-15add a new RegionKind variant: ReClosureBoundNiko Matsakis-0/+1
This is needed to allow the `ClosureRegionRequirements` to capture types that include regions.
2017-12-14Point at var in short lived borrowsEsteban Küber-11/+7
2017-12-04rustc_back: remove slice module in favor of std::slice::from_ref.Irina-Gabriela Popa-5/+4
2017-11-26Replace -Zborrowck-mir with -Zborrowck=modeest31-0/+11
where mode is one of {ast,mir,compare}. This commit only implements the functionality. The tests will be updated in a follow up commit.
2017-11-18convert the `closure_kinds` map to just store the origin informationNiko Matsakis-4/+3
The closure kinds themselves are now completely found in the `ClosureSubsts`.
2017-11-16Introduce LocalDefId which provides a type-level guarantee that the DefId is ↵Michael Woerister-5/+5
from the local crate.
2017-11-02Make the difference between lint codes and error codes explicitOliver Schneider-4/+9
2017-10-31make end-point optional in the borrow checkNiko Matsakis-1/+2
2017-10-30Refactor if block to use idiomatic matchesJosh Leeb-du Toit-14/+10
2017-10-30Refactor matches to use Result::errJosh Leeb-du Toit-11/+4
2017-10-29Fix duplicate display of error E0502Josh Leeb-du Toit-9/+30
2017-10-25Reword to avoid using either re-assignment or reassignment in errorsCarol (Nichols || Goulding)-1/+1
2017-10-18Auto merge of #44501 - nikomatsakis:issue-44137-non-query-data-in-tcx, r=eddybbors-2/+14
remove or encapsulate the remaining non-query data in tcx I wound up removing the existing cache around inhabitedness since it didn't seem to be adding much value. I reworked const rvalue promotion, but not that much (i.e., I did not split the computation into bits, as @eddyb had tossed out as a suggestion). But it's now demand driven, at least. cc @michaelwoerister -- see the `forbid_reads` change in last commit r? @eddyb -- since the trickiest of this PR is the work on const rvalue promotion cc #44137
2017-10-17Rollup merge of #45097 - nivkner:fixme_fixup2, r=estebankkennytm-7/+7
address more FIXME whose associated issues were marked as closed part of #44366
2017-10-16convert constant promotion into a queryNiko Matsakis-2/+14