From 854b78fe22af2ed010cc4367c3456eccf427b6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sun, 22 Mar 2020 15:36:54 -0700 Subject: [PATCH] Normalize wording of privacy access labels --- src/librustc_privacy/lib.rs | 16 +++- src/librustc_resolve/diagnostics.rs | 2 +- src/librustc_resolve/late/diagnostics.rs | 6 +- src/librustc_typeck/astconv.rs | 17 +++- src/librustc_typeck/check/method/suggest.rs | 4 +- .../associated-const-private-impl.stderr | 2 +- src/test/ui/error-codes/E0451.stderr | 4 +- src/test/ui/error-codes/E0603.stderr | 2 +- src/test/ui/error-codes/E0624.stderr | 2 +- src/test/ui/error-festival.stderr | 2 +- src/test/ui/explore-issue-38412.stderr | 12 +-- src/test/ui/export-import.stderr | 2 +- src/test/ui/export-tag-variant.stderr | 2 +- src/test/ui/export.stderr | 2 +- .../ui/extern/extern-crate-visibility.stderr | 4 +- ...onal-struct-update-respects-privacy.stderr | 2 +- src/test/ui/hygiene/fields.stderr | 8 +- src/test/ui/hygiene/impl_items.stderr | 2 +- src/test/ui/hygiene/intercrate.stderr | 2 +- src/test/ui/hygiene/privacy.stderr | 2 +- .../hygiene/rustc-macro-transparency.stderr | 14 ++- src/test/ui/import.stderr | 2 +- src/test/ui/imports/issue-55884-2.stderr | 2 +- src/test/ui/imports/reexports.stderr | 4 +- .../ui/imports/unresolved-imports-used.stderr | 2 +- src/test/ui/issues/issue-10545.stderr | 2 +- src/test/ui/issues/issue-11593.stderr | 2 +- src/test/ui/issues/issue-11680.stderr | 4 +- src/test/ui/issues/issue-13407.stderr | 2 +- src/test/ui/issues/issue-13641.stderr | 4 +- src/test/ui/issues/issue-16725.stderr | 2 +- .../issues/issue-17718-const-privacy.stderr | 4 +- src/test/ui/issues/issue-21202.stderr | 2 +- src/test/ui/issues/issue-28388-2.stderr | 2 +- src/test/ui/issues/issue-29161.stderr | 2 +- src/test/ui/issues/issue-3763.stderr | 4 +- src/test/ui/issues/issue-38857.stderr | 2 +- src/test/ui/issues/issue-3993.stderr | 2 +- src/test/ui/issues/issue-53498.stderr | 2 +- .../macros/macro-local-data-key-priv.stderr | 2 +- .../ui/parser/macro/pub-item-macro.stderr | 2 +- .../associated-item-privacy-inherent.stderr | 42 ++++---- .../associated-item-privacy-trait.stderr | 60 ++++++------ ...ssociated-item-privacy-type-binding.stderr | 32 +++---- src/test/ui/privacy/decl-macro.stderr | 2 +- src/test/ui/privacy/privacy-in-paths.stderr | 6 +- src/test/ui/privacy/privacy-ns2.stderr | 6 +- src/test/ui/privacy/privacy-ufcs.stderr | 2 +- src/test/ui/privacy/privacy1.stderr | 36 +++---- src/test/ui/privacy/privacy2.stderr | 2 +- src/test/ui/privacy/privacy4.stderr | 2 +- src/test/ui/privacy/privacy5.stderr | 96 +++++++++---------- .../ui/privacy/private-impl-method.stderr | 2 +- .../private-in-public-non-principal-2.stderr | 2 +- .../ui/privacy/private-inferred-type-1.stderr | 4 +- .../ui/privacy/private-inferred-type-2.stderr | 6 +- .../ui/privacy/private-inferred-type-3.stderr | 14 +-- .../ui/privacy/private-inferred-type.stderr | 62 ++++++------ .../ui/privacy/private-item-simple.stderr | 2 +- .../privacy/private-method-cross-crate.stderr | 2 +- .../privacy/private-method-inherited.stderr | 2 +- src/test/ui/privacy/private-method.stderr | 2 +- .../privacy/private-struct-field-ctor.stderr | 2 +- .../private-struct-field-pattern.stderr | 2 +- .../privacy/private-type-in-interface.stderr | 18 ++-- .../restricted/struct-literal-field.stderr | 2 +- src/test/ui/privacy/restricted/test.stderr | 12 +-- .../ui/privacy/union-field-privacy-1.stderr | 4 +- .../proc-macro/disappearing-resolution.stderr | 2 +- .../ui/reachable/unreachable-variant.stderr | 2 +- src/test/ui/resolve/privacy-enum-ctor.stderr | 8 +- .../ui/resolve/privacy-struct-ctor.stderr | 12 +-- src/test/ui/resolve/resolve-hint-macro.stderr | 7 +- .../ui/rfc-2008-non-exhaustive/struct.stderr | 4 +- .../ui/rfc-2008-non-exhaustive/variant.stderr | 10 +- .../shadowed/shadowed-use-visibility.stderr | 4 +- .../ui/stability-in-private-module.stderr | 2 +- .../ui/static/static-method-privacy.stderr | 2 +- .../ui/static/static-priv-by-default2.stderr | 4 +- .../structs/struct-variant-privacy-xc.stderr | 4 +- .../ui/structs/struct-variant-privacy.stderr | 4 +- src/test/ui/traits/trait-item-privacy.stderr | 10 +- .../ui/traits/trait-method-private.stderr | 2 +- .../try-block/try-block-in-edition2015.stderr | 6 +- src/test/ui/use/use-from-trait-xc.stderr | 4 +- src/test/ui/use/use-mod/use-mod-3.stderr | 4 +- src/test/ui/xc-private-method.stderr | 4 +- src/test/ui/xc-private-method2.stderr | 4 +- .../xcrate/xcrate-private-by-default.stderr | 20 ++-- 89 files changed, 370 insertions(+), 332 deletions(-) diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index a3510737b7e..d680b9e0026 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -1038,7 +1038,7 @@ impl<'a, 'tcx> NamePrivacyVisitor<'a, 'tcx> { 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 @@ impl<'a, 'tcx> TypePrivacyVisitor<'a, 'tcx> { 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 @@ impl<'a, 'tcx> Visitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> { 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; } } diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index 6f567ab65a7..cf9730022d0 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -952,7 +952,7 @@ impl<'a> Resolver<'a> { 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"); } diff --git a/src/librustc_resolve/late/diagnostics.rs b/src/librustc_resolve/late/diagnostics.rs index e1256551e24..a8d4e7ce5f6 100644 --- a/src/librustc_resolve/late/diagnostics.rs +++ b/src/librustc_resolve/late/diagnostics.rs @@ -506,10 +506,10 @@ impl<'a> LateResolutionVisitor<'a, '_, '_> { 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() { diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 3ee6d5df735..e00322c739f 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -1452,8 +1452,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { .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 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { 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); diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index 061433bcf65..f46c43c78db 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -769,14 +769,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } 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(); } diff --git a/src/test/ui/associated-const/associated-const-private-impl.stderr b/src/test/ui/associated-const/associated-const-private-impl.stderr index 7af55174b19..305f41433ac 100644 --- a/src/test/ui/associated-const/associated-const-private-impl.stderr +++ b/src/test/ui/associated-const/associated-const-private-impl.stderr @@ -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 diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr index 655f3a98d7f..bb92c23e0f6 100644 --- a/src/test/ui/error-codes/E0451.stderr +++ b/src/test/ui/error-codes/E0451.stderr @@ -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 diff --git a/src/test/ui/error-codes/E0603.stderr b/src/test/ui/error-codes/E0603.stderr index 724d04954a3..ee902584f56 100644 --- a/src/test/ui/error-codes/E0603.stderr +++ b/src/test/ui/error-codes/E0603.stderr @@ -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 diff --git a/src/test/ui/error-codes/E0624.stderr b/src/test/ui/error-codes/E0624.stderr index 65256c8dd2d..1d3336fb181 100644 --- a/src/test/ui/error-codes/E0624.stderr +++ b/src/test/ui/error-codes/E0624.stderr @@ -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 diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index fb5290bf64e..7f524230ef0 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -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 diff --git a/src/test/ui/explore-issue-38412.stderr b/src/test/ui/explore-issue-38412.stderr index b3d9214d3d1..1855c0b1437 100644 --- a/src/test/ui/explore-issue-38412.stderr +++ b/src/test/ui/explore-issue-38412.stderr @@ -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 diff --git a/src/test/ui/export-import.stderr b/src/test/ui/export-import.stderr index 8160775ab58..753424c7f88 100644 --- a/src/test/ui/export-import.stderr +++ b/src/test/ui/export-import.stderr @@ -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 diff --git a/src/test/ui/export-tag-variant.stderr b/src/test/ui/export-tag-variant.stderr index f4537a2fb6f..f73bd454d35 100644 --- a/src/test/ui/export-tag-variant.stderr +++ b/src/test/ui/export-tag-variant.stderr @@ -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 diff --git a/src/test/ui/export.stderr b/src/test/ui/export.stderr index 107f531c09a..23c29b31c6a 100644 --- a/src/test/ui/export.stderr +++ b/src/test/ui/export.stderr @@ -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 diff --git a/src/test/ui/extern/extern-crate-visibility.stderr b/src/test/ui/extern/extern-crate-visibility.stderr index d0c073d67a4..9eeb83ae1a7 100644 --- a/src/test/ui/extern/extern-crate-visibility.stderr +++ b/src/test/ui/extern/extern-crate-visibility.stderr @@ -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 diff --git a/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr b/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr index 2aeffc3e5e4..19703fc99fd 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr +++ b/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr @@ -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 diff --git a/src/test/ui/hygiene/fields.stderr b/src/test/ui/hygiene/fields.stderr index 89deef49202..6d784408016 100644 --- a/src/test/ui/hygiene/fields.stderr +++ b/src/test/ui/hygiene/fields.stderr @@ -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 diff --git a/src/test/ui/hygiene/impl_items.stderr b/src/test/ui/hygiene/impl_items.stderr index 85ee9f4cbf3..8ac59263cf2 100644 --- a/src/test/ui/hygiene/impl_items.stderr +++ b/src/test/ui/hygiene/impl_items.stderr @@ -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 diff --git a/src/test/ui/hygiene/intercrate.stderr b/src/test/ui/hygiene/intercrate.stderr index 3912ca337fb..c27ba74a263 100644 --- a/src/test/ui/hygiene/intercrate.stderr +++ b/src/test/ui/hygiene/intercrate.stderr @@ -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) diff --git a/src/test/ui/hygiene/privacy.stderr b/src/test/ui/hygiene/privacy.stderr index 0649dc0ec58..70a24304dda 100644 --- a/src/test/ui/hygiene/privacy.stderr +++ b/src/test/ui/hygiene/privacy.stderr @@ -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 diff --git a/src/test/ui/hygiene/rustc-macro-transparency.stderr b/src/test/ui/hygiene/rustc-macro-transparency.stderr index 45a2efebbb8..024ce820760 100644 --- a/src/test/ui/hygiene/rustc-macro-transparency.stderr +++ b/src/test/ui/hygiene/rustc-macro-transparency.stderr @@ -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 diff --git a/src/test/ui/import.stderr b/src/test/ui/import.stderr index 5219ffacd15..797712e2db9 100644 --- a/src/test/ui/import.stderr +++ b/src/test/ui/import.stderr @@ -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 diff --git a/src/test/ui/imports/issue-55884-2.stderr b/src/test/ui/imports/issue-55884-2.stderr index 490c08446b5..5adbc4b66d1 100644 --- a/src/test/ui/imports/issue-55884-2.stderr +++ b/src/test/ui/imports/issue-55884-2.stderr @@ -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 diff --git a/src/test/ui/imports/reexports.stderr b/src/test/ui/imports/reexports.stderr index d63fbc7ec67..79c8e1130c8 100644 --- a/src/test/ui/imports/reexports.stderr +++ b/src/test/ui/imports/reexports.stderr @@ -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 diff --git a/src/test/ui/imports/unresolved-imports-used.stderr b/src/test/ui/imports/unresolved-imports-used.stderr index 69765b9227d..ddf36089339 100644 --- a/src/test/ui/imports/unresolved-imports-used.stderr +++ b/src/test/ui/imports/unresolved-imports-used.stderr @@ -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 diff --git a/src/test/ui/issues/issue-10545.stderr b/src/test/ui/issues/issue-10545.stderr index 4ed7028c0a0..f1da33eaba1 100644 --- a/src/test/ui/issues/issue-10545.stderr +++ b/src/test/ui/issues/issue-10545.stderr @@ -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 diff --git a/src/test/ui/issues/issue-11593.stderr b/src/test/ui/issues/issue-11593.stderr index bfb4d31323b..aa9768b1885 100644 --- a/src/test/ui/issues/issue-11593.stderr +++ b/src/test/ui/issues/issue-11593.stderr @@ -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 diff --git a/src/test/ui/issues/issue-11680.stderr b/src/test/ui/issues/issue-11680.stderr index 898ac10f7d9..ea224af8ed7 100644 --- a/src/test/ui/issues/issue-11680.stderr +++ b/src/test/ui/issues/issue-11680.stderr @@ -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 diff --git a/src/test/ui/issues/issue-13407.stderr b/src/test/ui/issues/issue-13407.stderr index f211d623ab1..f30b6cdeaf0 100644 --- a/src/test/ui/issues/issue-13407.stderr +++ b/src/test/ui/issues/issue-13407.stderr @@ -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 diff --git a/src/test/ui/issues/issue-13641.stderr b/src/test/ui/issues/issue-13641.stderr index f90cb18b6fc..cdd0772d39f 100644 --- a/src/test/ui/issues/issue-13641.stderr +++ b/src/test/ui/issues/issue-13641.stderr @@ -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 diff --git a/src/test/ui/issues/issue-16725.stderr b/src/test/ui/issues/issue-16725.stderr index e0a1ca8a5ac..84359803bba 100644 --- a/src/test/ui/issues/issue-16725.stderr +++ b/src/test/ui/issues/issue-16725.stderr @@ -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 diff --git a/src/test/ui/issues/issue-17718-const-privacy.stderr b/src/test/ui/issues/issue-17718-const-privacy.stderr index 07d825ba9cb..d4595be7490 100644 --- a/src/test/ui/issues/issue-17718-const-privacy.stderr +++ b/src/test/ui/issues/issue-17718-const-privacy.stderr @@ -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 diff --git a/src/test/ui/issues/issue-21202.stderr b/src/test/ui/issues/issue-21202.stderr index 18669add205..421ed0a5a93 100644 --- a/src/test/ui/issues/issue-21202.stderr +++ b/src/test/ui/issues/issue-21202.stderr @@ -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 diff --git a/src/test/ui/issues/issue-28388-2.stderr b/src/test/ui/issues/issue-28388-2.stderr index 58bd775f295..1afaf622be7 100644 --- a/src/test/ui/issues/issue-28388-2.stderr +++ b/src/test/ui/issues/issue-28388-2.stderr @@ -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 diff --git a/src/test/ui/issues/issue-29161.stderr b/src/test/ui/issues/issue-29161.stderr index 1bfa211ef79..7ce95e4b0df 100644 --- a/src/test/ui/issues/issue-29161.stderr +++ b/src/test/ui/issues/issue-29161.stderr @@ -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 diff --git a/src/test/ui/issues/issue-3763.stderr b/src/test/ui/issues/issue-3763.stderr index dab8f400156..b63967bb9dc 100644 --- a/src/test/ui/issues/issue-3763.stderr +++ b/src/test/ui/issues/issue-3763.stderr @@ -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 diff --git a/src/test/ui/issues/issue-38857.stderr b/src/test/ui/issues/issue-38857.stderr index ba0f1336ff0..1a287e94baf 100644 --- a/src/test/ui/issues/issue-38857.stderr +++ b/src/test/ui/issues/issue-38857.stderr @@ -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 diff --git a/src/test/ui/issues/issue-3993.stderr b/src/test/ui/issues/issue-3993.stderr index 3fa8ed4af28..deecf7a9d75 100644 --- a/src/test/ui/issues/issue-3993.stderr +++ b/src/test/ui/issues/issue-3993.stderr @@ -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 diff --git a/src/test/ui/issues/issue-53498.stderr b/src/test/ui/issues/issue-53498.stderr index 042848c27bb..973e6c12aa1 100644 --- a/src/test/ui/issues/issue-53498.stderr +++ b/src/test/ui/issues/issue-53498.stderr @@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private --> $DIR/issue-53498.rs:16:5 | LL | test::Foo::::foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function error: aborting due to previous error diff --git a/src/test/ui/macros/macro-local-data-key-priv.stderr b/src/test/ui/macros/macro-local-data-key-priv.stderr index c53a09aad57..3092d76c268 100644 --- a/src/test/ui/macros/macro-local-data-key-priv.stderr +++ b/src/test/ui/macros/macro-local-data-key-priv.stderr @@ -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 diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr index 4ff96532e03..1c5613ac986 100644 --- a/src/test/ui/parser/macro/pub-item-macro.stderr +++ b/src/test/ui/parser/macro/pub-item-macro.stderr @@ -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 diff --git a/src/test/ui/privacy/associated-item-privacy-inherent.stderr b/src/test/ui/privacy/associated-item-privacy-inherent.stderr index 88561568ea5..1e94e7c620d 100644 --- a/src/test/ui/privacy/associated-item-privacy-inherent.stderr +++ b/src/test/ui/privacy/associated-item-privacy-inherent.stderr @@ -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::; - | ^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ 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::(); - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ 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 = ::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 = ::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 | ::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 diff --git a/src/test/ui/privacy/associated-item-privacy-trait.stderr b/src/test/ui/privacy/associated-item-privacy-trait.stderr index db24e425a01..c30cc947d45 100644 --- a/src/test/ui/privacy/associated-item-privacy-trait.stderr +++ b/src/test/ui/privacy/associated-item-privacy-trait.stderr @@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r priv_trait::Pub) { $DIR/associated-item-privacy-trait.rs:17:21 | LL | let value = ::method; - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ private type ... LL | priv_trait::mac!(); | ------------------- in this macro invocation @@ -13,7 +13,7 @@ error: type `for<'r> fn(&'r priv_trait::Pub) { $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) {::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 | ::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 _: ::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 = ::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 = ::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 = ::method::; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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::(); - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ 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 = ::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 = >::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 = >::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 | ::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 | >::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 | >::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 _: >::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 _: >::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 = ::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 = >::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 diff --git a/src/test/ui/privacy/associated-item-privacy-type-binding.stderr b/src/test/ui/privacy/associated-item-privacy-type-binding.stderr index fd8b8cf0db6..d8515ccb669 100644 --- a/src/test/ui/privacy/associated-item-privacy-type-binding.stderr +++ b/src/test/ui/privacy/associated-item-privacy-type-binding.stderr @@ -2,7 +2,7 @@ error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:11:13 | LL | let _: Box>; - | ^ + | ^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {} - | ^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ 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>; - | ^ + | ^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {} - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ 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>; - | ^ + | ^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>; - | ^ + | ^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {} - | ^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ private type ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation diff --git a/src/test/ui/privacy/decl-macro.stderr b/src/test/ui/privacy/decl-macro.stderr index ae2e1b4b644..5bc6f07fffa 100644 --- a/src/test/ui/privacy/decl-macro.stderr +++ b/src/test/ui/privacy/decl-macro.stderr @@ -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 diff --git a/src/test/ui/privacy/privacy-in-paths.stderr b/src/test/ui/privacy/privacy-in-paths.stderr index 8860d8f15f7..2eb3ebb51c2 100644 --- a/src/test/ui/privacy/privacy-in-paths.stderr +++ b/src/test/ui/privacy/privacy-in-paths.stderr @@ -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 diff --git a/src/test/ui/privacy/privacy-ns2.stderr b/src/test/ui/privacy/privacy-ns2.stderr index 8b12109b373..0c826147a1c 100644 --- a/src/test/ui/privacy/privacy-ns2.stderr +++ b/src/test/ui/privacy/privacy-ns2.stderr @@ -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 diff --git a/src/test/ui/privacy/privacy-ufcs.stderr b/src/test/ui/privacy/privacy-ufcs.stderr index 08640b802a2..e93a458ce6c 100644 --- a/src/test/ui/privacy/privacy-ufcs.stderr +++ b/src/test/ui/privacy/privacy-ufcs.stderr @@ -2,7 +2,7 @@ error[E0603]: trait `Bar` is private --> $DIR/privacy-ufcs.rs:12:20 | LL | ::baz(); - | ^^^ this trait is private + | ^^^ private trait | note: the trait `Bar` is defined here --> $DIR/privacy-ufcs.rs:4:5 diff --git a/src/test/ui/privacy/privacy1.stderr b/src/test/ui/privacy/privacy1.stderr index ec2bc0d84ac..fee6f8d5639 100644 --- a/src/test/ui/privacy/privacy1.stderr +++ b/src/test/ui/privacy/privacy1.stderr @@ -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 diff --git a/src/test/ui/privacy/privacy2.stderr b/src/test/ui/privacy/privacy2.stderr index b10c3a52659..c2a33ce1f59 100644 --- a/src/test/ui/privacy/privacy2.stderr +++ b/src/test/ui/privacy/privacy2.stderr @@ -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 diff --git a/src/test/ui/privacy/privacy4.stderr b/src/test/ui/privacy/privacy4.stderr index e34b2d5049b..7552fa71a3a 100644 --- a/src/test/ui/privacy/privacy4.stderr +++ b/src/test/ui/privacy/privacy4.stderr @@ -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 diff --git a/src/test/ui/privacy/privacy5.stderr b/src/test/ui/privacy/privacy5.stderr index 197a857cc3d..216abfc68b8 100644 --- a/src/test/ui/privacy/privacy5.stderr +++ b/src/test/ui/privacy/privacy5.stderr @@ -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 | diff --git a/src/test/ui/privacy/private-impl-method.stderr b/src/test/ui/privacy/private-impl-method.stderr index 6833cdb4df9..444b9180b3f 100644 --- a/src/test/ui/privacy/private-impl-method.stderr +++ b/src/test/ui/privacy/private-impl-method.stderr @@ -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 diff --git a/src/test/ui/privacy/private-in-public-non-principal-2.stderr b/src/test/ui/privacy/private-in-public-non-principal-2.stderr index 2db49257226..1b6d143b932 100644 --- a/src/test/ui/privacy/private-in-public-non-principal-2.stderr +++ b/src/test/ui/privacy/private-in-public-non-principal-2.stderr @@ -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 diff --git a/src/test/ui/privacy/private-inferred-type-1.stderr b/src/test/ui/privacy/private-inferred-type-1.stderr index 097b8b9a61e..576498b2cf8 100644 --- a/src/test/ui/privacy/private-inferred-type-1.stderr +++ b/src/test/ui/privacy/private-inferred-type-1.stderr @@ -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 diff --git a/src/test/ui/privacy/private-inferred-type-2.stderr b/src/test/ui/privacy/private-inferred-type-2.stderr index da95cc49241..f19e367ef11 100644 --- a/src/test/ui/privacy/private-inferred-type-2.stderr +++ b/src/test/ui/privacy/private-inferred-type-2.stderr @@ -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 diff --git a/src/test/ui/privacy/private-inferred-type-3.stderr b/src/test/ui/privacy/private-inferred-type-3.stderr index 376f1334ff8..39ef6472526 100644 --- a/src/test/ui/privacy/private-inferred-type-3.stderr +++ b/src/test/ui/privacy/private-inferred-type-3.stderr @@ -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() {::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) {ext::Pub::::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) diff --git a/src/test/ui/privacy/private-inferred-type.stderr b/src/test/ui/privacy/private-inferred-type.stderr index 48c83c21865..7d1f794bfe4 100644 --- a/src/test/ui/privacy/private-inferred-type.stderr +++ b/src/test/ui/privacy/private-inferred-type.stderr @@ -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 _: ::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::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 | ::TRAIT_ASSOC_CONST; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:108:6 | LL | >::INHERENT_ASSOC_CONST; - | ^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^ private type error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:109:5 | LL | >::INHERENT_ASSOC_CONST_GENERIC_SELF; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:110:5 | LL | >::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() {::method}` is private --> $DIR/private-inferred-type.rs:43:9 | LL | ::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) {m::Pub::::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 diff --git a/src/test/ui/privacy/private-item-simple.stderr b/src/test/ui/privacy/private-item-simple.stderr index f51b74f6cb5..e3d90150e2e 100644 --- a/src/test/ui/privacy/private-item-simple.stderr +++ b/src/test/ui/privacy/private-item-simple.stderr @@ -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 diff --git a/src/test/ui/privacy/private-method-cross-crate.stderr b/src/test/ui/privacy/private-method-cross-crate.stderr index 6b49063815a..8a47846d667 100644 --- a/src/test/ui/privacy/private-method-cross-crate.stderr +++ b/src/test/ui/privacy/private-method-cross-crate.stderr @@ -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 diff --git a/src/test/ui/privacy/private-method-inherited.stderr b/src/test/ui/privacy/private-method-inherited.stderr index 5551e1bd759..8083b197a5d 100644 --- a/src/test/ui/privacy/private-method-inherited.stderr +++ b/src/test/ui/privacy/private-method-inherited.stderr @@ -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 diff --git a/src/test/ui/privacy/private-method.stderr b/src/test/ui/privacy/private-method.stderr index 583dc123e24..a15fce46877 100644 --- a/src/test/ui/privacy/private-method.stderr +++ b/src/test/ui/privacy/private-method.stderr @@ -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 diff --git a/src/test/ui/privacy/private-struct-field-ctor.stderr b/src/test/ui/privacy/private-struct-field-ctor.stderr index 97585c1d880..7c32ebc2cf7 100644 --- a/src/test/ui/privacy/private-struct-field-ctor.stderr +++ b/src/test/ui/privacy/private-struct-field-ctor.stderr @@ -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 diff --git a/src/test/ui/privacy/private-struct-field-pattern.stderr b/src/test/ui/privacy/private-struct-field-pattern.stderr index 69bd58aacfc..9190317403e 100644 --- a/src/test/ui/privacy/private-struct-field-pattern.stderr +++ b/src/test/ui/privacy/private-struct-field-pattern.stderr @@ -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 diff --git a/src/test/ui/privacy/private-type-in-interface.stderr b/src/test/ui/privacy/private-type-in-interface.stderr index aa4bfb7fc9a..ea89035c3d0 100644 --- a/src/test/ui/privacy/private-type-in-interface.stderr +++ b/src/test/ui/privacy/private-type-in-interface.stderr @@ -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 = ::X; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type error: type `m::Priv` is private --> $DIR/private-type-in-interface.rs:27:11 | LL | fn g() -> impl Tr2 { 0 } - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^ private type error: type `ext::Priv` is private --> $DIR/private-type-in-interface.rs:28:15 | LL | fn g_ext() -> impl Tr2 { 0 } - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ private type error: aborting due to 9 previous errors diff --git a/src/test/ui/privacy/restricted/struct-literal-field.stderr b/src/test/ui/privacy/restricted/struct-literal-field.stderr index dd609944a4b..591980dc345 100644 --- a/src/test/ui/privacy/restricted/struct-literal-field.stderr +++ b/src/test/ui/privacy/restricted/struct-literal-field.stderr @@ -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 diff --git a/src/test/ui/privacy/restricted/test.stderr b/src/test/ui/privacy/restricted/test.stderr index 4d616a0b81b..5bcccc6d69c 100644 --- a/src/test/ui/privacy/restricted/test.stderr +++ b/src/test/ui/privacy/restricted/test.stderr @@ -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 diff --git a/src/test/ui/privacy/union-field-privacy-1.stderr b/src/test/ui/privacy/union-field-privacy-1.stderr index 96a1d7ed509..15096eb1139 100644 --- a/src/test/ui/privacy/union-field-privacy-1.stderr +++ b/src/test/ui/privacy/union-field-privacy-1.stderr @@ -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 diff --git a/src/test/ui/proc-macro/disappearing-resolution.stderr b/src/test/ui/proc-macro/disappearing-resolution.stderr index 3beaedf61d7..ff7ddcde6e0 100644 --- a/src/test/ui/proc-macro/disappearing-resolution.stderr +++ b/src/test/ui/proc-macro/disappearing-resolution.stderr @@ -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 diff --git a/src/test/ui/reachable/unreachable-variant.stderr b/src/test/ui/reachable/unreachable-variant.stderr index c2e1d774e28..6c27a2756f7 100644 --- a/src/test/ui/reachable/unreachable-variant.stderr +++ b/src/test/ui/reachable/unreachable-variant.stderr @@ -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 diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index bf24cfc4d73..37a9ff7bd1b 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -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 diff --git a/src/test/ui/resolve/privacy-struct-ctor.stderr b/src/test/ui/resolve/privacy-struct-ctor.stderr index 1673ec46ba4..baf7dd84eb0 100644 --- a/src/test/ui/resolve/privacy-struct-ctor.stderr +++ b/src/test/ui/resolve/privacy-struct-ctor.stderr @@ -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 | diff --git a/src/test/ui/resolve/resolve-hint-macro.stderr b/src/test/ui/resolve/resolve-hint-macro.stderr index ebe3c36f21e..361da4cc78e 100644 --- a/src/test/ui/resolve/resolve-hint-macro.stderr +++ b/src/test/ui/resolve/resolve-hint-macro.stderr @@ -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 diff --git a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr index f992988c93f..4e91e7bff34 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr @@ -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 diff --git a/src/test/ui/rfc-2008-non-exhaustive/variant.stderr b/src/test/ui/rfc-2008-non-exhaustive/variant.stderr index 2a438753a2c..ae4f6aff11a 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/variant.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/variant.stderr @@ -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 diff --git a/src/test/ui/shadowed/shadowed-use-visibility.stderr b/src/test/ui/shadowed/shadowed-use-visibility.stderr index 2244f3a46b2..1a642ae6e8e 100644 --- a/src/test/ui/shadowed/shadowed-use-visibility.stderr +++ b/src/test/ui/shadowed/shadowed-use-visibility.stderr @@ -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 diff --git a/src/test/ui/stability-in-private-module.stderr b/src/test/ui/stability-in-private-module.stderr index 3a974164f94..35a09b21995 100644 --- a/src/test/ui/stability-in-private-module.stderr +++ b/src/test/ui/stability-in-private-module.stderr @@ -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 diff --git a/src/test/ui/static/static-method-privacy.stderr b/src/test/ui/static/static-method-privacy.stderr index 78d211438cc..bc35b4067a8 100644 --- a/src/test/ui/static/static-method-privacy.stderr +++ b/src/test/ui/static/static-method-privacy.stderr @@ -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 diff --git a/src/test/ui/static/static-priv-by-default2.stderr b/src/test/ui/static/static-priv-by-default2.stderr index f6cd40412dd..d731da79246 100644 --- a/src/test/ui/static/static-priv-by-default2.stderr +++ b/src/test/ui/static/static-priv-by-default2.stderr @@ -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 diff --git a/src/test/ui/structs/struct-variant-privacy-xc.stderr b/src/test/ui/structs/struct-variant-privacy-xc.stderr index 0203b7b5242..4e022cef1b2 100644 --- a/src/test/ui/structs/struct-variant-privacy-xc.stderr +++ b/src/test/ui/structs/struct-variant-privacy-xc.stderr @@ -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 diff --git a/src/test/ui/structs/struct-variant-privacy.stderr b/src/test/ui/structs/struct-variant-privacy.stderr index d1b603f9d46..a6bc381ff6b 100644 --- a/src/test/ui/structs/struct-variant-privacy.stderr +++ b/src/test/ui/structs/struct-variant-privacy.stderr @@ -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 diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/trait-item-privacy.stderr index 4b40c6405c4..f8ffc949b06 100644 --- a/src/test/ui/traits/trait-item-privacy.stderr +++ b/src/test/ui/traits/trait-item-privacy.stderr @@ -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 diff --git a/src/test/ui/traits/trait-method-private.stderr b/src/test/ui/traits/trait-method-private.stderr index 035c1ea092b..c33673aea4d 100644 --- a/src/test/ui/traits/trait-method-private.stderr +++ b/src/test/ui/traits/trait-method-private.stderr @@ -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: diff --git a/src/test/ui/try-block/try-block-in-edition2015.stderr b/src/test/ui/try-block/try-block-in-edition2015.stderr index 9b4fe2c1205..fe870ab737c 100644 --- a/src/test/ui/try-block/try-block-in-edition2015.stderr +++ b/src/test/ui/try-block/try-block-in-edition2015.stderr @@ -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 diff --git a/src/test/ui/use/use-from-trait-xc.stderr b/src/test/ui/use/use-from-trait-xc.stderr index 3f38a6cae7b..37b4e61c808 100644 --- a/src/test/ui/use/use-from-trait-xc.stderr +++ b/src/test/ui/use/use-from-trait-xc.stderr @@ -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 diff --git a/src/test/ui/use/use-mod/use-mod-3.stderr b/src/test/ui/use/use-mod/use-mod-3.stderr index 4852759286a..1b12b3c6fa0 100644 --- a/src/test/ui/use/use-mod/use-mod-3.stderr +++ b/src/test/ui/use/use-mod/use-mod-3.stderr @@ -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 diff --git a/src/test/ui/xc-private-method.stderr b/src/test/ui/xc-private-method.stderr index 6a68bef90ef..902998cf0c1 100644 --- a/src/test/ui/xc-private-method.stderr +++ b/src/test/ui/xc-private-method.stderr @@ -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 diff --git a/src/test/ui/xc-private-method2.stderr b/src/test/ui/xc-private-method2.stderr index 84a8b9817c0..0ebdb0a06d8 100644 --- a/src/test/ui/xc-private-method2.stderr +++ b/src/test/ui/xc-private-method2.stderr @@ -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 diff --git a/src/test/ui/xcrate/xcrate-private-by-default.stderr b/src/test/ui/xcrate/xcrate-private-by-default.stderr index 842069d6135..a97f55de5f8 100644 --- a/src/test/ui/xcrate/xcrate-private-by-default.stderr +++ b/src/test/ui/xcrate/xcrate-private-by-default.stderr @@ -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::(); - | ^ 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::(); - | ^ 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::(); - | ^^^ 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::(); - | ^^^ this module is private + | ^^^ private module | note: the module `foo` is defined here --> $DIR/auxiliary/static_priv_by_default.rs:12:1