Skip to content

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 30, 2019

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 30, 2019
// 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> {
Copy link
Member

Choose a reason for hiding this comment

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

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)
Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 30, 2019

📌 Commit 8c26c59 has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2019
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
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
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
Copy link
Collaborator

bors commented Jan 31, 2019

⌛ Testing commit 8c26c59 with merge f40aaa6...

@pietroalbini
Copy link
Member

@bors retry

@kennytm
Copy link
Member

kennytm commented Feb 7, 2019

@bors r- retry

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 7, 2019
@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 7, 2019
@varkor varkor mentioned this pull request Jun 13, 2019
@oli-obk oli-obk deleted the fixes_and_cleanups branch June 15, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

7 participants