-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rustup to rustc 1.41.0-nightly (35ef33a8 2019-11-21) #4825
Conversation
Working on getting the compiletest stuff fixed, does someone want to look at the write/print test failures? |
This comment has been minimized.
This comment has been minimized.
I did pretty much the same as this PR, but was stuck at the Do we really want to depend on |
Using the |
If we can land this with the They may have to do with the difference between |
Both the What test failures? All the print/write ui-tests are green. What am I missing? |
except we just ignore the failing ui-test for now, of course. |
Hmm, I was getting test failures locally with this branch |
Should we r+ this with
Weird... I didn't and travis is also green 🤔 |
Sure, go for it.
…On Mon, Nov 18, 2019, 3:03 PM Philipp Krones ***@***.***> wrote:
Should we r+ this with module_name_repetitions test ignored and fix it
later, once tester is renamed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4825?email_source=notifications&email_token=AAMK6SAQHGOGTKIMQ3OGMM3QUMNL3A5CNFSM4JOVRPKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEMHKPI#issuecomment-555251005>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMK6SC7ZWADXF2COVAYQH3QUMNL3ANCNFSM4JOVRPKA>
.
|
I'm only on mobile right now. I'll get back to this tomorrow (if no one else did it before that) |
@bors r=flip1995 turns out there were no write failures 🤷♂️ |
📌 Commit aa5a95f has been approved by |
Rustup to rustc 1.41.0-nightly (a0d40f8 2019-11-18) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 changelog: none
💔 Test failed - status-appveyor |
New failures have come in, fixed one of them but |
@@ -32,11 +32,8 @@ fn random_caller() -> u32 { | |||
|
|||
static Y: u32 = 0; | |||
|
|||
// We should not suggest to make this function `const` because const functions are not allowed to | |||
// refer to a static variable | |||
fn get_y() -> u32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be linted still. Adding const
to this function gives the error described in the comment. But for some reason rustc_mir::transform::qualify_min_const_fn::is_min_const_fn
returns Ok(())
for this function:
rust-clippy/clippy_lints/src/missing_const_for_fn.rs
Lines 108 to 110 in b4f1769
let mir = cx.tcx.optimized_mir(def_id); | |
if let Err((span, err)) = is_min_const_fn(cx.tcx, def_id, &mir) { |
cc @oli-obk Does optimized_mir
replace the static with a const value and is_min_const_fn
then thinks this could be a const fn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did something change in the handling of Statement
s in MIR recently? The error in redundant_clone
is similar. This code
rust-clippy/clippy_lints/src/redundant_clone.rs
Lines 374 to 383 in b4f1769
fn visit_local(&mut self, local: &mir::Local, ctx: PlaceContext, _: mir::Location) { | |
match ctx { | |
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(_) => return, | |
_ => {}, | |
} | |
if *local == self.local { | |
self.used_other_than_drop = true; | |
} | |
} |
stopped detecting, that in (a.clone(), a)
both a
s are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean with
The error [...] is similar
is, that in both cases the code that should check for them is never actually reached by the traversal of the Statement
(or the Terminator
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... we run is_min_const_fn on the optimized mir while rustc runs it on mir_const
. This will keep causing problems. One thing clippy could do is to make the optimized_mir
query not do any optimizations. This is possible since rust-lang/rust#66297
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So how do I override the optimized_mir
query? When I just copy and paste its source code [1] from rustc and remove the run_optimization_passes
call¹, a lot of tests began to ICE. I added this:
config.override_queries = Some(|_, providers, _| {
providers.optimized_mir = |tcx, def_id| {
// (Mir-)Borrowck uses `mir_validated`, so we have to force it to
// execute before we can steal.
tcx.ensure().mir_borrowck(def_id);
let (body, _) = tcx.mir_validated(def_id);
let body = body.steal();
tcx.arena.alloc(body)
}
});
to
Lines 63 to 64 in b4f1769
impl rustc_driver::Callbacks for ClippyCallbacks { | |
fn config(&mut self, config: &mut interface::Config) { |
¹ I also removed this:
if tcx.is_constructor(def_id) {
// There's no reason to run all of the MIR passes on constructors when
// we can just output the MIR we want directly. This also saves const
// qualification and borrow checking the trouble of special casing
// constructors.
return shim::build_adt_ctor(tcx, def_id);
}
because the shim
module is private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. So we'd need to make more things public. But that's probably not the failure reason. One thing you can try is set the mir opt level to 0 instead of trying to replace the query. If that doesn't work, reintroduce the mir optimizations but remove all the ones that break clippy (e.g. const_prop)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing you can try is set the mir opt level to 0
How do I set the opt level? And how can I enable/disable mir passes?
Rustup to rustc 1.41.0-nightly (35ef33a 2019-11-21) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 List of rustups: - rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0) - rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`) - rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types) - rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default) changelog: none
💔 Test failed - checks-travis |
@bors retry |
Rustup to rustc 1.41.0-nightly (35ef33a 2019-11-21) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 List of rustups: - rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0) - rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`) - rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types) - rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default) changelog: none
💔 Test failed - status-appveyor |
uh that is bad: https://travis-ci.com/rust-lang/rust-clippy/jobs/259722402#L5480-L5487 Since when do we lint the output of build scripts? 😮 |
This is even worse: https://travis-ci.com/rust-lang/rust-clippy/jobs/259722402#L7287 The match a {
1 => (),
2 => (),
3 => (),
_ => (),
} would trigger 6 times: |
It seems since ever. We probably shouldn't dump the Clippy output to the travis terminal though. |
[WIP] RIIR: Integration tests In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it. This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577) Based on #4825, so I could test it. changelog: none
ICEs because of rustc, not Clippy
@bors r+ |
📌 Commit 553db87 has been approved by |
Rustup to rustc 1.41.0-nightly (35ef33a 2019-11-21) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 List of rustups: - rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0) - rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`) - rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types) - rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default) changelog: none
☀️ Test successful - checks-travis, status-appveyor |
[WIP] RIIR: Integration tests In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it. This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577) changelog: none
[WIP] RIIR: Integration tests In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it. This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577) changelog: none
RIIR: Integration tests In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it. This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577) changelog: none
RIIR: Integration tests In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it. This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577) changelog: none
RIIR: Integration tests In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it. This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577) changelog: none
Fix redundant_clone lint not working with PathBuf and OsString #4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s. Fixes #5014. --- changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
Fix redundant_clone lint not working with PathBuf and OsString #4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s. Fixes #5014. --- changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3
List of rustups:
asm!
more precisely rust#66271 (syntax: Keep string literals in ABIs andasm!
more precisely)!
in Rust 1.41.0 rust#65355 (Stabilize!
in Rust 1.41.0)hir::Expr
by boxing more ofhir::InlineAsm
rust#66515 (Reduce size ofhir::Expr
by boxing more ofhir::InlineAsm
)ConstProp
pass by default rust#66074 ([mir-opt] Turn on theConstProp
pass by default)changelog: none