]> git.lizzy.rs Git - rust.git/commitdiff
Normalize wording of privacy access labels
authorEsteban Küber <esteban@kuber.com.ar>
Sun, 22 Mar 2020 22:36:54 +0000 (15:36 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Sun, 22 Mar 2020 22:36:54 +0000 (15:36 -0700)
89 files changed:
src/librustc_privacy/lib.rs
src/librustc_resolve/diagnostics.rs
src/librustc_resolve/late/diagnostics.rs
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/method/suggest.rs
src/test/ui/associated-const/associated-const-private-impl.stderr
src/test/ui/error-codes/E0451.stderr
src/test/ui/error-codes/E0603.stderr
src/test/ui/error-codes/E0624.stderr
src/test/ui/error-festival.stderr
src/test/ui/explore-issue-38412.stderr
src/test/ui/export-import.stderr
src/test/ui/export-tag-variant.stderr
src/test/ui/export.stderr
src/test/ui/extern/extern-crate-visibility.stderr
src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr
src/test/ui/hygiene/fields.stderr
src/test/ui/hygiene/impl_items.stderr
src/test/ui/hygiene/intercrate.stderr
src/test/ui/hygiene/privacy.stderr
src/test/ui/hygiene/rustc-macro-transparency.stderr
src/test/ui/import.stderr
src/test/ui/imports/issue-55884-2.stderr
src/test/ui/imports/reexports.stderr
src/test/ui/imports/unresolved-imports-used.stderr
src/test/ui/issues/issue-10545.stderr
src/test/ui/issues/issue-11593.stderr
src/test/ui/issues/issue-11680.stderr
src/test/ui/issues/issue-13407.stderr
src/test/ui/issues/issue-13641.stderr
src/test/ui/issues/issue-16725.stderr
src/test/ui/issues/issue-17718-const-privacy.stderr
src/test/ui/issues/issue-21202.stderr
src/test/ui/issues/issue-28388-2.stderr
src/test/ui/issues/issue-29161.stderr
src/test/ui/issues/issue-3763.stderr
src/test/ui/issues/issue-38857.stderr
src/test/ui/issues/issue-3993.stderr
src/test/ui/issues/issue-53498.stderr
src/test/ui/macros/macro-local-data-key-priv.stderr
src/test/ui/parser/macro/pub-item-macro.stderr
src/test/ui/privacy/associated-item-privacy-inherent.stderr
src/test/ui/privacy/associated-item-privacy-trait.stderr
src/test/ui/privacy/associated-item-privacy-type-binding.stderr
src/test/ui/privacy/decl-macro.stderr
src/test/ui/privacy/privacy-in-paths.stderr
src/test/ui/privacy/privacy-ns2.stderr
src/test/ui/privacy/privacy-ufcs.stderr
src/test/ui/privacy/privacy1.stderr
src/test/ui/privacy/privacy2.stderr
src/test/ui/privacy/privacy4.stderr
src/test/ui/privacy/privacy5.stderr
src/test/ui/privacy/private-impl-method.stderr
src/test/ui/privacy/private-in-public-non-principal-2.stderr
src/test/ui/privacy/private-inferred-type-1.stderr
src/test/ui/privacy/private-inferred-type-2.stderr
src/test/ui/privacy/private-inferred-type-3.stderr
src/test/ui/privacy/private-inferred-type.stderr
src/test/ui/privacy/private-item-simple.stderr
src/test/ui/privacy/private-method-cross-crate.stderr
src/test/ui/privacy/private-method-inherited.stderr
src/test/ui/privacy/private-method.stderr
src/test/ui/privacy/private-struct-field-ctor.stderr
src/test/ui/privacy/private-struct-field-pattern.stderr
src/test/ui/privacy/private-type-in-interface.stderr
src/test/ui/privacy/restricted/struct-literal-field.stderr
src/test/ui/privacy/restricted/test.stderr
src/test/ui/privacy/union-field-privacy-1.stderr
src/test/ui/proc-macro/disappearing-resolution.stderr
src/test/ui/reachable/unreachable-variant.stderr
src/test/ui/resolve/privacy-enum-ctor.stderr
src/test/ui/resolve/privacy-struct-ctor.stderr
src/test/ui/resolve/resolve-hint-macro.stderr
src/test/ui/rfc-2008-non-exhaustive/struct.stderr
src/test/ui/rfc-2008-non-exhaustive/variant.stderr
src/test/ui/shadowed/shadowed-use-visibility.stderr
src/test/ui/stability-in-private-module.stderr
src/test/ui/static/static-method-privacy.stderr
src/test/ui/static/static-priv-by-default2.stderr
src/test/ui/structs/struct-variant-privacy-xc.stderr
src/test/ui/structs/struct-variant-privacy.stderr
src/test/ui/traits/trait-item-privacy.stderr
src/test/ui/traits/trait-method-private.stderr
src/test/ui/try-block/try-block-in-edition2015.stderr
src/test/ui/use/use-from-trait-xc.stderr
src/test/ui/use/use-mod/use-mod-3.stderr
src/test/ui/xc-private-method.stderr
src/test/ui/xc-private-method2.stderr
src/test/ui/xcrate/xcrate-private-by-default.stderr

index a3510737b7edc7be1088514185f8efaa0f31129f..d680b9e002678167dcace9bf00a54233ffb02c63 100644 (file)
@@ -1038,7 +1038,7 @@ fn check_field(
                 def.variant_descr(),
                 self.tcx.def_path_str(def.did)
             )
-            .span_label(span, format!("field `{}` is private", field.ident))
+            .span_label(span, "private field")
             .emit();
         }
     }
@@ -1180,7 +1180,11 @@ fn check_expr_pat_type(&mut self, id: hir::HirId, span: Span) -> bool {
     fn check_def_id(&mut self, def_id: DefId, kind: &str, descr: &dyn fmt::Display) -> bool {
         let is_error = !self.item_is_accessible(def_id);
         if is_error {
-            self.tcx.sess.span_err(self.span, &format!("{} `{}` is private", kind, descr));
+            self.tcx
+                .sess
+                .struct_span_err(self.span, &format!("{} `{}` is private", kind, descr))
+                .span_label(self.span, &format!("private {}", kind))
+                .emit();
         }
         is_error
     }
@@ -1313,8 +1317,12 @@ fn visit_qpath(&mut self, qpath: &'tcx hir::QPath<'tcx>, id: hir::HirId, span: S
                     hir::QPath::Resolved(_, ref path) => path.to_string(),
                     hir::QPath::TypeRelative(_, ref segment) => segment.ident.to_string(),
                 };
-                let msg = format!("{} `{}` is private", kind.descr(def_id), name);
-                self.tcx.sess.span_err(span, &msg);
+                let kind = kind.descr(def_id);
+                self.tcx
+                    .sess
+                    .struct_span_err(span, &format!("{} `{}` is private", kind, name))
+                    .span_label(span, &format!("private {}", kind))
+                    .emit();
                 return;
             }
         }
index 6f567ab65a70c01ea3990c8d78cabd1ca211bf4e..cf9730022d0aa637169e2c3499b6d1699d231880 100644 (file)
@@ -952,7 +952,7 @@ fn ctor_fields_span(&self, binding: &NameBinding<'_>) -> Option<Span> {
         let descr = get_descr(binding);
         let mut err =
             struct_span_err!(self.session, ident.span, E0603, "{} `{}` is private", descr, ident);
-        err.span_label(ident.span, &format!("this {} is private", descr));
+        err.span_label(ident.span, &format!("private {}", descr));
         if let Some(span) = ctor_fields_span {
             err.span_label(span, "a constructor is private if any of the fields is private");
         }
index e1256551e24da2fd62c1e9bc9f21c1fc9a5ebd57..a8d4e7ce5f6ba6cc84b803e43468b5ac9c004adb 100644 (file)
@@ -506,10 +506,10 @@ fn smart_resolve_context_dependent_help(
 
         match (res, source) {
             (Res::Def(DefKind::Macro(MacroKind::Bang), _), _) => {
-                err.span_suggestion(
-                    span,
+                err.span_suggestion_verbose(
+                    span.shrink_to_hi(),
                     "use `!` to invoke the macro",
-                    format!("{}!", path_str),
+                    "!".to_string(),
                     Applicability::MaybeIncorrect,
                 );
                 if path_str == "try" && span.rust_2015() {
index 3ee6d5df7356b385887ad9d24bf1fcd9e642bee0..e00322c739fb189a6cc0e7d69c1ce3c384c7745b 100644 (file)
@@ -1452,8 +1452,13 @@ fn add_predicates_for_ast_type_binding(
             .expect("missing associated type");
 
         if !assoc_ty.vis.is_accessible_from(def_scope, tcx) {
-            let msg = format!("associated type `{}` is private", binding.item_name);
-            tcx.sess.span_err(binding.span, &msg);
+            tcx.sess
+                .struct_span_err(
+                    binding.span,
+                    &format!("associated type `{}` is private", binding.item_name),
+                )
+                .span_label(binding.span, "private associated type")
+                .emit();
         }
         tcx.check_stability(assoc_ty.def_id, Some(hir_ref_id), binding.span);
 
@@ -2316,8 +2321,12 @@ pub fn associated_path_to_ty(
 
         let kind = DefKind::AssocTy;
         if !item.vis.is_accessible_from(def_scope, tcx) {
-            let msg = format!("{} `{}` is private", kind.descr(item.def_id), assoc_ident);
-            tcx.sess.span_err(span, &msg);
+            let kind = kind.descr(item.def_id);
+            let msg = format!("{} `{}` is private", kind, assoc_ident);
+            tcx.sess
+                .struct_span_err(span, &msg)
+                .span_label(span, &format!("private {}", kind))
+                .emit();
         }
         tcx.check_stability(item.def_id, Some(hir_ref_id), span);
 
index 061433bcf6515749cc7305a2e66dddc98de03012..f46c43c78dbc599ecc85b9de7fc35405a2cdf81c 100644 (file)
@@ -769,14 +769,16 @@ trait bound{s}",
             }
 
             MethodError::PrivateMatch(kind, def_id, out_of_scope_traits) => {
+                let kind = kind.descr(def_id);
                 let mut err = struct_span_err!(
                     self.tcx.sess,
                     span,
                     E0624,
                     "{} `{}` is private",
-                    kind.descr(def_id),
+                    kind,
                     item_name
                 );
+                err.span_label(span, &format!("private {}", kind));
                 self.suggest_valid_traits(&mut err, out_of_scope_traits);
                 err.emit();
             }
index 7af55174b1905c774ba5790c6c1133199b8bc2b7..305f41433acb6369f1798f5e740fef5cb2eed655 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated constant `ID` is private
   --> $DIR/associated-const-private-impl.rs:13:19
    |
 LL |     assert_eq!(1, bar1::Foo::ID);
-   |                   ^^^^^^^^^^^^^
+   |                   ^^^^^^^^^^^^^ private associated constant
 
 error: aborting due to previous error
 
index 655f3a98d7f09e241ca150f4554e09ae4b99627d..bb92c23e0f600b613f77d39fb6453eaa8d29f182 100644 (file)
@@ -2,13 +2,13 @@ error[E0451]: field `b` of struct `bar::Foo` is private
   --> $DIR/E0451.rs:14:21
    |
 LL |     let bar::Foo{a, b} = foo;
-   |                     ^ field `b` is private
+   |                     ^ private field
 
 error[E0451]: field `b` of struct `bar::Foo` is private
   --> $DIR/E0451.rs:18:29
    |
 LL |     let f = bar::Foo{ a: 0, b: 0 };
-   |                             ^^^^ field `b` is private
+   |                             ^^^^ private field
 
 error: aborting due to 2 previous errors
 
index 724d04954a3c7da1a2926c17d78a364691e17172..ee902584f56dac23028d5be6ef1a01c840a5223e 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: constant `PRIVATE` is private
   --> $DIR/E0603.rs:6:17
    |
 LL |     SomeModule::PRIVATE;
-   |                 ^^^^^^^ this constant is private
+   |                 ^^^^^^^ private constant
    |
 note: the constant `PRIVATE` is defined here
   --> $DIR/E0603.rs:2:5
index 65256c8dd2dd6f3b2b0f661fc4fb06355de877a3..1d3336fb181a06778af862ecf457850ae2f1c893 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `method` is private
   --> $DIR/E0624.rs:11:9
    |
 LL |     foo.method();
-   |         ^^^^^^
+   |         ^^^^^^ private associated function
 
 error: aborting due to previous error
 
index fb5290bf64eb484a77812ca054579142dc1e1a97..7f524230ef00633a7ecc45a9a0273a596744be5c 100644 (file)
@@ -8,7 +8,7 @@ error[E0603]: constant `FOO` is private
   --> $DIR/error-festival.rs:22:10
    |
 LL |     foo::FOO;
-   |          ^^^ this constant is private
+   |          ^^^ private constant
    |
 note: the constant `FOO` is defined here
   --> $DIR/error-festival.rs:7:5
index b3d9214d3d12134b669ca76a96e65837a4cc6461..1855c0b14379d0a96d435695743d080d46eca27a 100644 (file)
@@ -83,19 +83,19 @@ error[E0624]: associated function `pub_crate` is private
   --> $DIR/explore-issue-38412.rs:50:7
    |
 LL |     r.pub_crate();
-   |       ^^^^^^^^^
+   |       ^^^^^^^^^ private associated function
 
 error[E0624]: associated function `pub_mod` is private
   --> $DIR/explore-issue-38412.rs:51:7
    |
 LL |     r.pub_mod();
-   |       ^^^^^^^
+   |       ^^^^^^^ private associated function
 
 error[E0624]: associated function `private` is private
   --> $DIR/explore-issue-38412.rs:52:7
    |
 LL |     r.private();
-   |       ^^^^^^^
+   |       ^^^^^^^ private associated function
 
 error[E0658]: use of unstable library feature 'unstable_undeclared'
   --> $DIR/explore-issue-38412.rs:57:7
@@ -119,19 +119,19 @@ error[E0624]: associated function `pub_crate` is private
   --> $DIR/explore-issue-38412.rs:63:7
    |
 LL |     t.pub_crate();
-   |       ^^^^^^^^^
+   |       ^^^^^^^^^ private associated function
 
 error[E0624]: associated function `pub_mod` is private
   --> $DIR/explore-issue-38412.rs:64:7
    |
 LL |     t.pub_mod();
-   |       ^^^^^^^
+   |       ^^^^^^^ private associated function
 
 error[E0624]: associated function `private` is private
   --> $DIR/explore-issue-38412.rs:65:7
    |
 LL |     t.private();
-   |       ^^^^^^^
+   |       ^^^^^^^ private associated function
 
 error: aborting due to 19 previous errors
 
index 8160775ab589eeebe1e4598a4eb7a5abc1316dfa..753424c7f88b893000a3a3c9827582a04abded1f 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: function `unexported` is private
   --> $DIR/export-import.rs:1:8
    |
 LL | use m::unexported;
-   |        ^^^^^^^^^^ this function is private
+   |        ^^^^^^^^^^ private function
    |
 note: the function `unexported` is defined here
   --> $DIR/export-import.rs:7:5
index f4537a2fb6fae35648298003403e659b365cf1d4..f73bd454d35922495ee755c3d999e1ce1acc3a81 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: enum `Y` is private
   --> $DIR/export-tag-variant.rs:7:26
    |
 LL | fn main() { let z = foo::Y::Y1; }
-   |                          ^ this enum is private
+   |                          ^ private enum
    |
 note: the enum `Y` is defined here
   --> $DIR/export-tag-variant.rs:4:5
index 107f531c09a3a458d1be7724527578aa61ed5f9e..23c29b31c6a8eeb8fb34b6cc073f3b7994e1852f 100644 (file)
@@ -26,7 +26,7 @@ error[E0603]: function `z` is private
   --> $DIR/export.rs:10:18
    |
 LL | fn main() { foo::z(10); }
-   |                  ^ this function is private
+   |                  ^ private function
    |
 note: the function `z` is defined here
   --> $DIR/export.rs:5:5
index d0c073d67a4ee22e77a816c9979775aa2538fb59..9eeb83ae1a73f48252f8d8538b10a29f9db58a7c 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: crate import `core` is private
   --> $DIR/extern-crate-visibility.rs:6:10
    |
 LL | use foo::core::cell;
-   |          ^^^^ this crate import is private
+   |          ^^^^ private crate import
    |
 note: the crate import `core` is defined here
   --> $DIR/extern-crate-visibility.rs:2:5
@@ -14,7 +14,7 @@ error[E0603]: crate import `core` is private
   --> $DIR/extern-crate-visibility.rs:9:10
    |
 LL |     foo::core::cell::Cell::new(0);
-   |          ^^^^ this crate import is private
+   |          ^^^^ private crate import
    |
 note: the crate import `core` is defined here
   --> $DIR/extern-crate-visibility.rs:2:5
index 2aeffc3e5e4575ac809ac5c15ff4417f59c4fd36..19703fc99fd27070c58802df4301adfe2e3483ed 100644 (file)
@@ -2,7 +2,7 @@ error[E0451]: field `secret_uid` of struct `foo::S` is private
   --> $DIR/functional-struct-update-respects-privacy.rs:28:49
    |
 LL |     let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
-   |                                                 ^^^ field `secret_uid` is private
+   |                                                 ^^^ private field
 
 error: aborting due to previous error
 
index 89deef492020d1478d978ff3da4cfcfb6960e273..6d784408016f5c88c6ee4b4eaf201979d97db25b 100644 (file)
@@ -2,7 +2,7 @@ error: type `foo::S` is private
   --> $DIR/fields.rs:15:17
    |
 LL |         let s = S { x: 0 };
-   |                 ^^^^^^^^^^
+   |                 ^^^^^^^^^^ private type
 ...
 LL |     let s = foo::m!(S, x);
    |             ------------- in this macro invocation
@@ -13,7 +13,7 @@ error: type `foo::S` is private
   --> $DIR/fields.rs:16:17
    |
 LL |         let _ = s.x;
-   |                 ^
+   |                 ^ private type
 ...
 LL |     let s = foo::m!(S, x);
    |             ------------- in this macro invocation
@@ -24,7 +24,7 @@ error: type `foo::T` is private
   --> $DIR/fields.rs:18:17
    |
 LL |         let t = T(0);
-   |                 ^^^^
+   |                 ^^^^ private type
 ...
 LL |     let s = foo::m!(S, x);
    |             ------------- in this macro invocation
@@ -35,7 +35,7 @@ error: type `foo::T` is private
   --> $DIR/fields.rs:19:17
    |
 LL |         let _ = t.0;
-   |                 ^
+   |                 ^ private type
 ...
 LL |     let s = foo::m!(S, x);
    |             ------------- in this macro invocation
index 85ee9f4cbf3e6be84750a592ad74e7655e4bf350..8ac59263cf21a247d029aee8a80a0000ce45aed3 100644 (file)
@@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r foo::S) {foo::S::f}` is private
   --> $DIR/impl_items.rs:12:23
    |
 LL |         let _: () = S.f();
-   |                       ^
+   |                       ^ private type
 ...
 LL |     foo::m!();
    |     ---------- in this macro invocation
index 3912ca337fbeca75680af31e587db4590e99c16e..c27ba74a263e01b858f60d1971a76d4db98412b8 100644 (file)
@@ -2,7 +2,7 @@ error: type `fn() -> u32 {intercrate::foo::bar::f}` is private
   --> $DIR/intercrate.rs:10:16
    |
 LL |     assert_eq!(intercrate::foo::m!(), 1);
-   |                ^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^^^^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
index 0649dc0ec58366f015b782d6cdc1f116ee46d406..70a24304dda3338dcb73714bc0247566e0560249 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: function `f` is private
   --> $DIR/privacy.rs:16:14
    |
 LL |         foo::f()
-   |              ^ this function is private
+   |              ^ private function
    |
 note: the function `f` is defined here
   --> $DIR/privacy.rs:4:5
index 45a2efebbb8dad8afeef17abdaf941adc6044983..024ce8207601e9db8c01e33b9d85d12976659e3e 100644 (file)
@@ -8,13 +8,23 @@ error[E0423]: expected value, found macro `semitransparent`
   --> $DIR/rustc-macro-transparency.rs:29:5
    |
 LL |     semitransparent;
-   |     ^^^^^^^^^^^^^^^ help: use `!` to invoke the macro: `semitransparent!`
+   |     ^^^^^^^^^^^^^^^
+   |
+help: use `!` to invoke the macro
+   |
+LL |     semitransparent!;
+   |                    ^
 
 error[E0423]: expected value, found macro `opaque`
   --> $DIR/rustc-macro-transparency.rs:30:5
    |
 LL |     opaque;
-   |     ^^^^^^ help: use `!` to invoke the macro: `opaque!`
+   |     ^^^^^^
+   |
+help: use `!` to invoke the macro
+   |
+LL |     opaque!;
+   |           ^
 
 error: aborting due to 3 previous errors
 
index 5219ffacd15c077e8a015623488adf92664f8f5c..797712e2db99e92f0af176e0a94f534fe1579eae 100644 (file)
@@ -17,7 +17,7 @@ error[E0603]: unresolved item import `foo` is private
   --> $DIR/import.rs:15:10
    |
 LL |     zed::foo();
-   |          ^^^ this unresolved item import is private
+   |          ^^^ private unresolved item import
    |
 note: the unresolved item import `foo` is defined here
   --> $DIR/import.rs:10:9
index 490c08446b5a800d8d4ec4416d09b39f88466fcd..5adbc4b66d1336ba5270b7dbf0fd89faadccd9ff 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: struct import `ParseOptions` is private
   --> $DIR/issue-55884-2.rs:12:17
    |
 LL | pub use parser::ParseOptions;
-   |                 ^^^^^^^^^^^^ this struct import is private
+   |                 ^^^^^^^^^^^^ private struct import
    |
 note: the struct import `ParseOptions` is defined here...
   --> $DIR/issue-55884-2.rs:9:9
index d63fbc7ec6781d6c378f7e6e6a60d7dc31c734f9..79c8e1130c87afe576e2fa9d5408713350892ad8 100644 (file)
@@ -14,7 +14,7 @@ error[E0603]: module import `foo` is private
   --> $DIR/reexports.rs:33:15
    |
 LL |     use b::a::foo::S;
-   |               ^^^ this module import is private
+   |               ^^^ private module import
    |
 note: the module import `foo` is defined here...
   --> $DIR/reexports.rs:21:17
@@ -31,7 +31,7 @@ error[E0603]: module import `foo` is private
   --> $DIR/reexports.rs:34:15
    |
 LL |     use b::b::foo::S as T;
-   |               ^^^ this module import is private
+   |               ^^^ private module import
    |
 note: the module import `foo` is defined here...
   --> $DIR/reexports.rs:26:17
index 69765b9227d6e03f3e739d63abd37b6f37ca3d4a..ddf3608933909d7f6bfb6d28f360aa3b0e05624c 100644 (file)
@@ -38,7 +38,7 @@ error[E0603]: function `quz` is private
   --> $DIR/unresolved-imports-used.rs:9:10
    |
 LL | use qux::quz;
-   |          ^^^ this function is private
+   |          ^^^ private function
    |
 note: the function `quz` is defined here
   --> $DIR/unresolved-imports-used.rs:5:4
index 4ed7028c0a06b550c436b25cecf4a51d6863f8b9..f1da33eaba1c35062393659f1a8139033deda121 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: struct `S` is private
   --> $DIR/issue-10545.rs:6:14
    |
 LL | fn foo(_: a::S) {
-   |              ^ this struct is private
+   |              ^ private struct
    |
 note: the struct `S` is defined here
   --> $DIR/issue-10545.rs:2:5
index bfb4d31323b13c1ca85653e698ff8bdf6314b958..aa9768b1885a23c13915d5ef0683769aa3c96552 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: trait `Foo` is private
   --> $DIR/issue-11593.rs:7:24
    |
 LL | impl private_trait_xc::Foo for Bar {}
-   |                        ^^^ this trait is private
+   |                        ^^^ private trait
    |
 note: the trait `Foo` is defined here
   --> $DIR/auxiliary/private-trait-xc.rs:1:1
index 898ac10f7d9a92587f28812df1247ba695bcb686..ea224af8ed7e246a9c2dde58e04448ba3bec9066 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: enum `Foo` is private
   --> $DIR/issue-11680.rs:6:21
    |
 LL |     let _b = other::Foo::Bar(1);
-   |                     ^^^ this enum is private
+   |                     ^^^ private enum
    |
 note: the enum `Foo` is defined here
   --> $DIR/auxiliary/issue-11680.rs:1:1
@@ -14,7 +14,7 @@ error[E0603]: enum `Foo` is private
   --> $DIR/issue-11680.rs:9:27
    |
 LL |     let _b = other::test::Foo::Bar(1);
-   |                           ^^^ this enum is private
+   |                           ^^^ private enum
    |
 note: the enum `Foo` is defined here
   --> $DIR/auxiliary/issue-11680.rs:6:5
index f211d623ab12bd4a975c279c392048207740c1b2..f30b6cdeaf073d4686258b481b26906481513544 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: unit struct `C` is private
   --> $DIR/issue-13407.rs:6:8
    |
 LL |     A::C = 1;
-   |        ^ this unit struct is private
+   |        ^ private unit struct
    |
 note: the unit struct `C` is defined here
   --> $DIR/issue-13407.rs:2:5
index f90cb18b6fc9d0d7e91a374369fc0c21b9282732..cdd0772d39fb04625891a318375c095c803db37f 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: struct `Foo` is private
   --> $DIR/issue-13641.rs:9:8
    |
 LL |     a::Foo::new();
-   |        ^^^ this struct is private
+   |        ^^^ private struct
    |
 note: the struct `Foo` is defined here
   --> $DIR/issue-13641.rs:2:5
@@ -14,7 +14,7 @@ error[E0603]: enum `Bar` is private
   --> $DIR/issue-13641.rs:11:8
    |
 LL |     a::Bar::new();
-   |        ^^^ this enum is private
+   |        ^^^ private enum
    |
 note: the enum `Bar` is defined here
   --> $DIR/issue-13641.rs:4:5
index e0a1ca8a5ac319347fcae50dcf6c9b8ff7234449..84359803bbae7c7ceb0d4a0e78f20b218a4b2e53 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: function `bar` is private
   --> $DIR/issue-16725.rs:6:19
    |
 LL |     unsafe { foo::bar(); }
-   |                   ^^^ this function is private
+   |                   ^^^ private function
    |
 note: the function `bar` is defined here
   --> $DIR/auxiliary/issue-16725.rs:2:5
index 07d825ba9cb3b2c490b8bee72e5a806f56b7563a..d4595be749034b5a7d774299998500ad71422459 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: constant `B` is private
   --> $DIR/issue-17718-const-privacy.rs:5:8
    |
 LL | use a::B;
-   |        ^ this constant is private
+   |        ^ private constant
    |
 note: the constant `B` is defined here
   --> $DIR/issue-17718-const-privacy.rs:13:5
@@ -14,7 +14,7 @@ error[E0603]: constant `BAR` is private
   --> $DIR/issue-17718-const-privacy.rs:8:5
    |
 LL |     BAR,
-   |     ^^^ this constant is private
+   |     ^^^ private constant
    |
 note: the constant `BAR` is defined here
   --> $DIR/auxiliary/issue-17718-const-privacy.rs:4:1
index 18669add20551fd7d70be53dea61f981ed9c2c26..421ed0a5a9389f9a6304c0d10e5c459261e7ea1c 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private
   --> $DIR/issue-21202.rs:10:9
    |
 LL |         Foo::foo(&f);
-   |         ^^^^^^^^
+   |         ^^^^^^^^ private associated function
 
 error: aborting due to previous error
 
index 58bd775f295fc61a1e6e9126cade57d32e3e683b..1afaf622be7da3557ddc76aed7ea989b6a9f1cd6 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `n` is private
   --> $DIR/issue-28388-2.rs:7:8
    |
 LL | use m::n::{};
-   |        ^ this module is private
+   |        ^ private module
    |
 note: the module `n` is defined here
   --> $DIR/issue-28388-2.rs:4:5
index 1bfa211ef796263cda34427c9677ed953b982cf2..7ce95e4b0df8b616cbff95907ec6223631a9c230 100644 (file)
@@ -8,7 +8,7 @@ error[E0603]: struct `A` is private
   --> $DIR/issue-29161.rs:13:8
    |
 LL |     a::A::default();
-   |        ^ this struct is private
+   |        ^ private struct
    |
 note: the struct `A` is defined here
   --> $DIR/issue-29161.rs:2:5
index dab8f40015621f641667d23ddc8b5310b3d6159d..b63967bb9dce3e9819ba5638b7f02a7572f746b0 100644 (file)
@@ -14,13 +14,13 @@ error[E0624]: associated function `happyfun` is private
   --> $DIR/issue-3763.rs:24:18
    |
 LL |     (&my_struct).happyfun();
-   |                  ^^^^^^^^
+   |                  ^^^^^^^^ private associated function
 
 error[E0624]: associated function `happyfun` is private
   --> $DIR/issue-3763.rs:26:27
    |
 LL |     (Box::new(my_struct)).happyfun();
-   |                           ^^^^^^^^
+   |                           ^^^^^^^^ private associated function
 
 error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private
   --> $DIR/issue-3763.rs:27:26
index ba0f1336ff09d79c0fc20142d11d6e6a22d2bd6d..1a287e94bafd3d51cb7caaaa50bc29ba2c1a0910 100644 (file)
@@ -8,7 +8,7 @@ error[E0603]: module `sys` is private
   --> $DIR/issue-38857.rs:7:18
    |
 LL |     let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
-   |                  ^^^ this module is private
+   |                  ^^^ private module
    |
 note: the module `sys` is defined here
   --> $SRC_DIR/libstd/lib.rs:LL:COL
index 3fa8ed4af28fa3b43a8ffdd3256f0f5ee54d033c..deecf7a9d752ca3e938f715abb759a06b120d2b4 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: function `fly` is private
   --> $DIR/issue-3993.rs:1:10
    |
 LL | use zoo::fly;
-   |          ^^^ this function is private
+   |          ^^^ private function
    |
 note: the function `fly` is defined here
   --> $DIR/issue-3993.rs:4:5
index 042848c27bbdc083c1d8338a6ef106184d039b68..973e6c12aa151480c747759cc8f1ea78df3fbe3b 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private
   --> $DIR/issue-53498.rs:16:5
    |
 LL |     test::Foo::<test::B>::foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
 
 error: aborting due to previous error
 
index c53a09aad5783ed21b1998805dcdd3002eb171f0..3092d76c268adaa36f009d7a2d46e913525b9061 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: constant `baz` is private
   --> $DIR/macro-local-data-key-priv.rs:8:10
    |
 LL |     bar::baz.with(|_| ());
-   |          ^^^ this constant is private
+   |          ^^^ private constant
    |
 note: the constant `baz` is defined here
   --> $DIR/macro-local-data-key-priv.rs:4:5
index 4ff96532e03a82d1fc9330f8fd2de093c5c95e7f..1c5613ac986c438f1f71f4affa08790700fb63b6 100644 (file)
@@ -14,7 +14,7 @@ error[E0603]: static `x` is private
   --> $DIR/pub-item-macro.rs:20:23
    |
 LL |     let y: u32 = foo::x;
-   |                       ^ this static is private
+   |                       ^ private static
    |
 note: the static `x` is defined here
   --> $DIR/pub-item-macro.rs:5:9
index 88561568ea5a40ba5ae5ae9fa4dddf812690183c..1e94e7c620d033d93ae001d967ce1c65b069e3ad 100644 (file)
@@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is p
   --> $DIR/associated-item-privacy-inherent.rs:13:21
    |
 LL |         let value = Pub::method;
-   |                     ^^^^^^^^^^^
+   |                     ^^^^^^^^^^^ private type
 ...
 LL |     priv_nominal::mac!();
    |     --------------------- in this macro invocation
@@ -13,7 +13,7 @@ error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is p
   --> $DIR/associated-item-privacy-inherent.rs:15:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_nominal::mac!();
    |     --------------------- in this macro invocation
@@ -24,7 +24,7 @@ error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is p
   --> $DIR/associated-item-privacy-inherent.rs:17:13
    |
 LL |         Pub.method();
-   |             ^^^^^^
+   |             ^^^^^^ private type
 ...
 LL |     priv_nominal::mac!();
    |     --------------------- in this macro invocation
@@ -35,7 +35,7 @@ error: associated constant `CONST` is private
   --> $DIR/associated-item-privacy-inherent.rs:19:9
    |
 LL |         Pub::CONST;
-   |         ^^^^^^^^^^
+   |         ^^^^^^^^^^ private associated constant
 ...
 LL |     priv_nominal::mac!();
    |     --------------------- in this macro invocation
@@ -46,7 +46,7 @@ error: type `priv_signature::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:37:21
    |
 LL |         let value = Pub::method;
-   |                     ^^^^^^^^^^^
+   |                     ^^^^^^^^^^^ private type
 ...
 LL |     priv_signature::mac!();
    |     ----------------------- in this macro invocation
@@ -57,7 +57,7 @@ error: type `priv_signature::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:39:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_signature::mac!();
    |     ----------------------- in this macro invocation
@@ -68,7 +68,7 @@ error: type `priv_signature::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:41:13
    |
 LL |         Pub.method(loop {});
-   |             ^^^^^^
+   |             ^^^^^^ private type
 ...
 LL |     priv_signature::mac!();
    |     ----------------------- in this macro invocation
@@ -79,7 +79,7 @@ error: type `priv_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:57:21
    |
 LL |         let value = Pub::method::<Priv>;
-   |                     ^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_substs::mac!();
    |     -------------------- in this macro invocation
@@ -90,7 +90,7 @@ error: type `priv_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:59:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_substs::mac!();
    |     -------------------- in this macro invocation
@@ -101,7 +101,7 @@ error: type `priv_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:61:9
    |
 LL |         Pub.method::<Priv>();
-   |         ^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_substs::mac!();
    |     -------------------- in this macro invocation
@@ -112,7 +112,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:80:21
    |
 LL |         let value = <Pub>::method;
-   |                     ^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -123,7 +123,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:82:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -134,7 +134,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:84:21
    |
 LL |         let value = Pub::method;
-   |                     ^^^^^^^^^^^
+   |                     ^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -145,7 +145,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:86:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -156,7 +156,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:88:21
    |
 LL |         let value = <Pub>::static_method;
-   |                     ^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -167,7 +167,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:90:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -178,7 +178,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:92:21
    |
 LL |         let value = Pub::static_method;
-   |                     ^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -189,7 +189,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:94:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -200,7 +200,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:96:19
    |
 LL |         Pub(Priv).method();
-   |                   ^^^^^^
+   |                   ^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -211,7 +211,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:99:10
    |
 LL |         <Pub>::CONST;
-   |          ^^^
+   |          ^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -222,7 +222,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:101:9
    |
 LL |         Pub::CONST;
-   |         ^^^^^^^^^^
+   |         ^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
index db24e425a01f694e949b22ba697ac53cae5399f1..c30cc947d450869bbe4d19437d5cfbafd2e3eca6 100644 (file)
@@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as priv_trait::Pr
   --> $DIR/associated-item-privacy-trait.rs:17:21
    |
 LL |         let value = <Pub as PrivTr>::method;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -13,7 +13,7 @@ error: type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as priv_trait::Pr
   --> $DIR/associated-item-privacy-trait.rs:19:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -24,7 +24,7 @@ error: type `for<'r> fn(&'r Self) {<Self as priv_trait::PrivTr>::method}` is pri
   --> $DIR/associated-item-privacy-trait.rs:21:13
    |
 LL |         Pub.method();
-   |             ^^^^^^
+   |             ^^^^^^ private type
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -35,7 +35,7 @@ error: associated constant `PrivTr::CONST` is private
   --> $DIR/associated-item-privacy-trait.rs:23:9
    |
 LL |         <Pub as PrivTr>::CONST;
-   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^ private associated constant
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -46,7 +46,7 @@ error: associated type `PrivTr::AssocTy` is private
   --> $DIR/associated-item-privacy-trait.rs:25:16
    |
 LL |         let _: <Pub as PrivTr>::AssocTy;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^ private associated type
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -57,7 +57,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-trait.rs:27:34
    |
 LL |         pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -68,7 +68,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-trait.rs:29:34
    |
 LL |         pub trait InSignatureTr: PrivTr {}
-   |                                  ^^^^^^
+   |                                  ^^^^^^ private trait
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -79,7 +79,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-trait.rs:31:14
    |
 LL |         impl PrivTr for u8 {}
-   |              ^^^^^^
+   |              ^^^^^^ private trait
 ...
 LL |     priv_trait::mac!();
    |     ------------------- in this macro invocation
@@ -90,7 +90,7 @@ error: type `priv_signature::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:48:21
    |
 LL |         let value = <Pub as PubTr>::method;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_signature::mac!();
    |     ----------------------- in this macro invocation
@@ -101,7 +101,7 @@ error: type `priv_signature::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:50:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_signature::mac!();
    |     ----------------------- in this macro invocation
@@ -112,7 +112,7 @@ error: type `priv_signature::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:52:13
    |
 LL |         Pub.method(loop {});
-   |             ^^^^^^
+   |             ^^^^^^ private type
 ...
 LL |     priv_signature::mac!();
    |     ----------------------- in this macro invocation
@@ -123,7 +123,7 @@ error: type `priv_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:69:21
    |
 LL |         let value = <Pub as PubTr>::method::<Priv>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_substs::mac!();
    |     -------------------- in this macro invocation
@@ -134,7 +134,7 @@ error: type `priv_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:71:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_substs::mac!();
    |     -------------------- in this macro invocation
@@ -145,7 +145,7 @@ error: type `priv_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:73:9
    |
 LL |         Pub.method::<Priv>();
-   |         ^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_substs::mac!();
    |     -------------------- in this macro invocation
@@ -156,7 +156,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:93:21
    |
 LL |         let value = <Pub as PubTr>::method;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -167,7 +167,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:95:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -178,7 +178,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:97:21
    |
 LL |         let value = <Pub as PubTr<_>>::method;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -189,7 +189,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:99:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -200,7 +200,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:101:9
    |
 LL |         Pub.method();
-   |         ^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -211,7 +211,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:104:21
    |
 LL |         let value = <Priv as PubTr<_>>::method;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -222,7 +222,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:106:9
    |
 LL |         value;
-   |         ^^^^^
+   |         ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -233,7 +233,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:108:9
    |
 LL |         Priv.method();
-   |         ^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -244,7 +244,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:111:9
    |
 LL |         <Pub as PubTr>::CONST;
-   |         ^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -255,7 +255,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:113:9
    |
 LL |         <Pub as PubTr<_>>::CONST;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -266,7 +266,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:115:9
    |
 LL |         <Priv as PubTr<_>>::CONST;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -277,7 +277,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:119:30
    |
 LL |         let _: <Pub as PubTr<_>>::AssocTy;
-   |                              ^
+   |                              ^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -288,7 +288,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:121:17
    |
 LL |         let _: <Priv as PubTr<_>>::AssocTy;
-   |                 ^^^^
+   |                 ^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -299,7 +299,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:124:35
    |
 LL |         pub type InSignatureTy1 = <Pub as PubTr>::AssocTy;
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -310,7 +310,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:126:35
    |
 LL |         pub type InSignatureTy2 = <Priv as PubTr<Pub>>::AssocTy;
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -321,7 +321,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-trait.rs:128:14
    |
 LL |         impl PubTr for u8 {}
-   |              ^^^^^
+   |              ^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
index fd8b8cf0db652d2f6baefd894fedcefb590d2c29..d8515ccb66920e1d4180c2d7af4f5c855bc1c5c7 100644 (file)
@@ -2,7 +2,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:11:13
    |
 LL |         let _: Box<dyn PubTr<AssocTy = u8>>;
-   |             ^
+   |             ^ private trait
 ...
 LL |     priv_trait::mac1!();
    |     -------------------- in this macro invocation
@@ -13,7 +13,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:11:16
    |
 LL |         let _: Box<dyn PubTr<AssocTy = u8>>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac1!();
    |     -------------------- in this macro invocation
@@ -24,7 +24,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:14:31
    |
 LL |         type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>;
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac1!();
    |     -------------------- in this macro invocation
@@ -35,7 +35,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:16:31
    |
 LL |         trait InSignatureTr2: PubTr<AssocTy = u8> {}
-   |                               ^^^^^^^^^^^^^^^^^^^
+   |                               ^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac1!();
    |     -------------------- in this macro invocation
@@ -46,7 +46,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:20:13
    |
 LL |         let _: Box<dyn PrivTr<AssocTy = u8>>;
-   |             ^
+   |             ^ private trait
 ...
 LL |     priv_trait::mac2!();
    |     -------------------- in this macro invocation
@@ -57,7 +57,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:20:16
    |
 LL |         let _: Box<dyn PrivTr<AssocTy = u8>>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac2!();
    |     -------------------- in this macro invocation
@@ -68,7 +68,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:23:31
    |
 LL |         type InSignatureTy1 = Box<dyn PrivTr<AssocTy = u8>>;
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac2!();
    |     -------------------- in this macro invocation
@@ -79,7 +79,7 @@ error: trait `priv_trait::PrivTr` is private
   --> $DIR/associated-item-privacy-type-binding.rs:25:31
    |
 LL |         trait InSignatureTr1: PrivTr<AssocTy = u8> {}
-   |                               ^^^^^^^^^^^^^^^^^^^^
+   |                               ^^^^^^^^^^^^^^^^^^^^ private trait
 ...
 LL |     priv_trait::mac2!();
    |     -------------------- in this macro invocation
@@ -90,7 +90,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:44:13
    |
 LL |         let _: Box<dyn PubTrWithParam<AssocTy = u8>>;
-   |             ^
+   |             ^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -101,7 +101,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:44:16
    |
 LL |         let _: Box<dyn PubTrWithParam<AssocTy = u8>>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -112,7 +112,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:47:13
    |
 LL |         let _: Box<dyn PubTr<AssocTy = u8>>;
-   |             ^
+   |             ^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -123,7 +123,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:47:16
    |
 LL |         let _: Box<dyn PubTr<AssocTy = u8>>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -134,7 +134,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:50:35
    |
 LL |         pub type InSignatureTy1 = Box<dyn PubTrWithParam<AssocTy = u8>>;
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -145,7 +145,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:52:35
    |
 LL |         pub type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>;
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -156,7 +156,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:54:31
    |
 LL |         trait InSignatureTr1: PubTrWithParam<AssocTy = u8> {}
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
@@ -167,7 +167,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-type-binding.rs:56:31
    |
 LL |         trait InSignatureTr2: PubTr<AssocTy = u8> {}
-   |                               ^^^^^^^^^^^^^^^^^^^
+   |                               ^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
index ae2e1b4b644a384b38348d48d90fd2b43f6cae60..5bc6f07fffac3e95d4687617ad14af7d2b43b94d 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: macro `mac` is private
   --> $DIR/decl-macro.rs:8:8
    |
 LL |     m::mac!();
-   |        ^^^ this macro is private
+   |        ^^^ private macro
    |
 note: the macro `mac` is defined here
   --> $DIR/decl-macro.rs:4:5
index 8860d8f15f7488a2e3e1a5f77db6cdc63e8e51c0..2eb3ebb51c20a2ea69ee288dd3ec2b42fcded4ea 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `bar` is private
   --> $DIR/privacy-in-paths.rs:24:16
    |
 LL |         ::foo::bar::baz::f();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `bar` is defined here
   --> $DIR/privacy-in-paths.rs:3:5
@@ -14,7 +14,7 @@ error[E0603]: module `bar` is private
   --> $DIR/privacy-in-paths.rs:25:16
    |
 LL |         ::foo::bar::S::f();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `bar` is defined here
   --> $DIR/privacy-in-paths.rs:3:5
@@ -26,7 +26,7 @@ error[E0603]: trait `T` is private
   --> $DIR/privacy-in-paths.rs:26:23
    |
 LL |         <() as ::foo::T>::Assoc::f();
-   |                       ^ this trait is private
+   |                       ^ private trait
    |
 note: the trait `T` is defined here
   --> $DIR/privacy-in-paths.rs:8:5
index 8b12109b3730747f5ca7c548fd1422ad550072c2..0c826147a1ca7df46628890d4db9ef3a844dd813 100644 (file)
@@ -58,7 +58,7 @@ error[E0603]: trait `Bar` is private
   --> $DIR/privacy-ns2.rs:63:15
    |
 LL |     use foo3::Bar;
-   |               ^^^ this trait is private
+   |               ^^^ private trait
    |
 note: the trait `Bar` is defined here
   --> $DIR/privacy-ns2.rs:55:5
@@ -70,7 +70,7 @@ error[E0603]: trait `Bar` is private
   --> $DIR/privacy-ns2.rs:67:15
    |
 LL |     use foo3::Bar;
-   |               ^^^ this trait is private
+   |               ^^^ private trait
    |
 note: the trait `Bar` is defined here
   --> $DIR/privacy-ns2.rs:55:5
@@ -82,7 +82,7 @@ error[E0603]: trait `Bar` is private
   --> $DIR/privacy-ns2.rs:74:16
    |
 LL |     use foo3::{Bar,Baz};
-   |                ^^^ this trait is private
+   |                ^^^ private trait
    |
 note: the trait `Bar` is defined here
   --> $DIR/privacy-ns2.rs:55:5
index 08640b802a244990320ef68fe24cf75d80ed217f..e93a458ce6cb6889caafc55cc8529461927a1945 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: trait `Bar` is private
   --> $DIR/privacy-ufcs.rs:12:20
    |
 LL |     <i32 as ::foo::Bar>::baz();
-   |                    ^^^ this trait is private
+   |                    ^^^ private trait
    |
 note: the trait `Bar` is defined here
   --> $DIR/privacy-ufcs.rs:4:5
index ec2bc0d84ac0e32c82130d90b17131df24f028b3..fee6f8d5639f52cfa3565b03e9cad844439c2ed0 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:132:18
    |
 LL |         use bar::baz::{foo, bar};
-   |                  ^^^ this module is private
+   |                  ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -14,7 +14,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:132:18
    |
 LL |         use bar::baz::{foo, bar};
-   |                  ^^^ this module is private
+   |                  ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -26,7 +26,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:141:18
    |
 LL |         use bar::baz;
-   |                  ^^^ this module is private
+   |                  ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -38,7 +38,7 @@ error[E0603]: module `i` is private
   --> $DIR/privacy1.rs:165:20
    |
 LL |     use self::foo::i::A;
-   |                    ^ this module is private
+   |                    ^ private module
    |
 note: the module `i` is defined here
   --> $DIR/privacy1.rs:170:9
@@ -50,7 +50,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:104:16
    |
 LL |         ::bar::baz::A::foo();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -62,7 +62,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:105:16
    |
 LL |         ::bar::baz::A::bar();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -74,7 +74,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:107:16
    |
 LL |         ::bar::baz::A.foo2();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -86,7 +86,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:108:16
    |
 LL |         ::bar::baz::A.bar2();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -98,7 +98,7 @@ error[E0603]: trait `B` is private
   --> $DIR/privacy1.rs:112:16
    |
 LL |         ::bar::B::foo();
-   |                ^ this trait is private
+   |                ^ private trait
    |
 note: the trait `B` is defined here
   --> $DIR/privacy1.rs:40:5
@@ -110,7 +110,7 @@ error[E0603]: function `epriv` is private
   --> $DIR/privacy1.rs:118:20
    |
 LL |             ::bar::epriv();
-   |                    ^^^^^ this function is private
+   |                    ^^^^^ private function
    |
 note: the function `epriv` is defined here
   --> $DIR/privacy1.rs:65:9
@@ -122,7 +122,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:127:16
    |
 LL |         ::bar::baz::foo();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -134,7 +134,7 @@ error[E0603]: module `baz` is private
   --> $DIR/privacy1.rs:128:16
    |
 LL |         ::bar::baz::bar();
-   |                ^^^ this module is private
+   |                ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -146,7 +146,7 @@ error[E0603]: trait `B` is private
   --> $DIR/privacy1.rs:157:17
    |
 LL |     impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
-   |                 ^ this trait is private
+   |                 ^ private trait
    |
 note: the trait `B` is defined here
   --> $DIR/privacy1.rs:40:5
@@ -158,31 +158,31 @@ error[E0624]: associated function `bar` is private
   --> $DIR/privacy1.rs:77:9
    |
 LL |         self::baz::A::bar();
-   |         ^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^ private associated function
 
 error[E0624]: associated function `bar` is private
   --> $DIR/privacy1.rs:95:5
    |
 LL |     bar::A::bar();
-   |     ^^^^^^^^^^^
+   |     ^^^^^^^^^^^ private associated function
 
 error[E0624]: associated function `bar` is private
   --> $DIR/privacy1.rs:102:9
    |
 LL |         ::bar::A::bar();
-   |         ^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^ private associated function
 
 error[E0624]: associated function `bar` is private
   --> $DIR/privacy1.rs:105:9
    |
 LL |         ::bar::baz::A::bar();
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^ private associated function
 
 error[E0624]: associated function `bar2` is private
   --> $DIR/privacy1.rs:108:23
    |
 LL |         ::bar::baz::A.bar2();
-   |                       ^^^^
+   |                       ^^^^ private associated function
 
 error: aborting due to 18 previous errors
 
index b10c3a5265971c6ce14fedcf765f92c267486dbf..c2a33ce1f59b38549e5fd6196863f26ff25481ea 100644 (file)
@@ -8,7 +8,7 @@ error[E0603]: function import `foo` is private
   --> $DIR/privacy2.rs:23:20
    |
 LL |     use bar::glob::foo;
-   |                    ^^^ this function import is private
+   |                    ^^^ private function import
    |
 note: the function import `foo` is defined here...
   --> $DIR/privacy2.rs:10:13
index e34b2d5049b9ef960d8315f21cbf30aaaa13e91c..7552fa71a3a3a664e5feceddabd0a0f0050ee0a7 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `glob` is private
   --> $DIR/privacy4.rs:21:14
    |
 LL |     use bar::glob::gpriv;
-   |              ^^^^ this module is private
+   |              ^^^^ private module
    |
 note: the module `glob` is defined here
   --> $DIR/privacy4.rs:13:5
index 197a857cc3dc435bbc8d6e033378a769bd0d1430..216abfc68b812c41b5e40eaadd2803d418c9795a 100644 (file)
@@ -5,7 +5,7 @@ LL |     pub struct A(());
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     let a = a::A(());
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    |
 note: the tuple struct constructor `A` is defined here
   --> $DIR/privacy5.rs:6:5
@@ -20,7 +20,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     let b = a::B(2);
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -35,7 +35,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     let c = a::C(2, 3);
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -50,7 +50,7 @@ LL |     pub struct A(());
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     let a::A(()) = a;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `A` is defined here
   --> $DIR/privacy5.rs:6:5
@@ -65,7 +65,7 @@ LL |     pub struct A(());
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     let a::A(_) = a;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `A` is defined here
   --> $DIR/privacy5.rs:6:5
@@ -80,7 +80,7 @@ LL |     pub struct A(());
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     match a { a::A(()) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `A` is defined here
   --> $DIR/privacy5.rs:6:5
@@ -95,7 +95,7 @@ LL |     pub struct A(());
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     match a { a::A(_) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `A` is defined here
   --> $DIR/privacy5.rs:6:5
@@ -110,7 +110,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     let a::B(_) = b;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -125,7 +125,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     let a::B(_b) = b;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -140,7 +140,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     match b { a::B(_) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -155,7 +155,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     match b { a::B(_b) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -170,7 +170,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     match b { a::B(1) => {} a::B(_) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -185,7 +185,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     match b { a::B(1) => {} a::B(_) => {} }
-   |                                ^ this tuple struct constructor is private
+   |                                ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -200,7 +200,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     let a::C(_, _) = c;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -215,7 +215,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     let a::C(_a, _) = c;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -230,7 +230,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     let a::C(_, _b) = c;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -245,7 +245,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     let a::C(_a, _b) = c;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -260,7 +260,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     match c { a::C(_, _) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -275,7 +275,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     match c { a::C(_a, _) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -290,7 +290,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     match c { a::C(_, _b) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -305,7 +305,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     match c { a::C(_a, _b) => {} }
-   |                  ^ this tuple struct constructor is private
+   |                  ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -320,7 +320,7 @@ LL |     pub struct A(());
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     let a2 = a::A;
-   |                 ^ this tuple struct constructor is private
+   |                 ^ private tuple struct constructor
    |
 note: the tuple struct constructor `A` is defined here
   --> $DIR/privacy5.rs:6:5
@@ -335,7 +335,7 @@ LL |     pub struct B(isize);
    |                  ----- a constructor is private if any of the fields is private
 ...
 LL |     let b2 = a::B;
-   |                 ^ this tuple struct constructor is private
+   |                 ^ private tuple struct constructor
    |
 note: the tuple struct constructor `B` is defined here
   --> $DIR/privacy5.rs:7:5
@@ -350,7 +350,7 @@ LL |     pub struct C(pub isize, isize);
    |                  ---------------- a constructor is private if any of the fields is private
 ...
 LL |     let c2 = a::C;
-   |                 ^ this tuple struct constructor is private
+   |                 ^ private tuple struct constructor
    |
 note: the tuple struct constructor `C` is defined here
   --> $DIR/privacy5.rs:8:5
@@ -362,7 +362,7 @@ error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:90:20
    |
 LL |     let a = other::A(());
-   |                    ^ this tuple struct constructor is private
+   |                    ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
    |
@@ -379,7 +379,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:91:20
    |
 LL |     let b = other::B(2);
-   |                    ^ this tuple struct constructor is private
+   |                    ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -396,7 +396,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:92:20
    |
 LL |     let c = other::C(2, 3);
-   |                    ^ this tuple struct constructor is private
+   |                    ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -413,7 +413,7 @@ error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:95:16
    |
 LL |     let other::A(()) = a;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
    |
@@ -430,7 +430,7 @@ error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:96:16
    |
 LL |     let other::A(_) = a;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
    |
@@ -447,7 +447,7 @@ error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:97:22
    |
 LL |     match a { other::A(()) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
    |
@@ -464,7 +464,7 @@ error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:98:22
    |
 LL |     match a { other::A(_) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
    |
@@ -481,7 +481,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:100:16
    |
 LL |     let other::B(_) = b;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -498,7 +498,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:101:16
    |
 LL |     let other::B(_b) = b;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -515,7 +515,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:102:22
    |
 LL |     match b { other::B(_) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -532,7 +532,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:103:22
    |
 LL |     match b { other::B(_b) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -549,7 +549,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:104:22
    |
 LL |     match b { other::B(1) => {}
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -566,7 +566,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:105:16
    |
 LL |         other::B(_) => {} }
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -583,7 +583,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:107:16
    |
 LL |     let other::C(_, _) = c;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -600,7 +600,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:108:16
    |
 LL |     let other::C(_a, _) = c;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -617,7 +617,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:109:16
    |
 LL |     let other::C(_, _b) = c;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -634,7 +634,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:110:16
    |
 LL |     let other::C(_a, _b) = c;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -651,7 +651,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:111:22
    |
 LL |     match c { other::C(_, _) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -668,7 +668,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:112:22
    |
 LL |     match c { other::C(_a, _) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -685,7 +685,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:113:22
    |
 LL |     match c { other::C(_, _b) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -702,7 +702,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:114:22
    |
 LL |     match c { other::C(_a, _b) => {} }
-   |                      ^ this tuple struct constructor is private
+   |                      ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
@@ -719,7 +719,7 @@ error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:122:21
    |
 LL |     let a2 = other::A;
-   |                     ^ this tuple struct constructor is private
+   |                     ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
    |
@@ -736,7 +736,7 @@ error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:123:21
    |
 LL |     let b2 = other::B;
-   |                     ^ this tuple struct constructor is private
+   |                     ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
    |
@@ -753,7 +753,7 @@ error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:124:21
    |
 LL |     let c2 = other::C;
-   |                     ^ this tuple struct constructor is private
+   |                     ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
    |
index 6833cdb4df9db49f5cca022f5dae33b65e00d06a..444b9180b3f5977334777f201560760d100b870b 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private
   --> $DIR/private-impl-method.rs:20:7
    |
 LL |     s.foo();
-   |       ^^^
+   |       ^^^ private associated function
 
 error: aborting due to previous error
 
index 2db49257226424fad138f7520313007411104320..1b6d143b93217d415182094a3bb47a7dca740048 100644 (file)
@@ -2,7 +2,7 @@ error: trait `m::PrivNonPrincipal` is private
   --> $DIR/private-in-public-non-principal-2.rs:11:5
    |
 LL |     m::leak_dyn_nonprincipal();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
 
 error: aborting due to previous error
 
index 097b8b9a61effb32aecbbbed2b5f76e6d90f9c1d..576498b2cf8ef5ee7dfc4b952c2f3d87c3898375 100644 (file)
@@ -2,13 +2,13 @@ error: type `m::Priv` is private
   --> $DIR/private-inferred-type-1.rs:16:5
    |
 LL |     [].arr0_secret();
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type-1.rs:17:5
    |
 LL |     None.ty_param_secret();
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: aborting due to 2 previous errors
 
index da95cc49241aed365949092191d7c953f81fae05..f19e367ef110e11bdcea480ccb82190bbc8db898 100644 (file)
@@ -2,19 +2,19 @@ error: type `m::Priv` is private
   --> $DIR/private-inferred-type-2.rs:16:5
    |
 LL |     m::Pub::get_priv;
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type-2.rs:17:5
    |
 LL |     m::Pub::static_method;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `ext::Priv` is private
   --> $DIR/private-inferred-type-2.rs:18:5
    |
 LL |     ext::Pub::static_method;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: aborting due to 3 previous errors
 
index 376f1334ff806272b5916c82bcde7047f57cebe1..39ef6472526c3b6916cc743c4d3b19f46bf5300d 100644 (file)
@@ -2,7 +2,7 @@ error: type `fn() {ext::priv_fn}` is private
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -10,7 +10,7 @@ error: static `PRIV_STATIC` is private
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private static
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -18,7 +18,7 @@ error: type `ext::PrivEnum` is private
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -26,7 +26,7 @@ error: type `fn() {<u8 as ext::PrivTrait>::method}` is private
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -34,7 +34,7 @@ error: type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -42,7 +42,7 @@ error: type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -50,7 +50,7 @@ error: type `for<'r> fn(&'r ext::Pub<u8>) {ext::Pub::<u8>::priv_method}` is priv
   --> $DIR/private-inferred-type-3.rs:16:5
    |
 LL |     ext::m!();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
index 48c83c2186591de747ec73ff56d2f87a3e67def0..7d1f794bfe4596fe2191020d6acdc7f8ed719744 100644 (file)
@@ -20,97 +20,97 @@ error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:97:9
    |
 LL |     let _: m::Alias;
-   |         ^
+   |         ^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:97:12
    |
 LL |     let _: m::Alias;
-   |            ^^^^^^^^
+   |            ^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:99:13
    |
 LL |     let _: <m::Alias as m::TraitWithAssocTy>::AssocTy;
-   |             ^^^^^^^^
+   |             ^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:100:5
    |
 LL |     m::Alias {};
-   |     ^^^^^^^^^^^
+   |     ^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:101:5
    |
 LL |     m::Pub { 0: m::Alias {} };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:103:5
    |
 LL |     m::Pub::static_method;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:104:5
    |
 LL |     m::Pub::INHERENT_ASSOC_CONST;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:105:5
    |
 LL |     m::Pub(0u8).method_with_substs::<m::Alias>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:106:17
    |
 LL |     m::Pub(0u8).method_with_priv_params(loop{});
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:107:5
    |
 LL |     <m::Alias as m::TraitWithAssocConst>::TRAIT_ASSOC_CONST;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:108:6
    |
 LL |     <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST;
-   |      ^^^^^^^^^^^^^^^^
+   |      ^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:109:5
    |
 LL |     <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST_GENERIC_SELF;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:110:5
    |
 LL |     <m::Pub<m::Alias>>::static_method_generic_self;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:112:5
    |
 LL |     u8::pub_method;
-   |     ^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^ private type
 
 error: type `adjust::S2` is private
   --> $DIR/private-inferred-type.rs:114:5
    |
 LL |     adjust::S1.method_s3();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^^ private type
 
 error: type `fn() {m::priv_fn}` is private
   --> $DIR/private-inferred-type.rs:39:9
    |
 LL |         priv_fn;
-   |         ^^^^^^^
+   |         ^^^^^^^ private type
 ...
 LL |     m::m!();
    |     -------- in this macro invocation
@@ -121,7 +121,7 @@ error: type `m::PrivEnum` is private
   --> $DIR/private-inferred-type.rs:41:9
    |
 LL |         PrivEnum::Variant;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     m::m!();
    |     -------- in this macro invocation
@@ -132,7 +132,7 @@ error: type `fn() {<u8 as m::PrivTrait>::method}` is private
   --> $DIR/private-inferred-type.rs:43:9
    |
 LL |         <u8 as PrivTrait>::method;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 ...
 LL |     m::m!();
    |     -------- in this macro invocation
@@ -143,7 +143,7 @@ error: type `fn(u8) -> m::PrivTupleStruct {m::PrivTupleStruct}` is private
   --> $DIR/private-inferred-type.rs:45:9
    |
 LL |         PrivTupleStruct;
-   |         ^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^ private type
 ...
 LL |     m::m!();
    |     -------- in this macro invocation
@@ -154,7 +154,7 @@ error: type `fn(u8) -> m::PubTupleStruct {m::PubTupleStruct}` is private
   --> $DIR/private-inferred-type.rs:47:9
    |
 LL |         PubTupleStruct;
-   |         ^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^ private type
 ...
 LL |     m::m!();
    |     -------- in this macro invocation
@@ -165,7 +165,7 @@ error: type `for<'r> fn(&'r m::Pub<u8>) {m::Pub::<u8>::priv_method}` is private
   --> $DIR/private-inferred-type.rs:49:18
    |
 LL |         Pub(0u8).priv_method();
-   |                  ^^^^^^^^^^^
+   |                  ^^^^^^^^^^^ private type
 ...
 LL |     m::m!();
    |     -------- in this macro invocation
@@ -176,61 +176,61 @@ error: trait `m::Trait` is private
   --> $DIR/private-inferred-type.rs:118:5
    |
 LL |     m::leak_anon1();
-   |     ^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^ private trait
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:119:5
    |
 LL |     m::leak_anon2();
-   |     ^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:120:5
    |
 LL |     m::leak_anon3();
-   |     ^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^ private type
 
 error: trait `m::Trait` is private
   --> $DIR/private-inferred-type.rs:122:5
    |
 LL |     m::leak_dyn1();
-   |     ^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^ private trait
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:123:5
    |
 LL |     m::leak_dyn2();
-   |     ^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:124:5
    |
 LL |     m::leak_dyn3();
-   |     ^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:127:13
    |
 LL |     let a = m::Alias {};
-   |             ^^^^^^^^^^^
+   |             ^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:128:17
    |
 LL |     let mut b = a;
-   |                 ^
+   |                 ^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:129:9
    |
 LL |     b = a;
-   |         ^
+   |         ^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-inferred-type.rs:130:11
    |
 LL |     match a {
-   |           ^
+   |           ^ private type
 
 error: aborting due to 33 previous errors
 
index f51b74f6cb53b343d1f56357537a92f4eca7ff1d..e3d90150e2e3eb36f489219ba30ad8761d87c017 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: function `f` is private
   --> $DIR/private-item-simple.rs:6:8
    |
 LL |     a::f();
-   |        ^ this function is private
+   |        ^ private function
    |
 note: the function `f` is defined here
   --> $DIR/private-item-simple.rs:2:5
index 6b49063815a6691b23e2c93c2bc114ecc2a30727..8a47846d667e34c8a687e190979e33c3b9f644b4 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `nap` is private
   --> $DIR/private-method-cross-crate.rs:7:8
    |
 LL |   nyan.nap();
-   |        ^^^
+   |        ^^^ private associated function
 
 error: aborting due to previous error
 
index 5551e1bd759078d0944bd2a67f861adb09dfa596..8083b197a5d78e0facf8b1a24de0f87a0e80adb1 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `f` is private
   --> $DIR/private-method-inherited.rs:13:7
    |
 LL |     x.f();
-   |       ^
+   |       ^ private associated function
 
 error: aborting due to previous error
 
index 583dc123e246bb2de36d216e900ccce7bbb81ef3..a15fce46877ceb8c3e35cefc43f96a16a97dabdb 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `nap` is private
   --> $DIR/private-method.rs:22:8
    |
 LL |   nyan.nap();
-   |        ^^^
+   |        ^^^ private associated function
 
 error: aborting due to previous error
 
index 97585c1d8805bc17a79405030ce63fc7f8c6efce..7c32ebc2cf7b98b07a2b2a28c55bb8fc16d54a70 100644 (file)
@@ -2,7 +2,7 @@ error[E0451]: field `x` of struct `a::Foo` is private
   --> $DIR/private-struct-field-ctor.rs:8:22
    |
 LL |     let s = a::Foo { x: 1 };
-   |                      ^^^^ field `x` is private
+   |                      ^^^^ private field
 
 error: aborting due to previous error
 
index 69bd58aacfc5417da8e70141bbfd798fd3598f85..9190317403ec1da017417c0e1dcbfc6d57c63533 100644 (file)
@@ -2,7 +2,7 @@ error[E0451]: field `x` of struct `a::Foo` is private
   --> $DIR/private-struct-field-pattern.rs:15:15
    |
 LL |         Foo { x: _ } => {}
-   |               ^^^^ field `x` is private
+   |               ^^^^ private field
 
 error: aborting due to previous error
 
index aa4bfb7fc9a19b81f65a924299d3c4c21146d102..ea89035c3d00671ec961690b29e811060ae08c1f 100644 (file)
@@ -2,55 +2,55 @@ error: type `m::Priv` is private
   --> $DIR/private-type-in-interface.rs:15:9
    |
 LL | fn f(_: m::Alias) {}
-   |         ^^^^^^^^
+   |         ^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-type-in-interface.rs:15:6
    |
 LL | fn f(_: m::Alias) {}
-   |      ^
+   |      ^ private type
 
 error: type `ext::Priv` is private
   --> $DIR/private-type-in-interface.rs:17:13
    |
 LL | fn f_ext(_: ext::Alias) {}
-   |             ^^^^^^^^^^
+   |             ^^^^^^^^^^ private type
 
 error: type `ext::Priv` is private
   --> $DIR/private-type-in-interface.rs:17:10
    |
 LL | fn f_ext(_: ext::Alias) {}
-   |          ^
+   |          ^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-type-in-interface.rs:21:6
    |
 LL | impl m::Alias {}
-   |      ^^^^^^^^
+   |      ^^^^^^^^ private type
 
 error: type `ext::Priv` is private
   --> $DIR/private-type-in-interface.rs:22:14
    |
 LL | impl Tr1 for ext::Alias {}
-   |              ^^^^^^^^^^
+   |              ^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-type-in-interface.rs:23:10
    |
 LL | type A = <m::Alias as m::Trait>::X;
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
 
 error: type `m::Priv` is private
   --> $DIR/private-type-in-interface.rs:27:11
    |
 LL | fn g() -> impl Tr2<m::Alias> { 0 }
-   |           ^^^^^^^^^^^^^^^^^^
+   |           ^^^^^^^^^^^^^^^^^^ private type
 
 error: type `ext::Priv` is private
   --> $DIR/private-type-in-interface.rs:28:15
    |
 LL | fn g_ext() -> impl Tr2<ext::Alias> { 0 }
-   |               ^^^^^^^^^^^^^^^^^^^^
+   |               ^^^^^^^^^^^^^^^^^^^^ private type
 
 error: aborting due to 9 previous errors
 
index dd609944a4b3f26e5f12f2d9afafa6690a6163e0..591980dc3450ddc503621ddfb30580a241df3f0c 100644 (file)
@@ -2,7 +2,7 @@ error[E0451]: field `x` of struct `foo::bar::S` is private
   --> $DIR/struct-literal-field.rs:18:9
    |
 LL |     S { x: 0 };
-   |         ^^^^ field `x` is private
+   |         ^^^^ private field
 
 error: aborting due to previous error
 
index 4d616a0b81b1b63098d2eabd01a6611bfa8438cc..5bcccc6d69c4b288c327fc109a39aefad5910855 100644 (file)
@@ -26,7 +26,7 @@ error[E0603]: struct `Crate` is private
   --> $DIR/test.rs:38:25
    |
 LL |     use pub_restricted::Crate;
-   |                         ^^^^^ this struct is private
+   |                         ^^^^^ private struct
    |
 note: the struct `Crate` is defined here
   --> $DIR/auxiliary/pub_restricted.rs:3:1
@@ -38,7 +38,7 @@ error[E0603]: function `f` is private
   --> $DIR/test.rs:30:19
    |
 LL |     use foo::bar::f;
-   |                   ^ this function is private
+   |                   ^ private function
    |
 note: the function `f` is defined here
   --> $DIR/test.rs:8:9
@@ -56,13 +56,13 @@ error[E0624]: associated function `f` is private
   --> $DIR/test.rs:32:18
    |
 LL |     S::default().f();
-   |                  ^
+   |                  ^ private associated function
 
 error[E0624]: associated function `g` is private
   --> $DIR/test.rs:33:5
    |
 LL |     S::g();
-   |     ^^^^
+   |     ^^^^ private associated function
 
 error[E0616]: field `y` of struct `pub_restricted::Universe` is private
   --> $DIR/test.rs:42:15
@@ -80,13 +80,13 @@ error[E0624]: associated function `g` is private
   --> $DIR/test.rs:45:7
    |
 LL |     u.g();
-   |       ^
+   |       ^ private associated function
 
 error[E0624]: associated function `h` is private
   --> $DIR/test.rs:46:7
    |
 LL |     u.h();
-   |       ^
+   |       ^ private associated function
 
 error: aborting due to 12 previous errors
 
index 96a1d7ed5090a4da1a510d385552ccad321b3637..15096eb1139667224eaf2742c445f24eecc545dc 100644 (file)
@@ -2,13 +2,13 @@ error[E0451]: field `c` of union `m::U` is private
   --> $DIR/union-field-privacy-1.rs:12:20
    |
 LL |     let u = m::U { c: 0 };
-   |                    ^^^^ field `c` is private
+   |                    ^^^^ private field
 
 error[E0451]: field `c` of union `m::U` is private
   --> $DIR/union-field-privacy-1.rs:16:16
    |
 LL |     let m::U { c } = u;
-   |                ^ field `c` is private
+   |                ^ private field
 
 error: aborting due to 2 previous errors
 
index 3beaedf61d73a722be48a20e30a7d152e69722f6..ff7ddcde6e0c4194fc13ddd26dce87c978a206af 100644 (file)
@@ -8,7 +8,7 @@ error[E0603]: derive macro import `Empty` is private
   --> $DIR/disappearing-resolution.rs:11:8
    |
 LL | use m::Empty;
-   |        ^^^^^ this derive macro import is private
+   |        ^^^^^ private derive macro import
    |
 note: the derive macro import `Empty` is defined here
   --> $DIR/disappearing-resolution.rs:9:9
index c2e1d774e28ac469a07e02fd8e7428707fbfc08c..6c27a2756f7fb79ac10bcf8bd1209a79e8aac08b 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `super_sekrit` is private
   --> $DIR/unreachable-variant.rs:6:21
    |
 LL |     let _x = other::super_sekrit::sooper_sekrit::baz;
-   |                     ^^^^^^^^^^^^ this module is private
+   |                     ^^^^^^^^^^^^ private module
    |
 note: the module `super_sekrit` is defined here
   --> $DIR/auxiliary/unreachable_variant.rs:1:1
index bf24cfc4d73776016fcab5cbf27dd54b223715b5..37a9ff7bd1be5b66e81af8d3207de15fa3d87efb 100644 (file)
@@ -253,7 +253,7 @@ error[E0603]: enum `Z` is private
   --> $DIR/privacy-enum-ctor.rs:57:22
    |
 LL |     let _: Z = m::n::Z;
-   |                      ^ this enum is private
+   |                      ^ private enum
    |
 note: the enum `Z` is defined here
   --> $DIR/privacy-enum-ctor.rs:11:9
@@ -265,7 +265,7 @@ error[E0603]: enum `Z` is private
   --> $DIR/privacy-enum-ctor.rs:61:22
    |
 LL |     let _: Z = m::n::Z::Fn;
-   |                      ^ this enum is private
+   |                      ^ private enum
    |
 note: the enum `Z` is defined here
   --> $DIR/privacy-enum-ctor.rs:11:9
@@ -277,7 +277,7 @@ error[E0603]: enum `Z` is private
   --> $DIR/privacy-enum-ctor.rs:64:22
    |
 LL |     let _: Z = m::n::Z::Struct;
-   |                      ^ this enum is private
+   |                      ^ private enum
    |
 note: the enum `Z` is defined here
   --> $DIR/privacy-enum-ctor.rs:11:9
@@ -289,7 +289,7 @@ error[E0603]: enum `Z` is private
   --> $DIR/privacy-enum-ctor.rs:68:22
    |
 LL |     let _: Z = m::n::Z::Unit {};
-   |                      ^ this enum is private
+   |                      ^ private enum
    |
 note: the enum `Z` is defined here
   --> $DIR/privacy-enum-ctor.rs:11:9
index 1673ec46ba488c7260acc7468a318e7f14b3874e..baf7dd84eb09dfc318782d584c35818034f7585c 100644 (file)
@@ -45,7 +45,7 @@ LL |         pub(in m) struct Z(pub(in m::n) u8);
    |                            --------------- a constructor is private if any of the fields is private
 ...
 LL |         n::Z;
-   |            ^ this tuple struct constructor is private
+   |            ^ private tuple struct constructor
    |
 note: the tuple struct constructor `Z` is defined here
   --> $DIR/privacy-struct-ctor.rs:12:9
@@ -60,7 +60,7 @@ LL |     pub struct S(u8);
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     m::S;
-   |        ^ this tuple struct constructor is private
+   |        ^ private tuple struct constructor
    |
 note: the tuple struct constructor `S` is defined here
   --> $DIR/privacy-struct-ctor.rs:6:5
@@ -75,7 +75,7 @@ LL |     pub struct S(u8);
    |                  -- a constructor is private if any of the fields is private
 ...
 LL |     let _: S = m::S(2);
-   |                   ^ this tuple struct constructor is private
+   |                   ^ private tuple struct constructor
    |
 note: the tuple struct constructor `S` is defined here
   --> $DIR/privacy-struct-ctor.rs:6:5
@@ -90,7 +90,7 @@ LL |         pub(in m) struct Z(pub(in m::n) u8);
    |                            --------------- a constructor is private if any of the fields is private
 ...
 LL |     m::n::Z;
-   |           ^ this tuple struct constructor is private
+   |           ^ private tuple struct constructor
    |
 note: the tuple struct constructor `Z` is defined here
   --> $DIR/privacy-struct-ctor.rs:12:9
@@ -102,7 +102,7 @@ error[E0603]: tuple struct constructor `S` is private
   --> $DIR/privacy-struct-ctor.rs:41:16
    |
 LL |     xcrate::m::S;
-   |                ^ this tuple struct constructor is private
+   |                ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18
    |
@@ -119,7 +119,7 @@ error[E0603]: tuple struct constructor `Z` is private
   --> $DIR/privacy-struct-ctor.rs:45:19
    |
 LL |     xcrate::m::n::Z;
-   |                   ^ this tuple struct constructor is private
+   |                   ^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28
    |
index ebe3c36f21eb1f83d81e824157e98ab42df99b32..361da4cc78e0074fedbc050d5ac73a3b2593e4b3 100644 (file)
@@ -2,7 +2,12 @@ error[E0423]: expected function, found macro `assert`
   --> $DIR/resolve-hint-macro.rs:2:5
    |
 LL |     assert(true);
-   |     ^^^^^^ help: use `!` to invoke the macro: `assert!`
+   |     ^^^^^^
+   |
+help: use `!` to invoke the macro
+   |
+LL |     assert!(true);
+   |           ^
 
 error: aborting due to previous error
 
index f992988c93fcc502972030e0adb401823930ba9a..4e91e7bff34b2477a8520537ed47e8383ba9b53b 100644 (file)
@@ -14,7 +14,7 @@ error[E0603]: tuple struct constructor `TupleStruct` is private
   --> $DIR/struct.rs:23:32
    |
 LL |     let ts_explicit = structs::TupleStruct(640, 480);
-   |                                ^^^^^^^^^^^ this tuple struct constructor is private
+   |                                ^^^^^^^^^^^ private tuple struct constructor
    | 
   ::: $DIR/auxiliary/structs.rs:11:24
    |
@@ -31,7 +31,7 @@ error[E0603]: unit struct `UnitStruct` is private
   --> $DIR/struct.rs:32:32
    |
 LL |     let us_explicit = structs::UnitStruct;
-   |                                ^^^^^^^^^^ this unit struct is private
+   |                                ^^^^^^^^^^ private unit struct
    |
 note: the unit struct `UnitStruct` is defined here
   --> $DIR/auxiliary/structs.rs:8:1
index 2a438753a2c70148ee734037a7b4fb1a1922840a..ae4f6aff11a02d021f8ad365fc06ea9c8ccc0bcd 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: tuple variant `Tuple` is private
   --> $DIR/variant.rs:11:48
    |
 LL |     let variant_tuple = NonExhaustiveVariants::Tuple(640);
-   |                                                ^^^^^ this tuple variant is private
+   |                                                ^^^^^ private tuple variant
    |
 note: the tuple variant `Tuple` is defined here
   --> $DIR/auxiliary/variants.rs:5:23
@@ -14,7 +14,7 @@ error[E0603]: unit variant `Unit` is private
   --> $DIR/variant.rs:14:47
    |
 LL |     let variant_unit = NonExhaustiveVariants::Unit;
-   |                                               ^^^^ this unit variant is private
+   |                                               ^^^^ private unit variant
    |
 note: the unit variant `Unit` is defined here
   --> $DIR/auxiliary/variants.rs:4:23
@@ -26,7 +26,7 @@ error[E0603]: unit variant `Unit` is private
   --> $DIR/variant.rs:18:32
    |
 LL |         NonExhaustiveVariants::Unit => "",
-   |                                ^^^^ this unit variant is private
+   |                                ^^^^ private unit variant
    |
 note: the unit variant `Unit` is defined here
   --> $DIR/auxiliary/variants.rs:4:23
@@ -38,7 +38,7 @@ error[E0603]: tuple variant `Tuple` is private
   --> $DIR/variant.rs:20:32
    |
 LL |         NonExhaustiveVariants::Tuple(fe_tpl) => "",
-   |                                ^^^^^ this tuple variant is private
+   |                                ^^^^^ private tuple variant
    |
 note: the tuple variant `Tuple` is defined here
   --> $DIR/auxiliary/variants.rs:5:23
@@ -50,7 +50,7 @@ error[E0603]: tuple variant `Tuple` is private
   --> $DIR/variant.rs:26:35
    |
 LL |     if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct {
-   |                                   ^^^^^ this tuple variant is private
+   |                                   ^^^^^ private tuple variant
    |
 note: the tuple variant `Tuple` is defined here
   --> $DIR/auxiliary/variants.rs:5:23
index 2244f3a46b266b3e05851f5f4da883795993863b..1a642ae6e8ed8d7205dd2e32908f9524846da955 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module import `bar` is private
   --> $DIR/shadowed-use-visibility.rs:9:14
    |
 LL |     use foo::bar::f as g;
-   |              ^^^ this module import is private
+   |              ^^^ private module import
    |
 note: the module import `bar` is defined here...
   --> $DIR/shadowed-use-visibility.rs:4:9
@@ -19,7 +19,7 @@ error[E0603]: module import `f` is private
   --> $DIR/shadowed-use-visibility.rs:15:10
    |
 LL | use bar::f::f;
-   |          ^ this module import is private
+   |          ^ private module import
    |
 note: the module import `f` is defined here...
   --> $DIR/shadowed-use-visibility.rs:11:9
index 3a974164f94734f7634bd330bf2681527f05b3f3..35a09b21995916bfc051e66fe0397810ce66d196 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `thread_info` is private
   --> $DIR/stability-in-private-module.rs:7:26
    |
 LL |     let _ = std::thread::thread_info::current_thread();
-   |                          ^^^^^^^^^^^ this module is private
+   |                          ^^^^^^^^^^^ private module
    |
 note: the module `thread_info` is defined here
   --> $SRC_DIR/libstd/thread/mod.rs:LL:COL
index 78d211438cc920b84bb387c95924bda34e29c829..bc35b4067a810b801c9fec5cb72198edfc508322 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `new` is private
   --> $DIR/static-method-privacy.rs:9:13
    |
 LL |     let _ = a::S::new();
-   |             ^^^^^^^^^
+   |             ^^^^^^^^^ private associated function
 
 error: aborting due to previous error
 
index f6cd40412dd843f635931d69f235f16b241adcca..d731da79246ee643589b4bc8613ebbf213b7424c 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: static `private` is private
   --> $DIR/static-priv-by-default2.rs:15:30
    |
 LL |     use child::childs_child::private;
-   |                              ^^^^^^^ this static is private
+   |                              ^^^^^^^ private static
    |
 note: the static `private` is defined here
   --> $DIR/static-priv-by-default2.rs:7:9
@@ -14,7 +14,7 @@ error[E0603]: static `private` is private
   --> $DIR/static-priv-by-default2.rs:23:33
    |
 LL |     use static_priv_by_default::private;
-   |                                 ^^^^^^^ this static is private
+   |                                 ^^^^^^^ private static
    |
 note: the static `private` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:3:1
index 0203b7b5242e5187f18357ad74343796ec96ee4b..4e022cef1b2d3f8238eae38e37f579c7747af761 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: enum `Bar` is private
   --> $DIR/struct-variant-privacy-xc.rs:4:33
    |
 LL | fn f(b: struct_variant_privacy::Bar) {
-   |                                 ^^^ this enum is private
+   |                                 ^^^ private enum
    |
 note: the enum `Bar` is defined here
   --> $DIR/auxiliary/struct_variant_privacy.rs:1:1
@@ -14,7 +14,7 @@ error[E0603]: enum `Bar` is private
   --> $DIR/struct-variant-privacy-xc.rs:6:33
    |
 LL |         struct_variant_privacy::Bar::Baz { a: _a } => {}
-   |                                 ^^^ this enum is private
+   |                                 ^^^ private enum
    |
 note: the enum `Bar` is defined here
   --> $DIR/auxiliary/struct_variant_privacy.rs:1:1
index d1b603f9d46fc027afc9eec22501c0e07d505160..a6bc381ff6b384fc22edb0d645a42a098ca01afb 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: enum `Bar` is private
   --> $DIR/struct-variant-privacy.rs:7:14
    |
 LL | fn f(b: foo::Bar) {
-   |              ^^^ this enum is private
+   |              ^^^ private enum
    |
 note: the enum `Bar` is defined here
   --> $DIR/struct-variant-privacy.rs:2:5
@@ -14,7 +14,7 @@ error[E0603]: enum `Bar` is private
   --> $DIR/struct-variant-privacy.rs:9:14
    |
 LL |         foo::Bar::Baz { a: _a } => {}
-   |              ^^^ this enum is private
+   |              ^^^ private enum
    |
 note: the enum `Bar` is defined here
   --> $DIR/struct-variant-privacy.rs:2:5
index 4b40c6405c47b25d7c3f8add939a468789aeee09..f8ffc949b067e080111588697423aa570c2d9038 100644 (file)
@@ -40,7 +40,7 @@ error[E0624]: associated function `a` is private
   --> $DIR/trait-item-privacy.rs:72:7
    |
 LL |     c.a();
-   |       ^
+   |       ^ private associated function
 
 error[E0599]: no function or associated item named `a` found for struct `S` in the current scope
   --> $DIR/trait-item-privacy.rs:78:8
@@ -77,7 +77,7 @@ error[E0624]: associated function `a` is private
   --> $DIR/trait-item-privacy.rs:84:5
    |
 LL |     C::a(&S);
-   |     ^^^^
+   |     ^^^^ private associated function
 
 error[E0599]: no associated item named `A` found for struct `S` in the current scope
   --> $DIR/trait-item-privacy.rs:97:8
@@ -114,7 +114,7 @@ error[E0624]: associated constant `A` is private
   --> $DIR/trait-item-privacy.rs:101:5
    |
 LL |     C::A;
-   |     ^^^^
+   |     ^^^^ private associated constant
 
 error[E0038]: the trait `assoc_const::C` cannot be made into an object
   --> $DIR/trait-item-privacy.rs:101:5
@@ -159,13 +159,13 @@ error: associated type `A` is private
   --> $DIR/trait-item-privacy.rs:119:12
    |
 LL |     let _: T::A;
-   |            ^^^^
+   |            ^^^^ private associated type
 
 error: associated type `A` is private
   --> $DIR/trait-item-privacy.rs:128:9
    |
 LL |         A = u8,
-   |         ^^^^^^
+   |         ^^^^^^ private associated type
 
 error: aborting due to 15 previous errors
 
index 035c1ea092b291efa79255136f41ad2a7c4864a5..c33673aea4d795bfe060b54d5b721a3c66eb499a 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated function `method` is private
   --> $DIR/trait-method-private.rs:19:9
    |
 LL |     foo.method();
-   |         ^^^^^^
+   |         ^^^^^^ private associated function
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope; perhaps add a `use` for it:
index 9b4fe2c1205dbca6bbd6fb1ea6d8d123b0405208..fe870ab737cc8fd5d69b7bbb6623d714fc5a5e04 100644 (file)
@@ -11,9 +11,13 @@ error[E0574]: expected struct, variant or union type, found macro `try`
   --> $DIR/try-block-in-edition2015.rs:4:33
    |
 LL |     let try_result: Option<_> = try {
-   |                                 ^^^ help: use `!` to invoke the macro: `try!`
+   |                                 ^^^
    |
    = note: if you want the `try` keyword, you need to be in the 2018 edition
+help: use `!` to invoke the macro
+   |
+LL |     let try_result: Option<_> = try! {
+   |                                    ^
 
 error: aborting due to 2 previous errors
 
index 3f38a6cae7b819055e7ca742b419b2763dc86e31..37b4e61c8085eff21382a40efe79ac63fac4290f 100644 (file)
@@ -44,7 +44,7 @@ error[E0603]: struct `Foo` is private
   --> $DIR/use-from-trait-xc.rs:14:24
    |
 LL | use use_from_trait_xc::Foo::new;
-   |                        ^^^ this struct is private
+   |                        ^^^ private struct
    |
 note: the struct `Foo` is defined here
   --> $DIR/auxiliary/use-from-trait-xc.rs:9:1
@@ -56,7 +56,7 @@ error[E0603]: struct `Foo` is private
   --> $DIR/use-from-trait-xc.rs:17:24
    |
 LL | use use_from_trait_xc::Foo::C;
-   |                        ^^^ this struct is private
+   |                        ^^^ private struct
    |
 note: the struct `Foo` is defined here
   --> $DIR/auxiliary/use-from-trait-xc.rs:9:1
index 4852759286ae632fee1fa9bba6dd25f849c157e3..1b12b3c6fa09a262c7d2ef24cd0888f043900e50 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: module `bar` is private
   --> $DIR/use-mod-3.rs:1:10
    |
 LL | use foo::bar::{
-   |          ^^^ this module is private
+   |          ^^^ private module
    |
 note: the module `bar` is defined here
   --> $DIR/use-mod-3.rs:9:5
@@ -14,7 +14,7 @@ error[E0603]: module `bar` is private
   --> $DIR/use-mod-3.rs:4:10
    |
 LL | use foo::bar::{
-   |          ^^^ this module is private
+   |          ^^^ private module
    |
 note: the module `bar` is defined here
   --> $DIR/use-mod-3.rs:9:5
index 6a68bef90efd7a80349c6e530d54b44920d98e32..902998cf0c110493552bc3e439ca5a705623b8f1 100644 (file)
@@ -2,13 +2,13 @@ error[E0624]: associated function `static_meth_struct` is private
   --> $DIR/xc-private-method.rs:6:13
    |
 LL |     let _ = xc_private_method_lib::Struct::static_meth_struct();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
 
 error[E0624]: associated function `static_meth_enum` is private
   --> $DIR/xc-private-method.rs:9:13
    |
 LL |     let _ = xc_private_method_lib::Enum::static_meth_enum();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
 
 error: aborting due to 2 previous errors
 
index 84a8b9817c0d076f79d8e9b711259918bd1dbe71..0ebdb0a06d82b45340ec2ecf3c4c1d9a2f55f37a 100644 (file)
@@ -2,13 +2,13 @@ error[E0624]: associated function `meth_struct` is private
   --> $DIR/xc-private-method2.rs:6:52
    |
 LL |     let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct();
-   |                                                    ^^^^^^^^^^^
+   |                                                    ^^^^^^^^^^^ private associated function
 
 error[E0624]: associated function `meth_enum` is private
   --> $DIR/xc-private-method2.rs:9:55
    |
 LL |     let _ = xc_private_method_lib::Enum::Variant1(20).meth_enum();
-   |                                                       ^^^^^^^^^
+   |                                                       ^^^^^^^^^ private associated function
 
 error: aborting due to 2 previous errors
 
index 842069d6135cbeba743ebd75c0c94da2fd55b5f9..a97f55de5f8330fcfac88d7fff883f01c2313c84 100644 (file)
@@ -2,7 +2,7 @@ error[E0603]: static `j` is private
   --> $DIR/xcrate-private-by-default.rs:23:29
    |
 LL |     static_priv_by_default::j;
-   |                             ^ this static is private
+   |                             ^ private static
    |
 note: the static `j` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:47:1
@@ -14,7 +14,7 @@ error[E0603]: function `k` is private
   --> $DIR/xcrate-private-by-default.rs:25:29
    |
 LL |     static_priv_by_default::k;
-   |                             ^ this function is private
+   |                             ^ private function
    |
 note: the function `k` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:48:1
@@ -26,7 +26,7 @@ error[E0603]: unit struct `l` is private
   --> $DIR/xcrate-private-by-default.rs:27:29
    |
 LL |     static_priv_by_default::l;
-   |                             ^ this unit struct is private
+   |                             ^ private unit struct
    |
 note: the unit struct `l` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:49:1
@@ -38,7 +38,7 @@ error[E0603]: enum `m` is private
   --> $DIR/xcrate-private-by-default.rs:29:35
    |
 LL |     foo::<static_priv_by_default::m>();
-   |                                   ^ this enum is private
+   |                                   ^ private enum
    |
 note: the enum `m` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:50:1
@@ -50,7 +50,7 @@ error[E0603]: type alias `n` is private
   --> $DIR/xcrate-private-by-default.rs:31:35
    |
 LL |     foo::<static_priv_by_default::n>();
-   |                                   ^ this type alias is private
+   |                                   ^ private type alias
    |
 note: the type alias `n` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:51:1
@@ -62,7 +62,7 @@ error[E0603]: module `foo` is private
   --> $DIR/xcrate-private-by-default.rs:35:29
    |
 LL |     static_priv_by_default::foo::a;
-   |                             ^^^ this module is private
+   |                             ^^^ private module
    |
 note: the module `foo` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:12:1
@@ -74,7 +74,7 @@ error[E0603]: module `foo` is private
   --> $DIR/xcrate-private-by-default.rs:37:29
    |
 LL |     static_priv_by_default::foo::b;
-   |                             ^^^ this module is private
+   |                             ^^^ private module
    |
 note: the module `foo` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:12:1
@@ -86,7 +86,7 @@ error[E0603]: module `foo` is private
   --> $DIR/xcrate-private-by-default.rs:39:29
    |
 LL |     static_priv_by_default::foo::c;
-   |                             ^^^ this module is private
+   |                             ^^^ private module
    |
 note: the module `foo` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:12:1
@@ -98,7 +98,7 @@ error[E0603]: module `foo` is private
   --> $DIR/xcrate-private-by-default.rs:41:35
    |
 LL |     foo::<static_priv_by_default::foo::d>();
-   |                                   ^^^ this module is private
+   |                                   ^^^ private module
    |
 note: the module `foo` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:12:1
@@ -110,7 +110,7 @@ error[E0603]: module `foo` is private
   --> $DIR/xcrate-private-by-default.rs:43:35
    |
 LL |     foo::<static_priv_by_default::foo::e>();
-   |                                   ^^^ this module is private
+   |                                   ^^^ private module
    |
 note: the module `foo` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:12:1