-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Don't chain method calls in #[derive(Debug)] #29565
Conversation
@bors r+ |
📌 Commit d0bc6a1 has been approved by |
⌛ Testing commit d0bc6a1 with merge 3c2d6a7... |
💔 Test failed - auto-mac-64-opt |
@bors: retry On Wed, Nov 4, 2015 at 3:37 AM, bors [email protected] wrote:
|
⌛ Testing commit d0bc6a1 with merge 9f84cae... |
💔 Test failed - auto-mac-64-nopt-t |
⚡ Previous build results for auto-linux-cross-opt, auto-linux-musl-64-opt, auto-win-msvc-32-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-debug-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-64-opt... |
💔 Test failed - auto-linux-32-opt |
@bors: retry On Wed, Nov 4, 2015 at 7:12 PM, bors [email protected] wrote:
|
Hm, I think that this unfortunately caused a regression on nightly, @sfackler do you know off hand what may have caused that? |
@alexcrichton The methods on the builders return a reference to the builder, so if you have ~ ❯ multirust run nightly rustc test.rs --pretty expanded -Z unstable-options
#![feature(no_std, prelude_import)]
#![no_std]
#![deny(unused_results)]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate std as std;
pub struct Error {
code: i32,
msg: &'static str,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::std::fmt::Debug for Error {
fn fmt(&self, __arg_0: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
match *self {
Error { code: ref __self_0_0, msg: ref __self_0_1 } => {
let mut builder = __arg_0.debug_struct("Error");
builder.field("code", &&(*__self_0_0));
builder.field("msg", &&(*__self_0_1));
builder.finish()
}
}
}
}
fn main() { }
~ ❯ multirust run nightly rustc test.rs --pretty expanded -Z unstable-options | multirust run nightly rustc -
<anon>:5:5: 5:25 warning: unused import, #[warn(unused_imports)] on by default
<anon>:5 use std::prelude::v1::*;
^~~~~~~~~~~~~~~~~~~~
<anon>:19:17: 19:56 error: unused result
<anon>:19 builder.field("code", &&(*__self_0_0));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:3:9: 3:23 note: lint level defined here
<anon>:3 #![deny(unused_results)]
^~~~~~~~~~~~~~
<anon>:20:17: 20:55 error: unused result
<anon>:20 builder.field("msg", &&(*__self_0_1));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:3:9: 3:23 note: lint level defined here
<anon>:3 #![deny(unused_results)]
^~~~~~~~~~~~~~
error: aborting due to 2 previous errors We can fix it by adding some |
Oh right, sorry I was mixing up the The use case for |
|
Closes #29540
r? @huonw