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

Bump rustc version to fix miri #1138

Merged

Conversation

wesleywiser
Copy link
Member

@wesleywiser wesleywiser commented Jan 2, 2020

@oli-obk
Copy link
Contributor

oli-obk commented Jan 2, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jan 2, 2020

📌 Commit 959033c has been approved by oli-obk

@bors
Copy link
Contributor

bors commented Jan 2, 2020

⌛ Testing commit 959033c with merge 4da2b21...

bors added a commit that referenced this pull request Jan 2, 2020
@bors
Copy link
Contributor

bors commented Jan 2, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing 4da2b21 to master...

@bors bors merged commit 959033c into rust-lang:master Jan 2, 2020
@@ -1,3 +1,5 @@
#![allow(const_err)] // don't warn about truncating casts
Copy link
Member

Choose a reason for hiding this comment

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

Wait, so hard errors inside constants and const-prop-originating warnings outside constants use the same lint name? Isn't that odd?

Copy link
Member

Choose a reason for hiding this comment

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

Ah no, turns out rust-lang/rust#67676 made these overflows err-by-default, actually. Interesting.

Copy link
Member

Choose a reason for hiding this comment

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

But to me the lint looks wrong here:

enum Signed {
    Bar = -42,
    Baz,
    Quux = 100,
}
fn signed() -> [i8; 3] {
    let baz = Signed::Baz; // let-expansion changes the MIR significantly
    [Signed::Bar as i8, baz as i8, Signed::Quux as i8]
}

Signed::Bar is -42 which is well inside the range of i8. So why is there an error shown?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

miri no longer builds after rust-lang/rust#67676
4 participants