Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_errors/Cargo.toml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproducing annotate-snippet's changelog:


[0.12.15] - 2026-04-06

Fixed

  • Source highlighting no longer misaligns when source contains zero-width or multi-width characters #400

[0.12.14] - 2026-04-04

Fixed

  • Don't trim middle of spans smaller than padding + margin
  • Properly handle replacement length mismatches
  • Account for "gutter" width when trimming middle of long spans
  • Account for left trim when trimming middle of long spans

[0.12.13] - 2026-03-04

Fixed

  • Correctly handle tabs on the first and last lines of multiline Patch #373 and #380

[0.12.12] - 2026-02-18

Added

  • Add no_std support #365

[0.12.11] - 2026-01-29

Fixed

  • Fix Unicode highlight alignment in patches #357

Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions tests/rustdoc-ui/lints/diagnostic-width.stderr
Original file line number Diff line number Diff line change
@@ -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 <http://link.com>
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/long-span.long.stderr
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/long-span.longest.stderr
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/long-span.short.stderr
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/long-span.shortest.stderr
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/parser/raw/too-many-hash.stderr
Original file line number Diff line number Diff line change
@@ -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

4 changes: 2 additions & 2 deletions tests/ui/proc-macro/nonfatal-parsing.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ LL | '\n'
error: too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found 256
--> <proc-macro source code>:1:1
|
LL | r#######################################...##################################################
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | r############################################...#############################################
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: invalid digit for a base 2 literal
--> <proc-macro source code>:1:9
Expand Down
Loading