]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/issue-71363.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / span / issue-71363.rs
1 // compile-flags: -Z ui-testing=no
2
3 struct MyError;
4 impl std::error::Error for MyError {}
5 //~^ ERROR: `MyError` doesn't implement `std::fmt::Display`
6 //~| ERROR: `MyError` doesn't implement `Debug`
7
8 fn main() {}
9
10 // This test relies on library/std/src/error.rs *not* being included in the error message, so that
11 // we can test whether a file not included in the error message affects it (more specifically
12 // whether the line number of the excluded file affects the indentation of the other line numbers).
13 //
14 // To test this we're simulating a remap of the rust src base (so that library/std/src/error.rs
15 // does not point to a local file) *and* we're disabling the code to try mapping a remapped path to
16 // a local file (which would defeat the purpose of the former flag).
17 //
18 // Note that this comment is at the bottom of the file intentionally, as we need the line number of
19 // the impl to be lower than 10.