tamer: xir::flat: Remove closing tag name from label
This is now visible in the diagnostic output. Example at this point in time, on an xmlo file for one of our smallest systems: error: expected closing tag for `preproc:symtable` --> /home/.../foo.xmlo:16:4 | | <preproc:symtable xmlns:map="http://www.w3.org/2005/xpath-functions/map"> | ----------------- = note: element `preproc:symtable` is opened here --> /home/.../foo.xmlo:11326:4 | | </preproc:wrong> | ^^^^^^^^^^^^^^^^ = error: expected `</preproc:symtable>` DEV-12151main
parent
33baca113a
commit
a197267a2d
|
@ -438,7 +438,7 @@ impl Diagnostic for StateError {
|
|||
|
||||
UnbalancedTag {
|
||||
open: (open_name, open_span),
|
||||
close: (close_name, close_span),
|
||||
close: (_close_name, close_span),
|
||||
} => {
|
||||
// TODO: hint saying that the nesting could be wrong, etc;
|
||||
// we can't just suggest a replacement,
|
||||
|
@ -446,10 +446,9 @@ impl Diagnostic for StateError {
|
|||
vec![
|
||||
open_span
|
||||
.note(format!("element `{open_name}` is opened here")),
|
||||
close_span.error(format!(
|
||||
"expected `</{open_name}>`, \
|
||||
but found closing tag for `{close_name}`"
|
||||
)),
|
||||
// No need to state the close name since the source line
|
||||
// will be highlighted by the diagnostic message.
|
||||
close_span.error(format!("expected `</{open_name}>`")),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue