Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Place::Local(x) is now Place::Base(PlaceBase::Local(x)) #3823

Merged
merged 1 commit into from
Mar 1, 2019

Conversation

spastorino
Copy link
Member

We need to merge this after the beta cut for this rust-lang/rust#58631 to work.
/cc @oli-obk

@flip1995 flip1995 added the S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work label Feb 26, 2019
@spastorino
Copy link
Member Author

@oli-obk this is mergeable now, just force pushed again because there was a conflict.

@mati865
Copy link
Contributor

mati865 commented Mar 1, 2019

@spastorino it doesn't build:

error: unexpected end of macro invocation
 --> <::if_chain::__if_chain macros>:6:46
  |
6 | __if_chain ! { @ init ( $ ( $ tt ) * $ head ) $ ( $ tail ) * } } ; (
  |                                              ^ missing tokens in macro arguments
warning: unused imports: `is_copy`, `walk_ptrs_ty_depth`
 --> clippy_lints/src/redundant_clone.rs:2:25
  |
2 |     has_drop, in_macro, is_copy, match_def_path, match_type, paths, snippet_opt, span_lint_node,
  |                         ^^^^^^^
3 |     span_lint_node_and_then, walk_ptrs_ty_depth,
  |                              ^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default
warning: unused import: `TerminatorKind`
  --> clippy_lints/src/redundant_clone.rs:13:5
   |
13 |     TerminatorKind,
   |     ^^^^^^^^^^^^^^
error: aborting due to previous error
error: Could not compile `clippy_lints`.

https://travis-ci.com/rust-lang/rust-clippy/jobs/181611795

@@ -229,7 +229,7 @@ fn is_call_with_ref_arg<'tcx>(
if_chain! {
if let TerminatorKind::Call { func, args, destination, .. } = kind;
if args.len() == 1;
if let mir::Operand::Move(mir::Place::Local(local)) = &args[0];
if let mir::Operand::Move(mir::Place::Base(PlaceBase(Local(local))) = &args[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if let mir::Operand::Move(mir::Place::Base(PlaceBase(Local(local))) = &args[0];
if let mir::Operand::Move(mir::Place::Base(PlaceBase(Local(local)))) = &args[0];

It should fix the error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mati865 doh but that's not the issue. PlaceBase::Local is the thing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit I haven't checked it deeply, thanks for the explanation.

@flip1995
Copy link
Member

flip1995 commented Mar 1, 2019

@bors r+ p=10

@bors
Copy link
Collaborator

bors commented Mar 1, 2019

📌 Commit 77a67c9 has been approved by flip1995

bors added a commit that referenced this pull request Mar 1, 2019
Place::Local(x) is now Place::Base(PlaceBase::Local(x))

We need to merge this after the beta cut for this rust-lang/rust#58631 to work.
/cc @oli-obk
@bors
Copy link
Collaborator

bors commented Mar 1, 2019

⌛ Testing commit 77a67c9 with merge 8dfabdf...

@bors
Copy link
Collaborator

bors commented Mar 1, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 8dfabdf to master...

@bors bors merged commit 77a67c9 into rust-lang:master Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants