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: return 0; }; <ins> let will_be_emitted = |span: Span| { !span.is_dummy() && { let file = sm.lookup_source_file(span.hi()); sm.ensure_source_file_source_present(file) } }; </ins> let mut max = 0; for primary_span in msp.primary_spans() { <del> if !primary_span.is_dummy() { </del> <ins> if will_be_emitted(*primary_span) { </ins> let hi = sm.lookup_char_pos(primary_span.hi()); max = (hi.line).max(max); } } if !self.short_message { for span_label in msp.span_labels() { <del> if !span_label.span.is_dummy() { </del> <ins> if will_be_emitted(span_label.span) { </ins> let hi = sm.lookup_char_pos(span_label.span.hi()); max = (hi.line).max(max); }