]> git.lizzy.rs Git - rust.git/commitdiff
Change E0741 into E0742
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 29 Oct 2019 12:59:22 +0000 (13:59 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 29 Oct 2019 12:59:40 +0000 (13:59 +0100)
src/librustc_resolve/build_reduced_graph.rs
src/librustc_resolve/error_codes.rs
src/test/ui/privacy/restricted/relative-2018.stderr
src/test/ui/privacy/restricted/test.stderr
src/test/ui/proc-macro/issue-50493.stderr
src/test/ui/pub/pub-restricted.stderr
src/test/ui/resolve/resolve-bad-visibility.stderr

index 3564aefba73ae9c8b3ad090d9a23f1d26bba872e..648c5104b1af70050cb2ca668d8b8c8334016224 100644 (file)
@@ -256,7 +256,7 @@ fn resolve_visibility(&mut self, vis: &ast::Visibility) -> ty::Visibility {
                                 if self.r.is_accessible_from(vis, parent_scope.module) {
                                     vis
                                 } else {
-                                    struct_span_err!(self.r.session, path.span, E0741,
+                                    struct_span_err!(self.r.session, path.span, E0742,
                                         "visibilities can only be restricted to ancestor modules")
                                         .emit();
                                     ty::Visibility::Public
index 32e5eb50a76da564c93e836dd1f87abc139c2324..9937f27931fb7b8258fdb529093d65eec757ab17 100644 (file)
@@ -1910,6 +1910,7 @@ fn main() {
 
 Const parameters cannot depend on type parameters.
 The following is therefore invalid:
+
 ```compile_fail,E0741
 #![feature(const_generics)]
 
@@ -1933,13 +1934,13 @@ struct Foo<X = Box<Self>> {
 ```
 "##,
 
-E0741: r##"
+E0742: r##"
 Visibility is restricted to a module which isn't an ancestor of the current
 item.
 
 Erroneous code example:
 
-```compile_fail,E0741,edition2018
+```compile_fail,E0742,edition2018
 pub mod Sea {}
 
 pub (in crate::Sea) struct Shark; // error!
index 2205d6e518cf3da108be5069c2c79b0e28c7d231..54fee085ee943dfc7bfd6953b88562f9bf8feb67 100644 (file)
@@ -1,4 +1,4 @@
-error[E0741]: visibilities can only be restricted to ancestor modules
+error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/relative-2018.rs:7:12
    |
 LL |     pub(in ::core) struct S4;
@@ -14,4 +14,4 @@ LL |     pub(in a::b) struct S5;
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0741`.
+For more information about this error, try `rustc --explain E0742`.
index b39a42ef3ce3b6258c6601ed2373fe5fb969bc55..e6a61fbefb0d80dd87ea7195bc2b5a5068dedb02 100644 (file)
@@ -4,7 +4,7 @@ error[E0433]: failed to resolve: maybe a missing crate `bad`?
 LL |     pub(in bad::path) mod m1 {}
    |            ^^^ maybe a missing crate `bad`?
 
-error[E0741]: visibilities can only be restricted to ancestor modules
+error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/test.rs:51:12
    |
 LL |     pub(in foo) mod m2 {}
@@ -78,5 +78,5 @@ LL |     u.h();
 
 error: aborting due to 12 previous errors
 
-Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624, E0741.
+Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624, E0742.
 For more information about an error, try `rustc --explain E0364`.
index 25035106f25c9d7c86c28a03df18d7d0f55c80a8..6b8724457a6a3621bc2b3dd1fdb6795f713aa909 100644 (file)
@@ -1,4 +1,4 @@
-error[E0741]: visibilities can only be restricted to ancestor modules
+error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/issue-50493.rs:8:12
    |
 LL |     pub(in restricted) field: usize,
@@ -12,5 +12,5 @@ LL | #[derive(Derive)]
 
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0616, E0741.
+Some errors have detailed explanations: E0616, E0742.
 For more information about an error, try `rustc --explain E0616`.
index 3ec4e1143feba7c2662e596aaf61032721d9c1cd..56ff104b4fed914a75f97f4ab71d1a759bc227e9 100644 (file)
@@ -53,7 +53,7 @@ LL | pub (xyz) fn xyz() {}
            `pub(super)`: visible only in the current module's parent
            `pub(in path::to::module)`: visible only on the specified path
 
-error[E0741]: visibilities can only be restricted to ancestor modules
+error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/pub-restricted.rs:25:17
    |
 LL |         pub (in x) non_parent_invalid: usize,
@@ -61,5 +61,5 @@ LL |         pub (in x) non_parent_invalid: usize,
 
 error: aborting due to 6 previous errors
 
-Some errors have detailed explanations: E0704, E0741.
+Some errors have detailed explanations: E0704, E0742.
 For more information about an error, try `rustc --explain E0704`.
index b077bb81872a8d572b0e920603e6bf517acd7c8d..43af38cf491e3aed4ab8af834991950ac817ebcd 100644 (file)
@@ -10,7 +10,7 @@ error[E0577]: expected module, found trait `Tr`
 LL | pub(in Tr) struct Z;
    |        ^^ not a module
 
-error[E0741]: visibilities can only be restricted to ancestor modules
+error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/resolve-bad-visibility.rs:6:8
    |
 LL | pub(in std::vec) struct F;
@@ -30,5 +30,5 @@ LL | pub(in too_soon) struct H;
 
 error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0433, E0741.
+Some errors have detailed explanations: E0433, E0742.
 For more information about an error, try `rustc --explain E0433`.