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

Rollup of 11 pull requests #30826

Merged
merged 26 commits into from
Jan 12, 2016
Merged

Rollup of 11 pull requests #30826

merged 26 commits into from
Jan 12, 2016

Conversation

mmcco and others added 26 commits January 3, 2016 20:53
These should probably be submitted upstream. They're inevitably going to
complicate merges, and because they're non-functional changes this just
isn't worth our time.
…s validity.

See RFC amendment 1384 and tracking issue 30450:
  rust-lang/rfcs#1384
  rust-lang#30450

Moved old check_matcher code into check_matcher_old

combined the two checks to enable a warning cycle (where we will
continue to error if the two checks agree to reject, accept if the new
check says accept, and warn if the old check accepts but the new check
rejects).
run-pass test for some new functionality.
macro future proofing rules.

(We may want to think about what this test was actually testing and
figure out a way to test it without running afoul of macro future
proofing.  I spent some time trying to do this, e.g. by inserting
parenthesis in the macro input pattern, but I could not quickly get it
working, so I took this tack instead.)
Previously it was returning a value, mostly for the two reasons:

* Cloning Lvalue is very cheap most of the time (i.e. when Lvalue is not a Projection);
* There’s users who want &mut lvalue and there’s users who want &lvalue. Returning a value allows
  to make either one easier when pattern matching (i.e. Some(ref dest) or Some(ref mut dest)).

However, I’m now convinced this is an invalid approach. Namely the users which want a mutable
reference may modify the Lvalue in-place, but the changes won’t be reflected in the final MIR,
since the Lvalue modified is merely a clone.

Instead, we have two accessors `destination` and `destination_mut` which return a reference to the
destination in desired mode.
These are the same descriptions as on the website.
These should probably be submitted upstream. They're inevitably going to
complicate merges, and because they're non-functional changes this just
isn't worth our time.
…low, r=nrc

Proper first and follow sets for macro_rules future proofing

implements first stage of RFC amendment 1384; see rust-lang#30450
…elwoerister

Previously it was returning a clone, mostly for the two reasons:

* Cloning Lvalue is very cheap most of the time (i.e. when Lvalue is not a Projection);
* There’s users who want &mut lvalue and there’s users who want &lvalue. Returning a value allows
  to make either one easier when pattern matching (i.e. Some(ref dest) or Some(ref mut dest)).

However, I’m now convinced this is an invalid approach. Namely the users which want a mutable
reference may modify the Lvalue in-place, but the changes won’t be reflected in the final MIR,
since the Lvalue modified is merely a clone.

Instead, we have two accessors `destination` and `destination_mut` which return a reference to the
destination in desired mode.

r? @nikomatsakis
…elb1

Fixes rust-lang#30772

We used to have a untested special case which didn’t really work anyway, because of lacking casts. This PR removes the case in question.
@nagisa
Copy link
Member Author

nagisa commented Jan 11, 2016

@bors r+ p=1

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Contributor

bors commented Jan 11, 2016

📌 Commit 8dd7eab has been approved by nagisa

@bors
Copy link
Contributor

bors commented Jan 11, 2016

⌛ Testing commit 8dd7eab with merge 4405944...

bors added a commit that referenced this pull request Jan 11, 2016
@bors
Copy link
Contributor

bors commented Jan 11, 2016

💔 Test failed - auto-linux-32-opt

@nagisa
Copy link
Member Author

nagisa commented Jan 11, 2016

@bors retry

@bors bors merged commit 8dd7eab into rust-lang:master Jan 12, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.