Cleanup feature gates.
This commit is contained in:
parent
3c7947ee43
commit
27d8cd7db0
111 changed files with 236 additions and 272 deletions
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(pub_restricted)]
|
||||
|
||||
struct Bar(pub(()));
|
||||
|
||||
struct Foo {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: expected identifier, found `(`
|
||||
--> $DIR/pub-restricted-error.rs:6:16
|
||||
--> $DIR/pub-restricted-error.rs:4:16
|
||||
|
|
||||
LL | pub(crate) () foo: usize,
|
||||
| ^ expected identifier
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(pub_restricted)]
|
||||
|
||||
mod a {}
|
||||
|
||||
pub (a) fn afn() {} //~ incorrect visibility restriction
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:5:6
|
||||
--> $DIR/pub-restricted.rs:3:6
|
||||
|
|
||||
LL | pub (a) fn afn() {}
|
||||
| ^ help: make this visible only to module `a` with `in`: `in a`
|
||||
|
|
@ -10,7 +10,7 @@ LL | pub (a) fn afn() {}
|
|||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:6:6
|
||||
--> $DIR/pub-restricted.rs:4:6
|
||||
|
|
||||
LL | pub (b) fn bfn() {}
|
||||
| ^ help: make this visible only to module `b` with `in`: `in b`
|
||||
|
|
@ -21,7 +21,7 @@ LL | pub (b) fn bfn() {}
|
|||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:7:6
|
||||
--> $DIR/pub-restricted.rs:5:6
|
||||
|
|
||||
LL | pub (crate::a) fn cfn() {}
|
||||
| ^^^^^^^^ help: make this visible only to module `crate::a` with `in`: `in crate::a`
|
||||
|
|
@ -32,7 +32,7 @@ LL | pub (crate::a) fn cfn() {}
|
|||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:24:14
|
||||
--> $DIR/pub-restricted.rs:22:14
|
||||
|
|
||||
LL | pub (a) invalid: usize,
|
||||
| ^ help: make this visible only to module `a` with `in`: `in a`
|
||||
|
|
@ -43,7 +43,7 @@ LL | pub (a) invalid: usize,
|
|||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:33:6
|
||||
--> $DIR/pub-restricted.rs:31:6
|
||||
|
|
||||
LL | pub (xyz) fn xyz() {}
|
||||
| ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
|
||||
|
|
@ -54,7 +54,7 @@ LL | pub (xyz) fn xyz() {}
|
|||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0742]: visibilities can only be restricted to ancestor modules
|
||||
--> $DIR/pub-restricted.rs:25:17
|
||||
--> $DIR/pub-restricted.rs:23:17
|
||||
|
|
||||
LL | pub (in x) non_parent_invalid: usize,
|
||||
| ^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue