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

Fixes and cleanups #58000

Merged
merged 11 commits into from Jan 31, 2019

Conversation

Projects
None yet
7 participants
@oli-obk
Copy link
Contributor

oli-obk commented Jan 30, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 30, 2019

r? @nikomatsakis

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

// State of a local variable
/// State of a local variable including a memoized layout
#[derive(Clone, PartialEq, Eq)]
pub struct LocalValue<'tcx, Tag=(), Id=AllocId> {

This comment has been minimized.

@RalfJung

RalfJung Jan 30, 2019

Member

Nit: I think swapping the names LocalValue and LocalState is nicer. The layout stuff looks much more state-y than value-y to me.

type Item = LocalValue<(), AllocIdSnapshot<'a>>;

fn snapshot(&self, ctx: &'a Ctx) -> Self::Item {
self.state.snapshot(ctx)

This comment has been minimized.

@RalfJung

RalfJung Jan 30, 2019

Member

We otherwise follow the pattern to use LocalState { state, layout: _ } = self to make sure we revisit this when new fields get added.

impl_snapshot_for! doesn't work?

This comment has been minimized.

@oli-obk

oli-obk Jan 30, 2019

Author Contributor

nope, it's a very simple macro with no support for lifetimes or so

This comment has been minimized.

@oli-obk

oli-obk Jan 30, 2019

Author Contributor

Done and opened rust-lang/rust-clippy#3724 to make sure we take care of this issue once and for all at some point

@RalfJung

This comment has been minimized.

Copy link
Member

RalfJung commented Jan 30, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 30, 2019

📌 Commit 8c26c59 has been approved by RalfJung

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

bors added a commit that referenced this pull request Jan 30, 2019

Auto merge of #58014 - Centril:rollup, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)
 - #57984 (Improve bug message in check_ty)
 - #57987 (Fix some AArch64 typos)
 - #57999 (Add MOVBE x86 CPU feature)
 - #58000 (Fixes and cleanups)
 - #58007 (Don't panic when accessing enum variant ctor using `Self` in match)
 - #58008 (Pass correct arguments to places_conflict)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jan 31, 2019

bors added a commit that referenced this pull request Jan 31, 2019

Auto merge of #58016 - Centril:rollup, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)
 - #57984 (Improve bug message in check_ty)
 - #57999 (Add MOVBE x86 CPU feature)
 - #58000 (Fixes and cleanups)
 - #58005 (update docs for fix_start/end_matches)
 - #58007 (Don't panic when accessing enum variant ctor using `Self` in match)
 - #58008 (Pass correct arguments to places_conflict)

Failed merges:

r? @ghost

@bors bors merged commit 8c26c59 into rust-lang:master Jan 31, 2019

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 31, 2019

⌛️ Testing commit 8c26c59 with merge f40aaa6...

@pietroalbini

This comment has been minimized.

Copy link
Member

pietroalbini commented Feb 7, 2019

@bors retry

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Feb 7, 2019

@bors r- retry

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