Skip to content

Fixes and cleanups - #58000

Merged
bors merged 11 commits into
rust-lang:masterfrom
oli-obk:fixes_and_cleanups
Jan 31, 2019
Merged

Fixes and cleanups#58000
bors merged 11 commits into
rust-lang:masterfrom
oli-obk:fixes_and_cleanups

Conversation

@oli-obk

Copy link
Copy Markdown
Contributor

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

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

@rust-highfiverust-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
Copy Markdown
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.

Comment threadsrc/librustc_mir/interpret/snapshot.rs Outdated
type Item = LocalValue<(), AllocIdSnapshot<'a>>;

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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

@bors r+

@bors

bors commented Jan 30, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 8c26c59 has been approved by RalfJung

@borsbors 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
@CentrilCentril mentioned this pull request Jan 30, 2019
Centril added a commit to Centril/rust that referenced this pull request Jan 31, 2019
@CentrilCentril mentioned 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:masterJan 31, 2019
@bors

bors commented Jan 31, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 8c26c59 with merge f40aaa6...

@emilyalbini

Copy link
Copy Markdown
Member

@bors retry

@kennytm

Copy link
Copy Markdown
Member

@bors r- retry

@borsbors 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
@kennytmkennytm 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
@varkorvarkor 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@oli-obk@rust-highfive@RalfJung@bors@emilyalbini@kennytm@nikomatsakis