diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-09 22:30:26 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-02-10 20:21:39 +0000 |
| commit | f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch) | |
| tree | e97d87013709bda13934fdc452a2a459a069876a /tests/rustdoc-ui/intra-doc | |
| parent | 8c04e395952022a451138dc4dbead6dd6ae65203 (diff) | |
| download | rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip | |
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
Diffstat (limited to 'tests/rustdoc-ui/intra-doc')
5 files changed, 84 insertions, 56 deletions
diff --git a/tests/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr b/tests/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr index ef7fec77b1e..3bba27e593c 100644 --- a/tests/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr +++ b/tests/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr @@ -11,8 +11,9 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the enum, prefix with `enum@` | -LL | /// Link to [enum@S] - | ~~~~~ +LL - /// Link to [struct@S] +LL + /// Link to [enum@S] + | error: incompatible link kind for `S` --> $DIR/disambiguator-mismatch.rs:27:14 @@ -22,8 +23,9 @@ LL | /// Link to [mod@S] | help: to link to the enum, prefix with `enum@` | -LL | /// Link to [enum@S] - | ~~~~~ +LL - /// Link to [mod@S] +LL + /// Link to [enum@S] + | error: incompatible link kind for `S` --> $DIR/disambiguator-mismatch.rs:32:14 @@ -33,8 +35,9 @@ LL | /// Link to [union@S] | help: to link to the enum, prefix with `enum@` | -LL | /// Link to [enum@S] - | ~~~~~ +LL - /// Link to [union@S] +LL + /// Link to [enum@S] + | error: incompatible link kind for `S` --> $DIR/disambiguator-mismatch.rs:37:14 @@ -44,8 +47,9 @@ LL | /// Link to [trait@S] | help: to link to the enum, prefix with `enum@` | -LL | /// Link to [enum@S] - | ~~~~~ +LL - /// Link to [trait@S] +LL + /// Link to [enum@S] + | error: incompatible link kind for `T` --> $DIR/disambiguator-mismatch.rs:42:14 @@ -55,8 +59,9 @@ LL | /// Link to [struct@T] | help: to link to the trait, prefix with `trait@` | -LL | /// Link to [trait@T] - | ~~~~~~ +LL - /// Link to [struct@T] +LL + /// Link to [trait@T] + | error: incompatible link kind for `m` --> $DIR/disambiguator-mismatch.rs:47:14 @@ -89,8 +94,9 @@ LL | /// Link to [const@s] | help: to link to the static, prefix with `static@` | -LL | /// Link to [static@s] - | ~~~~~~~ +LL - /// Link to [const@s] +LL + /// Link to [static@s] + | error: incompatible link kind for `c` --> $DIR/disambiguator-mismatch.rs:63:14 @@ -100,8 +106,9 @@ LL | /// Link to [static@c] | help: to link to the constant, prefix with `const@` | -LL | /// Link to [const@c] - | ~~~~~~ +LL - /// Link to [static@c] +LL + /// Link to [const@c] + | error: incompatible link kind for `c` --> $DIR/disambiguator-mismatch.rs:68:14 @@ -111,8 +118,9 @@ LL | /// Link to [fn@c] | help: to link to the constant, prefix with `const@` | -LL | /// Link to [const@c] - | ~~~~~~ +LL - /// Link to [fn@c] +LL + /// Link to [const@c] + | error: incompatible link kind for `c` --> $DIR/disambiguator-mismatch.rs:73:14 @@ -146,8 +154,9 @@ LL | /// Link to [fn@std] | help: to link to the crate, prefix with `mod@` | -LL | /// Link to [mod@std] - | ~~~~ +LL - /// Link to [fn@std] +LL + /// Link to [mod@std] + | error: incompatible link kind for `X::y` --> $DIR/disambiguator-mismatch.rs:88:14 @@ -157,8 +166,9 @@ LL | /// Link to [method@X::y] | help: to link to the field, prefix with `field@` | -LL | /// Link to [field@X::y] - | ~~~~~~ +LL - /// Link to [method@X::y] +LL + /// Link to [field@X::y] + | error: unresolved link to `S::A` --> $DIR/disambiguator-mismatch.rs:93:14 @@ -168,8 +178,9 @@ LL | /// Link to [field@S::A] | help: to link to the variant, prefix with `variant@` | -LL | /// Link to [variant@S::A] - | ~~~~~~~~ +LL - /// Link to [field@S::A] +LL + /// Link to [variant@S::A] + | error: aborting due to 15 previous errors diff --git a/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr b/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr index b952517022b..2818b6b4bba 100644 --- a/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr +++ b/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr @@ -11,8 +11,9 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the associated constant, prefix with `const@` | -LL | //! [const@u8::MIN] - | ~~~~~~ +LL - //! [static@u8::MIN] +LL + //! [const@u8::MIN] + | error: aborting due to 1 previous error diff --git a/tests/rustdoc-ui/intra-doc/prim-conflict.stderr b/tests/rustdoc-ui/intra-doc/prim-conflict.stderr index 03ce8f15f0a..c50f6bb9b87 100644 --- a/tests/rustdoc-ui/intra-doc/prim-conflict.stderr +++ b/tests/rustdoc-ui/intra-doc/prim-conflict.stderr @@ -26,12 +26,14 @@ LL | /// [type@char] | help: to link to the module, prefix with `mod@` | -LL | /// [mod@char] - | ~~~~ +LL - /// [type@char] +LL + /// [mod@char] + | help: to link to the primitive type, prefix with `prim@` | -LL | /// [prim@char] - | ~~~~~ +LL - /// [type@char] +LL + /// [prim@char] + | error: incompatible link kind for `char` --> $DIR/prim-conflict.rs:19:6 @@ -41,8 +43,9 @@ LL | /// [struct@char] | help: to link to the module, prefix with `mod@` | -LL | /// [mod@char] - | ~~~~ +LL - /// [struct@char] +LL + /// [mod@char] + | error: incompatible link kind for `char` --> $DIR/prim-conflict.rs:26:10 @@ -52,8 +55,9 @@ LL | //! [struct@char] | help: to link to the primitive type, prefix with `prim@` | -LL | //! [prim@char] - | ~~~~~ +LL - //! [struct@char] +LL + //! [prim@char] + | error: aborting due to 4 previous errors diff --git a/tests/rustdoc-ui/intra-doc/value-ctor.stderr b/tests/rustdoc-ui/intra-doc/value-ctor.stderr index 8d2a6649f4c..cfc2bb67396 100644 --- a/tests/rustdoc-ui/intra-doc/value-ctor.stderr +++ b/tests/rustdoc-ui/intra-doc/value-ctor.stderr @@ -11,8 +11,9 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the variant, prefix with `variant@` | -LL | /// [variant@Foo::X] - | ~~~~~~~~ +LL - /// [value@Foo::X] +LL + /// [variant@Foo::X] + | error: unresolved link to `MyStruct` --> $DIR/value-ctor.rs:10:11 @@ -22,8 +23,9 @@ LL | /// [tst][value@MyStruct] | help: to link to the struct, prefix with `struct@` | -LL | /// [tst][struct@MyStruct] - | ~~~~~~~ +LL - /// [tst][value@MyStruct] +LL + /// [tst][struct@MyStruct] + | error: unresolved link to `Internals` --> $DIR/value-ctor.rs:20:15 @@ -33,8 +35,9 @@ LL | /// while [b][value@Internals] fails. | help: to link to the struct, prefix with `struct@` | -LL | /// while [b][struct@Internals] fails. - | ~~~~~~~ +LL - /// while [b][value@Internals] fails. +LL + /// while [b][struct@Internals] fails. + | error: incompatible link kind for `Internals` --> $DIR/value-ctor.rs:22:15 @@ -44,8 +47,9 @@ LL | /// while [d][variant@Internals] fails. | help: to link to the struct, prefix with `struct@` | -LL | /// while [d][struct@Internals] fails. - | ~~~~~~~ +LL - /// while [d][variant@Internals] fails. +LL + /// while [d][struct@Internals] fails. + | error: unresolved link to `Internals2` --> $DIR/value-ctor.rs:34:15 @@ -55,8 +59,9 @@ LL | /// while [b][value@Internals2] fails. | help: to link to the enum, prefix with `enum@` | -LL | /// while [b][enum@Internals2] fails. - | ~~~~~ +LL - /// while [b][value@Internals2] fails. +LL + /// while [b][enum@Internals2] fails. + | error: aborting due to 5 previous errors diff --git a/tests/rustdoc-ui/intra-doc/weird-syntax.stderr b/tests/rustdoc-ui/intra-doc/weird-syntax.stderr index 17bcbc783fd..1381c1b31eb 100644 --- a/tests/rustdoc-ui/intra-doc/weird-syntax.stderr +++ b/tests/rustdoc-ui/intra-doc/weird-syntax.stderr @@ -11,8 +11,9 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the trait, prefix with `trait@` | -LL | /// [`trait@Clone`] - | ~~~~~~ +LL - /// [`struct@Clone`] +LL + /// [`trait@Clone`] + | error: incompatible link kind for `Clone` --> $DIR/weird-syntax.rs:21:9 @@ -22,8 +23,9 @@ LL | /// [```struct@Clone```] | help: to link to the trait, prefix with `trait@` | -LL | /// [```trait@Clone```] - | ~~~~~~ +LL - /// [```struct@Clone```] +LL + /// [```trait@Clone```] + | error: incompatible link kind for `Clone` --> $DIR/weird-syntax.rs:24:11 @@ -33,8 +35,9 @@ LL | /// [ ` struct@Clone ` ] | help: to link to the trait, prefix with `trait@` | -LL | /// [ ` trait@Clone ` ] - | ~~~~~~ +LL - /// [ ` struct@Clone ` ] +LL + /// [ ` trait@Clone ` ] + | error: unresolved link to `Clone` --> $DIR/weird-syntax.rs:27:9 @@ -104,8 +107,9 @@ LL | /// [x][ struct@Clone] | help: to link to the trait, prefix with `trait@` | -LL | /// [x][ trait@Clone] - | ~~~~~~ +LL - /// [x][ struct@Clone] +LL + /// [x][ trait@Clone] + | error: incompatible link kind for `Clone` --> $DIR/weird-syntax.rs:65:9 @@ -115,8 +119,9 @@ LL | /// [x][struct@Clone ] | help: to link to the trait, prefix with `trait@` | -LL | /// [x][trait@Clone ] - | ~~~~~~ +LL - /// [x][struct@Clone ] +LL + /// [x][trait@Clone ] + | error: unresolved link to `Clone` --> $DIR/weird-syntax.rs:74:9 @@ -158,8 +163,9 @@ LL | /// [w]( struct@Clone) | help: to link to the trait, prefix with `trait@` | -LL | /// [w]( trait@Clone) - | ~~~~~~ +LL - /// [w]( struct@Clone) +LL + /// [w]( trait@Clone) + | error: incompatible link kind for `Clone` --> $DIR/weird-syntax.rs:94:9 @@ -169,8 +175,9 @@ LL | /// [w](struct@Clone ) | help: to link to the trait, prefix with `trait@` | -LL | /// [w](trait@Clone ) - | ~~~~~~ +LL - /// [w](struct@Clone ) +LL + /// [w](trait@Clone ) + | error: unresolved link to `Clone` --> $DIR/weird-syntax.rs:97:9 |
