rust/src/librustc_errors
Laurent Bonnans 12545c75ff Handle multiple error fix suggestions carefuly
The existing code seems to assume that substitutions spans are disjoint,
which is not always the case.

In the example:

    pub trait AAAA {}
    pub trait B {}
    pub trait C {}
    pub type T<P: AAAA + B + C> = P;

, we get three substituions starting from ':' and ending respectively at
the end of each trait token.

With the former offset calculation, this would cause `underline_start` to
eventually become negative before being converted to `usize`...

The new version may report erroneous results for non perfectly overlapping
substitutions but I don't know if such examples exist. Alternatively, we
could detect these cases and trim out overlapping substitutions.
2020-01-05 12:51:57 +01:00
..
json Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
annotate_snippet_emitter_writer.rs Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
Cargo.toml Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
diagnostic.rs Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
diagnostic_builder.rs Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
emitter.rs Handle multiple error fix suggestions carefuly 2020-01-05 12:51:57 +01:00
json.rs Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
lib.rs Address review comments + Fix rebase 2020-01-03 18:03:28 +04:00
lock.rs Format the world 2019-12-22 17:42:47 -05:00
registry.rs Remove licenses 2018-12-25 21:08:33 -07:00
snippet.rs Format the world 2019-12-22 17:42:47 -05:00
styled_buffer.rs Format the world 2019-12-22 17:42:47 -05:00