Skip to content

Commit 9869e5b

Browse files
Change E0741 into E0742
1 parent 6c7fe5a commit 9869e5b

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

src/librustc_resolve/build_reduced_graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
256256
if self.r.is_accessible_from(vis, parent_scope.module) {
257257
vis
258258
} else {
259-
struct_span_err!(self.r.session, path.span, E0741,
259+
struct_span_err!(self.r.session, path.span, E0742,
260260
"visibilities can only be restricted to ancestor modules")
261261
.emit();
262262
ty::Visibility::Public

src/librustc_resolve/error_codes.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1910,6 +1910,7 @@ E0671: r##"
19101910
19111911
Const parameters cannot depend on type parameters.
19121912
The following is therefore invalid:
1913+
19131914
```compile_fail,E0741
19141915
#![feature(const_generics)]
19151916
@@ -1933,13 +1934,13 @@ struct Foo<X = Box<Self>> {
19331934
```
19341935
"##,
19351936

1936-
E0741: r##"
1937+
E0742: r##"
19371938
Visibility is restricted to a module which isn't an ancestor of the current
19381939
item.
19391940
19401941
Erroneous code example:
19411942
1942-
```compile_fail,E0741,edition2018
1943+
```compile_fail,E0742,edition2018
19431944
pub mod Sea {}
19441945
19451946
pub (in crate::Sea) struct Shark; // error!

src/test/ui/privacy/restricted/relative-2018.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0741]: visibilities can only be restricted to ancestor modules
1+
error[E0742]: visibilities can only be restricted to ancestor modules
22
--> $DIR/relative-2018.rs:7:12
33
|
44
LL | pub(in ::core) struct S4;
@@ -14,4 +14,4 @@ LL | pub(in a::b) struct S5;
1414

1515
error: aborting due to 2 previous errors
1616

17-
For more information about this error, try `rustc --explain E0741`.
17+
For more information about this error, try `rustc --explain E0742`.

src/test/ui/privacy/restricted/test.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0433]: failed to resolve: maybe a missing crate `bad`?
44
LL | pub(in bad::path) mod m1 {}
55
| ^^^ maybe a missing crate `bad`?
66

7-
error[E0741]: visibilities can only be restricted to ancestor modules
7+
error[E0742]: visibilities can only be restricted to ancestor modules
88
--> $DIR/test.rs:51:12
99
|
1010
LL | pub(in foo) mod m2 {}
@@ -78,5 +78,5 @@ LL | u.h();
7878

7979
error: aborting due to 12 previous errors
8080

81-
Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624, E0741.
81+
Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624, E0742.
8282
For more information about an error, try `rustc --explain E0364`.

src/test/ui/proc-macro/issue-50493.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0741]: visibilities can only be restricted to ancestor modules
1+
error[E0742]: visibilities can only be restricted to ancestor modules
22
--> $DIR/issue-50493.rs:8:12
33
|
44
LL | pub(in restricted) field: usize,
@@ -12,5 +12,5 @@ LL | #[derive(Derive)]
1212

1313
error: aborting due to 2 previous errors
1414

15-
Some errors have detailed explanations: E0616, E0741.
15+
Some errors have detailed explanations: E0616, E0742.
1616
For more information about an error, try `rustc --explain E0616`.

src/test/ui/pub/pub-restricted.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ LL | pub (xyz) fn xyz() {}
5353
`pub(super)`: visible only in the current module's parent
5454
`pub(in path::to::module)`: visible only on the specified path
5555

56-
error[E0741]: visibilities can only be restricted to ancestor modules
56+
error[E0742]: visibilities can only be restricted to ancestor modules
5757
--> $DIR/pub-restricted.rs:25:17
5858
|
5959
LL | pub (in x) non_parent_invalid: usize,
6060
| ^
6161

6262
error: aborting due to 6 previous errors
6363

64-
Some errors have detailed explanations: E0704, E0741.
64+
Some errors have detailed explanations: E0704, E0742.
6565
For more information about an error, try `rustc --explain E0704`.

src/test/ui/resolve/resolve-bad-visibility.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0577]: expected module, found trait `Tr`
1010
LL | pub(in Tr) struct Z;
1111
| ^^ not a module
1212

13-
error[E0741]: visibilities can only be restricted to ancestor modules
13+
error[E0742]: visibilities can only be restricted to ancestor modules
1414
--> $DIR/resolve-bad-visibility.rs:6:8
1515
|
1616
LL | pub(in std::vec) struct F;
@@ -30,5 +30,5 @@ LL | pub(in too_soon) struct H;
3030

3131
error: aborting due to 5 previous errors
3232

33-
Some errors have detailed explanations: E0433, E0741.
33+
Some errors have detailed explanations: E0433, E0742.
3434
For more information about an error, try `rustc --explain E0433`.

0 commit comments

Comments
 (0)