mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Resolve included files to their calling modules in IDE layer
This commit is contained in:
parent
80483e0622
commit
2362975137
6 changed files with 93 additions and 56 deletions
|
@ -251,6 +251,12 @@ pub(crate) fn check_diagnostics_with_config(config: DiagnosticsConfig, ra_fixtur
|
|||
let mut actual = annotations.remove(&file_id).unwrap_or_default();
|
||||
let expected = extract_annotations(&db.file_text(file_id));
|
||||
actual.sort_by_key(|(range, _)| range.start());
|
||||
// FIXME: We should panic on duplicates instead, but includes currently cause us to report
|
||||
// diagnostics twice for the calling module when both files are queried.
|
||||
actual.dedup();
|
||||
// actual.iter().duplicates().for_each(|(range, msg)| {
|
||||
// panic!("duplicate diagnostic at {:?}: {msg:?}", line_index.line_col(range.start()))
|
||||
// });
|
||||
if expected.is_empty() {
|
||||
// makes minicore smoke test debuggable
|
||||
for (e, _) in &actual {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue