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/ui/pub | |
| 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/ui/pub')
| -rw-r--r-- | tests/ui/pub/pub-ident-fn-or-struct.stderr | 5 | ||||
| -rw-r--r-- | tests/ui/pub/pub-restricted.stderr | 25 |
2 files changed, 18 insertions, 12 deletions
diff --git a/tests/ui/pub/pub-ident-fn-or-struct.stderr b/tests/ui/pub/pub-ident-fn-or-struct.stderr index ceadc510c63..1bdb547be1e 100644 --- a/tests/ui/pub/pub-ident-fn-or-struct.stderr +++ b/tests/ui/pub/pub-ident-fn-or-struct.stderr @@ -6,8 +6,9 @@ LL | pub S (foo) bar | help: if you meant to call a macro, try | -LL | pub S! (foo) bar - | ~~ +LL - pub S (foo) bar +LL + pub S! (foo) bar + | error: aborting due to 1 previous error diff --git a/tests/ui/pub/pub-restricted.stderr b/tests/ui/pub/pub-restricted.stderr index fc177aa2033..35c48c6d769 100644 --- a/tests/ui/pub/pub-restricted.stderr +++ b/tests/ui/pub/pub-restricted.stderr @@ -10,8 +10,9 @@ LL | pub (a) fn afn() {} `pub(in path::to::module)`: visible only on the specified path help: make this visible only to module `a` with `in` | -LL | pub (in a) fn afn() {} - | ~~~~ +LL - pub (a) fn afn() {} +LL + pub (in a) fn afn() {} + | error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:4:6 @@ -25,8 +26,9 @@ LL | pub (b) fn bfn() {} `pub(in path::to::module)`: visible only on the specified path help: make this visible only to module `b` with `in` | -LL | pub (in b) fn bfn() {} - | ~~~~ +LL - pub (b) fn bfn() {} +LL + pub (in b) fn bfn() {} + | error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:5:6 @@ -40,8 +42,9 @@ LL | pub (crate::a) fn cfn() {} `pub(in path::to::module)`: visible only on the specified path help: make this visible only to module `crate::a` with `in` | -LL | pub (in crate::a) fn cfn() {} - | ~~~~~~~~~~~ +LL - pub (crate::a) fn cfn() {} +LL + pub (in crate::a) fn cfn() {} + | error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:22:14 @@ -55,8 +58,9 @@ LL | pub (a) invalid: usize, `pub(in path::to::module)`: visible only on the specified path help: make this visible only to module `a` with `in` | -LL | pub (in a) invalid: usize, - | ~~~~ +LL - pub (a) invalid: usize, +LL + pub (in a) invalid: usize, + | error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:31:6 @@ -70,8 +74,9 @@ LL | pub (xyz) fn xyz() {} `pub(in path::to::module)`: visible only on the specified path help: make this visible only to module `xyz` with `in` | -LL | pub (in xyz) fn xyz() {} - | ~~~~~~ +LL - pub (xyz) fn xyz() {} +LL + pub (in xyz) fn xyz() {} + | error[E0742]: visibilities can only be restricted to ancestor modules --> $DIR/pub-restricted.rs:23:17 |
