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> error[E0277]: `MyError` doesn't implement `std::fmt::Display` --> $DIR/issue-71363.rs:6:6 | 6 | impl std::error::Error for MyError {} |      ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `MyError` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead note: required by a bound in `std::error::Error` error[E0277]: `MyError` doesn't implement `Debug` --> $DIR/issue-71363.rs:6:6 | 6 | impl std::error::Error for MyError {} |      ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted using `{:?}` | = help: the trait `Debug` is not implemented for `MyError` = note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError` note: required by a bound in `std::error::Error` help: consider annotating `MyError` with `#[derive(Debug)]` | 5 | #[derive(Debug)] | error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. </ins>