test: fix some fancy tests after NamedSource change

This commit is contained in:
Kat Marchán 2024-02-03 20:22:36 -08:00
parent 1fa7f5241f
commit 3747fccf8d
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 12 additions and 12 deletions

View File

@ -304,7 +304,7 @@ fn multiple_spans_multiline() {
#[diagnostic(severity(Error))] #[diagnostic(severity(Error))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<&'static str>,
#[label("big")] #[label("big")]
big: SourceSpan, big: SourceSpan,
#[label("small")] #[label("small")]
@ -824,7 +824,7 @@ fn multiline_label() -> Result<(), MietteError> {
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label("this bit here\nand\nthis\ntoo")] #[label("this bit here\nand\nthis\ntoo")]
highlight: SourceSpan, highlight: SourceSpan,
} }
@ -864,7 +864,7 @@ fn multiple_multi_line_labels() -> Result<(), MietteError> {
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label = "x\ny"] #[label = "x\ny"]
highlight1: SourceSpan, highlight1: SourceSpan,
#[label = "z\nw"] #[label = "z\nw"]
@ -1040,7 +1040,7 @@ fn multiline_highlight_multiline_label() -> Result<(), MietteError> {
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label = "these two lines\nare the problem"] #[label = "these two lines\nare the problem"]
highlight: SourceSpan, highlight: SourceSpan,
} }
@ -1620,7 +1620,7 @@ fn primary_label() {
#[error("oops!")] #[error("oops!")]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<&'static str>,
#[label] #[label]
first_label: SourceSpan, first_label: SourceSpan,
#[label(primary, "nope")] #[label(primary, "nope")]
@ -1656,7 +1656,7 @@ fn single_line_with_wide_char_unaligned_span_start() -> Result<(), MietteError>
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label("this bit here")] #[label("this bit here")]
highlight: SourceSpan, highlight: SourceSpan,
} }
@ -1693,7 +1693,7 @@ fn single_line_with_wide_char_unaligned_span_end() -> Result<(), MietteError> {
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label("this bit here")] #[label("this bit here")]
highlight: SourceSpan, highlight: SourceSpan,
} }
@ -1730,7 +1730,7 @@ fn single_line_with_wide_char_unaligned_span_empty() -> Result<(), MietteError>
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label("this bit here")] #[label("this bit here")]
highlight: SourceSpan, highlight: SourceSpan,
} }
@ -1769,7 +1769,7 @@ fn syntax_highlighter() {
#[diagnostic()] #[diagnostic()]
pub struct Test { pub struct Test {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label("this is a label")] #[label("this is a label")]
src_span: SourceSpan, src_span: SourceSpan,
} }
@ -1814,7 +1814,7 @@ fn syntax_highlighter_on_real_file() {
#[diagnostic()] #[diagnostic()]
pub struct Test { pub struct Test {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label("this is a label")] #[label("this is a label")]
src_span: SourceSpan, src_span: SourceSpan,
} }
@ -1864,7 +1864,7 @@ fn triple_adjacent_highlight() -> Result<(), MietteError> {
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label = "this bit here"] #[label = "this bit here"]
highlight1: SourceSpan, highlight1: SourceSpan,
#[label = "also this bit"] #[label = "also this bit"]
@ -1913,7 +1913,7 @@ fn non_adjacent_highlight() -> Result<(), MietteError> {
#[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))]
struct MyBad { struct MyBad {
#[source_code] #[source_code]
src: NamedSource, src: NamedSource<String>,
#[label = "this bit here"] #[label = "this bit here"]
highlight1: SourceSpan, highlight1: SourceSpan,
#[label = "also this bit"] #[label = "also this bit"]