diff --git a/Cargo.lock b/Cargo.lock index dd7aa3d683243..f268ffd701c90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "annotate-snippets" -version = "0.12.10" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15580ece6ea97cbf832d60ba19c021113469480852c6a2a6beb0db28f097bf1f" +checksum = "92570a3f9c98e7e84df84b71d0965ac99b1871fcd75a3773a3bd1bad13f64cf7" dependencies = [ "anstyle", "memchr", @@ -2418,9 +2418,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" @@ -3905,7 +3905,7 @@ dependencies = [ name = "rustc_errors" version = "0.0.0" dependencies = [ - "annotate-snippets 0.12.10", + "annotate-snippets 0.12.15", "anstream", "anstyle", "derive_setters", diff --git a/compiler/rustc_errors/Cargo.toml b/compiler/rustc_errors/Cargo.toml index a81fc496c8288..2560ac50bba42 100644 --- a/compiler/rustc_errors/Cargo.toml +++ b/compiler/rustc_errors/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" [dependencies] # tidy-alphabetical-start -annotate-snippets = { version = "0.12.10", features = ["simd"] } +annotate-snippets = { version = "0.12.15", features = ["simd"] } anstream = "0.6.20" anstyle = "1.0.13" derive_setters = "0.1.6" diff --git a/tests/rustdoc-ui/lints/diagnostic-width.stderr b/tests/rustdoc-ui/lints/diagnostic-width.stderr index 94fc2343fafc1..6b2e89dc9688f 100644 --- a/tests/rustdoc-ui/lints/diagnostic-width.stderr +++ b/tests/rustdoc-ui/lints/diagnostic-width.stderr @@ -1,15 +1,15 @@ error: this URL is not a hyperlink --> $DIR/diagnostic-width.rs:4:41 | -LL | ... a http://link.com - | ^^^^^^^^^^^^^^^ +LL | ... a http:...k.com + | ^^^^^...^^^^^ | = note: bare URLs are not automatically turned into clickable links note: the lint level is defined here --> $DIR/diagnostic-width.rs:2:9 | -LL | ...ny(ru...are_urls)] - | ^^...^^^^^^^^ +LL | ...ny(rustd..._urls)] + | ^^^^^...^^^^^ help: use an automatic link instead | LL | /// This is a long line that contains a diff --git a/tests/ui/diagnostic-width/long-span.long.stderr b/tests/ui/diagnostic-width/long-span.long.stderr index 526719678afeb..fddf25df6212c 100644 --- a/tests/ui/diagnostic-width/long-span.long.stderr +++ b/tests/ui/diagnostic-width/long-span.long.stderr @@ -1,16 +1,16 @@ error[E0369]: cannot add `[{integer}; 1680]` to `[{integer}; 1680]` ╭▸ $DIR/long-span.rs:7:5056 │ -LL │ …u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, …, 0, 0, 0, 0, 0, 0, 0] + [0, 0, 0, 0, 0, 0, 0, 0, 0, …, 0, 0, 0, 0, 0, 0, 0]; - │ ┬───────────────────────────…────────────────────── ━ ────────────────────────────…────────────────────── [{integer}; 1680] +LL │ …u8 = [0, 0, 0, 0, 0, 0, 0, 0, …, 0, 0, 0, 0, 0, 0, 0, 0] + [0, 0, 0, 0, 0, 0, 0, 0, …, 0, 0, 0, 0, 0, 0, 0, 0]; + │ ┬────────────────────────…───────────────────────── ━ ─────────────────────────…───────────────────────── [{integer}; 1680] │ │ ╰╴ [{integer}; 1680] error[E0308]: mismatched types ╭▸ $DIR/long-span.rs:9:15 │ -LL │ …t D: u8 = [0, 0, 0, 0, 0, 0, 0, 0… 0, 0, 0, 0, 0, 0, 0, 0, 0]; - │ ┬─ ━━━━━━━━━━━━━━━━━━━━━━━…━━━━━━━━━━━━━━━━━━━━━━━━━━━ expected `u8`, found `[{integer}; 1680]` +LL │ …t D: u8 = [0, 0, 0, 0, 0, 0, 0, 0, …, 0, 0, 0, 0, 0, 0, 0, 0]; + │ ┬─ ━━━━━━━━━━━━━━━━━━━━━━━━━…━━━━━━━━━━━━━━━━━━━━━━━━━ expected `u8`, found `[{integer}; 1680]` │ │ ╰╴ expected because of the type of the constant diff --git a/tests/ui/diagnostic-width/long-span.longest.stderr b/tests/ui/diagnostic-width/long-span.longest.stderr index 0b1ca9a22fd6d..2af54868f2234 100644 --- a/tests/ui/diagnostic-width/long-span.longest.stderr +++ b/tests/ui/diagnostic-width/long-span.longest.stderr @@ -1,16 +1,16 @@ error[E0369]: cannot add `[{integer}; 1680]` to `[{integer}; 1680]` --> $DIR/long-span.rs:7:5056 | -LL | ... = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - | -----------------------------------------...----------------------------------- ^ -----------------------------------------...----------------------------------- [{integer}; 1680] +LL | ... = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + | --------------------------------------...-------------------------------------- ^ --------------------------------------...-------------------------------------- [{integer}; 1680] | | | [{integer}; 1680] error[E0308]: mismatched types --> $DIR/long-span.rs:9:15 | -LL | ...D: u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,..., 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `[{integer}; 1680]` +LL | ...D: u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `[{integer}; 1680]` | | | expected because of the type of the constant diff --git a/tests/ui/diagnostic-width/long-span.short.stderr b/tests/ui/diagnostic-width/long-span.short.stderr index bd86a048c434f..a1cb789a64549 100644 --- a/tests/ui/diagnostic-width/long-span.short.stderr +++ b/tests/ui/diagnostic-width/long-span.short.stderr @@ -1,16 +1,16 @@ error[E0369]: cannot add `[{integer}; 1680]` to `[{integer}; 1680]` ╭▸ $DIR/long-span.rs:7:5056 │ -LL │ …u8 = [0, 0, 0…0] + [0, 0, 0…0]; - │ ┬───────…── ━ ────────…── [{integer}; 1680] +LL │ …u8 = [0, 0…0, 0] + [0, 0…0, 0]; + │ ┬────…───── ━ ─────…───── [{integer}; 1680] │ │ ╰╴ [{integer}; 1680] error[E0308]: mismatched types ╭▸ $DIR/long-span.rs:9:15 │ -LL │ …t D: u8 = [0,…, 0, 0]; - │ ┬─ ━━━…━━━━━━━ expected `u8`, found `[{integer}; 1680]` +LL │ …t D: u8 = [0, 0…0, 0]; + │ ┬─ ━━━━━…━━━━━ expected `u8`, found `[{integer}; 1680]` │ │ ╰╴ expected because of the type of the constant diff --git a/tests/ui/diagnostic-width/long-span.shortest.stderr b/tests/ui/diagnostic-width/long-span.shortest.stderr index 4d9e413287b65..770c6f4b7fa40 100644 --- a/tests/ui/diagnostic-width/long-span.shortest.stderr +++ b/tests/ui/diagnostic-width/long-span.shortest.stderr @@ -1,16 +1,16 @@ error[E0369]: cannot add `[{integer}; 1680]` to `[{integer}; 1680]` --> $DIR/long-span.rs:7:5056 | -LL | ... = [0, 0, 0...0] + [0, 0, 0...0]; - | --------...-- ^ --------...-- [{integer}; 1680] +LL | ... = [0, 0...0, 0] + [0, 0...0, 0]; + | -----...----- ^ -----...----- [{integer}; 1680] | | | [{integer}; 1680] error[E0308]: mismatched types --> $DIR/long-span.rs:9:15 | -LL | ...D: u8 = [0,..., 0, 0]; - | -- ^^^...^^^^^^^ expected `u8`, found `[{integer}; 1680]` +LL | ...D: u8 = [0, 0...0, 0]; + | -- ^^^^^...^^^^^ expected `u8`, found `[{integer}; 1680]` | | | expected because of the type of the constant diff --git a/tests/ui/parser/raw/too-many-hash.stderr b/tests/ui/parser/raw/too-many-hash.stderr index 499b21d3982c8..263378be7b060 100644 --- a/tests/ui/parser/raw/too-many-hash.stderr +++ b/tests/ui/parser/raw/too-many-hash.stderr @@ -1,8 +1,8 @@ error: too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found 256 --> $DIR/too-many-hash.rs:4:19 | -LL | ... = r###################################################...######################################; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | ... = r############################################...#############################################; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 1 previous error diff --git a/tests/ui/proc-macro/nonfatal-parsing.stderr b/tests/ui/proc-macro/nonfatal-parsing.stderr index 6780a359c2248..874a7a2f410d9 100644 --- a/tests/ui/proc-macro/nonfatal-parsing.stderr +++ b/tests/ui/proc-macro/nonfatal-parsing.stderr @@ -166,8 +166,8 @@ LL | '\n' error: too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found 256 --> :1:1 | -LL | r#######################################...################################################## - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | r############################################...############################################# + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid digit for a base 2 literal --> :1:9