Skip to content

"multiple applicable items" since raw pointers to unsized implement Debug #37354

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

Closed
TimNN opened this issue Oct 22, 2016 · 4 comments
Closed
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@TimNN
Copy link
Contributor

TimNN commented Oct 22, 2016

Breaking change from #36880

use std::fmt::{Formatter, Debug, Pointer};

fn foo(f: &mut Formatter) {
    let a: *const [i32] = &[0] as *const _;
    let _ = a.fmt(f);
}

fn main() {}

Affects mbox v0.1.3.

@TimNN TimNN added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 22, 2016
@TimNN TimNN changed the title multiple applicable items since raw pointers to unsized implement Debug "multiple applicable items" since raw pointers to unsized implement Debug Oct 22, 2016
@nagisa
Copy link
Member

nagisa commented Oct 22, 2016

One of those things we consider not-actually-breaking changes as being more explicit in user code would have prevented the breakage.

Still need to re-evaluate if such a breakage is acceptable for what it brings to the table. Certainly not T-compiler, most likely T-libs.

@TimNN TimNN added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 22, 2016
@TimNN
Copy link
Contributor Author

TimNN commented Oct 22, 2016

Certainly not T-compiler, most likely T-libs.

Yes, of course, not sure what I was thinking there...

@eddyb
Copy link
Member

eddyb commented Oct 23, 2016

We shouldn't have ever done that bloody "all formatting traits have a fmt method" thing, but my solutions weren't exactly that great either (e.g. unsafe conversion between &T and &fmt::Debug<T>).

Either way there's a reason they're not in the prelude: you should never import those traits.
Just use std::fmt; and use paths from that.

@alexcrichton
Copy link
Member

The libs team discussed this during triage and the conclusion was that this falls under the "acceptable breakage" umbrella and we'll send a patch upstream for this, so closing.

alexcrichton added a commit to alexcrichton/mbox that referenced this issue Oct 25, 2016
This regression was detected in rust-lang/rust#37354 and the libs team just
wanted to make sure everything kept compiling!
@TimNN TimNN closed this as completed Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants