Code change:
Notice the extra one column of indentation in front of the pipes. I presume this is unintentional because almost any other error is still printed without such extra indentation; for example: The relevant commit range is Mentioning because looks like it touches error messages vaguely along the same lines. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Could you show the output of ? The only thing I can think of is that there's a span that isn't being displayed.
<details<summary<codecargo +nightly-2020-04-20 check --message-format=json | jq</code</summarycompilefail,E0277n// here we declare the Foo trait with a bar methodntrait Foo {n fn bar(&self);n}nn// we now declare a function which takes an object implementing the Foo traitnfn somefunc<T: Foo(foo: T) {n ();n}nnfn main() {n // we now call the method with the i32 type, which doesn't implementn // the Foo traitn somefunc(5i32); // error: the trait bound is not satisfiedn}nntrait Foo {n fn bar(&self);n}nnfn somefunc<T: Foo(foo: T) {n (); // we can now use this method since i32 implements then // Foo traitn}nn// we implement the trait on the i32 typenimpl Foo for i32 {n fn bar(&self) {}n}nnfn main() {n somefunc(5i32); // ok!n}ncompilefail,E0277nfn somefunc<T(foo: T) {n println!("{:?}", foo); // error: the trait is notn // implemented for the type n}nnfn main() {n // We now call the method with the i32 type,n // which does implement the Debug trait.n somefunc(5i32);n}nnuse std::fmt;nn// Restrict the input type to types that implement Debug.nfn somefunc<T: fmt::Debug(foo: T) {n println!("{:?}", foo);n}nnfn main() {n // Calling the method is still fine, as i32 implements Debug.n somefunc(5i32);nn // This would fail to compile now:n // struct WithoutDebug;n // somefunc(WithoutDebug);n}ncompilefail,E0277n// here we declare the Foo trait with a bar methodntrait Foo {n fn bar(&self);n}nn// we now declare a function which takes an object implementing the Foo traitnfn somefunc<T: Foo(foo: T) {n ();n}nnfn main() {n // we now call the method with the i32 type, which doesn't implementn // the Foo traitn somefunc(5i32); // error: the trait bound is not satisfiedn}nntrait Foo {n fn bar(&self);n}nnfn somefunc<T: Foo(foo: T) {n (); // we can now use this method since i32 implements then // Foo traitn}nn// we implement the trait on the i32 typenimpl Foo for i32 {n fn bar(&self) {}n}nnfn main() {n somefunc(5i32); // ok!n}ncompilefail,E0277nfn somefunc<T(foo: T) {n println!("{:?}", foo); // error: the trait is notn // implemented for the type n}nnfn main() {n // We now call the method with the i32 type,n // which does implement the Debug trait.n somefunc(5i32);n}nnuse std::fmt;nn// Restrict the input type to types that implement Debug.nfn somefunc<T: fmt::Debug(foo: T) {n println!("{:?}", foo);n}nnfn main() {n // Calling the method is still fine, as i32 implements Debug.n somefunc(5i32);nn // This would fail to compile now:n // struct WithoutDebug;n // somefunc(WithoutDebug);n}n </details
I'm pretty sure it's happening because of this It is weird because that file should be accessible to in all environments now. I think we can get away with some well placed in a few places.
It maybe be nice if someone can find where this regressed ... ping cleanup
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good "Cleanup ICE-breaking candidate". In case it's useful, here are some [instructions] for tackling these sorts of bugs. Maybe take a look? Thanks! <3 [instructions]: https://rustc-dev- cc
Assigning as .
cargo bisect-rustc indicates that the regression is @ / PR cc
claim

Related discussion:
text: <ins> // compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z ui-testing=no // only-x86_64-unknown-linux-gnu //---^ Limiting target as the above unstable flags don't play well on some environment. struct MyError; impl std::error::Error for MyError {} //~^ ERROR: `MyError` doesn't implement `std::fmt::Display` //~| ERROR: `MyError` doesn't implement `Debug` fn main() {} </ins>