diff options
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 |
