Skip to content

Rustup to rust-lang/rust#64874#4628

Merged
bors merged 6 commits intorust-lang:masterfrom
flip1995:rustup
Oct 8, 2019
Merged

Rustup to rust-lang/rust#64874#4628
bors merged 6 commits intorust-lang:masterfrom
flip1995:rustup

Conversation

@flip1995
Copy link
Copy Markdown
Member

@flip1995 flip1995 commented Oct 4, 2019

TODO:

  • replace rvalue_promotable_map in [1]
  • fix [2] according to this comment Simplify ExprUseVisitor rust#64874 (comment) this should be merged with consume, but I didn't figure out how to merge them, yet.
  • fix [3]; What to do with LoanCause?

[2]+[3] probably have to be resolved by a rewrite of the lint. #4628 (comment)

[1]

let promotable = self
.cx
.tcx
.rvalue_promotable_map(owner_def)
.contains(&expr.hir_id.local_id);
if !promotable {
self.found |= true;
}

[2]

fn consume_pat(&mut self, consume_pat: &Pat, cmt: &cmt_<'tcx>, _: ConsumeMode) {

[3]

fn borrow(
&mut self,
_: HirId,
_: Span,
cmt: &cmt_<'tcx>,
_: ty::Region<'_>,
_: ty::BorrowKind,
loan_cause: LoanCause,
) {
if let Categorization::Local(lid) = cmt.cat {
match loan_cause {

I could need some help with [1]. The purpose of this is to "don't lint for constant values". cc @matthewjasper

For now I see what I can do with [2].

changelog: Temporary break boxed_local lint.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants