Normalize wording of privacy access labels

This commit is contained in:
Esteban Küber 2020-03-22 15:36:54 -07:00
parent 94bbd46682
commit 854b78fe22
89 changed files with 370 additions and 332 deletions

View File

@ -1038,7 +1038,7 @@ impl<'a, 'tcx> NamePrivacyVisitor<'a, 'tcx> {
def.variant_descr(), def.variant_descr(),
self.tcx.def_path_str(def.did) self.tcx.def_path_str(def.did)
) )
.span_label(span, format!("field `{}` is private", field.ident)) .span_label(span, "private field")
.emit(); .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 { 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); let is_error = !self.item_is_accessible(def_id);
if is_error { 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 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::Resolved(_, ref path) => path.to_string(),
hir::QPath::TypeRelative(_, ref segment) => segment.ident.to_string(), hir::QPath::TypeRelative(_, ref segment) => segment.ident.to_string(),
}; };
let msg = format!("{} `{}` is private", kind.descr(def_id), name); let kind = kind.descr(def_id);
self.tcx.sess.span_err(span, &msg); self.tcx
.sess
.struct_span_err(span, &format!("{} `{}` is private", kind, name))
.span_label(span, &format!("private {}", kind))
.emit();
return; return;
} }
} }

View File

@ -952,7 +952,7 @@ impl<'a> Resolver<'a> {
let descr = get_descr(binding); let descr = get_descr(binding);
let mut err = let mut err =
struct_span_err!(self.session, ident.span, E0603, "{} `{}` is private", descr, ident); 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 { if let Some(span) = ctor_fields_span {
err.span_label(span, "a constructor is private if any of the fields is private"); err.span_label(span, "a constructor is private if any of the fields is private");
} }

View File

@ -506,10 +506,10 @@ impl<'a> LateResolutionVisitor<'a, '_, '_> {
match (res, source) { match (res, source) {
(Res::Def(DefKind::Macro(MacroKind::Bang), _), _) => { (Res::Def(DefKind::Macro(MacroKind::Bang), _), _) => {
err.span_suggestion( err.span_suggestion_verbose(
span, span.shrink_to_hi(),
"use `!` to invoke the macro", "use `!` to invoke the macro",
format!("{}!", path_str), "!".to_string(),
Applicability::MaybeIncorrect, Applicability::MaybeIncorrect,
); );
if path_str == "try" && span.rust_2015() { if path_str == "try" && span.rust_2015() {

View File

@ -1452,8 +1452,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
.expect("missing associated type"); .expect("missing associated type");
if !assoc_ty.vis.is_accessible_from(def_scope, tcx) { if !assoc_ty.vis.is_accessible_from(def_scope, tcx) {
let msg = format!("associated type `{}` is private", binding.item_name); tcx.sess
tcx.sess.span_err(binding.span, &msg); .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); 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; let kind = DefKind::AssocTy;
if !item.vis.is_accessible_from(def_scope, tcx) { if !item.vis.is_accessible_from(def_scope, tcx) {
let msg = format!("{} `{}` is private", kind.descr(item.def_id), assoc_ident); let kind = kind.descr(item.def_id);
tcx.sess.span_err(span, &msg); 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); tcx.check_stability(item.def_id, Some(hir_ref_id), span);

View File

@ -769,14 +769,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
MethodError::PrivateMatch(kind, def_id, out_of_scope_traits) => { MethodError::PrivateMatch(kind, def_id, out_of_scope_traits) => {
let kind = kind.descr(def_id);
let mut err = struct_span_err!( let mut err = struct_span_err!(
self.tcx.sess, self.tcx.sess,
span, span,
E0624, E0624,
"{} `{}` is private", "{} `{}` is private",
kind.descr(def_id), kind,
item_name item_name
); );
err.span_label(span, &format!("private {}", kind));
self.suggest_valid_traits(&mut err, out_of_scope_traits); self.suggest_valid_traits(&mut err, out_of_scope_traits);
err.emit(); err.emit();
} }

View File

@ -2,7 +2,7 @@ error[E0624]: associated constant `ID` is private
--> $DIR/associated-const-private-impl.rs:13:19 --> $DIR/associated-const-private-impl.rs:13:19
| |
LL | assert_eq!(1, bar1::Foo::ID); LL | assert_eq!(1, bar1::Foo::ID);
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^ private associated constant
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,13 +2,13 @@ error[E0451]: field `b` of struct `bar::Foo` is private
--> $DIR/E0451.rs:14:21 --> $DIR/E0451.rs:14:21
| |
LL | let bar::Foo{a, b} = foo; LL | let bar::Foo{a, b} = foo;
| ^ field `b` is private | ^ private field
error[E0451]: field `b` of struct `bar::Foo` is private error[E0451]: field `b` of struct `bar::Foo` is private
--> $DIR/E0451.rs:18:29 --> $DIR/E0451.rs:18:29
| |
LL | let f = bar::Foo{ a: 0, b: 0 }; LL | let f = bar::Foo{ a: 0, b: 0 };
| ^^^^ field `b` is private | ^^^^ private field
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -2,7 +2,7 @@ error[E0603]: constant `PRIVATE` is private
--> $DIR/E0603.rs:6:17 --> $DIR/E0603.rs:6:17
| |
LL | SomeModule::PRIVATE; LL | SomeModule::PRIVATE;
| ^^^^^^^ this constant is private | ^^^^^^^ private constant
| |
note: the constant `PRIVATE` is defined here note: the constant `PRIVATE` is defined here
--> $DIR/E0603.rs:2:5 --> $DIR/E0603.rs:2:5

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `method` is private
--> $DIR/E0624.rs:11:9 --> $DIR/E0624.rs:11:9
| |
LL | foo.method(); LL | foo.method();
| ^^^^^^ | ^^^^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -8,7 +8,7 @@ error[E0603]: constant `FOO` is private
--> $DIR/error-festival.rs:22:10 --> $DIR/error-festival.rs:22:10
| |
LL | foo::FOO; LL | foo::FOO;
| ^^^ this constant is private | ^^^ private constant
| |
note: the constant `FOO` is defined here note: the constant `FOO` is defined here
--> $DIR/error-festival.rs:7:5 --> $DIR/error-festival.rs:7:5

View File

@ -83,19 +83,19 @@ error[E0624]: associated function `pub_crate` is private
--> $DIR/explore-issue-38412.rs:50:7 --> $DIR/explore-issue-38412.rs:50:7
| |
LL | r.pub_crate(); LL | r.pub_crate();
| ^^^^^^^^^ | ^^^^^^^^^ private associated function
error[E0624]: associated function `pub_mod` is private error[E0624]: associated function `pub_mod` is private
--> $DIR/explore-issue-38412.rs:51:7 --> $DIR/explore-issue-38412.rs:51:7
| |
LL | r.pub_mod(); LL | r.pub_mod();
| ^^^^^^^ | ^^^^^^^ private associated function
error[E0624]: associated function `private` is private error[E0624]: associated function `private` is private
--> $DIR/explore-issue-38412.rs:52:7 --> $DIR/explore-issue-38412.rs:52:7
| |
LL | r.private(); LL | r.private();
| ^^^^^^^ | ^^^^^^^ private associated function
error[E0658]: use of unstable library feature 'unstable_undeclared' error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:57:7 --> $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 --> $DIR/explore-issue-38412.rs:63:7
| |
LL | t.pub_crate(); LL | t.pub_crate();
| ^^^^^^^^^ | ^^^^^^^^^ private associated function
error[E0624]: associated function `pub_mod` is private error[E0624]: associated function `pub_mod` is private
--> $DIR/explore-issue-38412.rs:64:7 --> $DIR/explore-issue-38412.rs:64:7
| |
LL | t.pub_mod(); LL | t.pub_mod();
| ^^^^^^^ | ^^^^^^^ private associated function
error[E0624]: associated function `private` is private error[E0624]: associated function `private` is private
--> $DIR/explore-issue-38412.rs:65:7 --> $DIR/explore-issue-38412.rs:65:7
| |
LL | t.private(); LL | t.private();
| ^^^^^^^ | ^^^^^^^ private associated function
error: aborting due to 19 previous errors error: aborting due to 19 previous errors

View File

@ -2,7 +2,7 @@ error[E0603]: function `unexported` is private
--> $DIR/export-import.rs:1:8 --> $DIR/export-import.rs:1:8
| |
LL | use m::unexported; LL | use m::unexported;
| ^^^^^^^^^^ this function is private | ^^^^^^^^^^ private function
| |
note: the function `unexported` is defined here note: the function `unexported` is defined here
--> $DIR/export-import.rs:7:5 --> $DIR/export-import.rs:7:5

View File

@ -2,7 +2,7 @@ error[E0603]: enum `Y` is private
--> $DIR/export-tag-variant.rs:7:26 --> $DIR/export-tag-variant.rs:7:26
| |
LL | fn main() { let z = foo::Y::Y1; } LL | fn main() { let z = foo::Y::Y1; }
| ^ this enum is private | ^ private enum
| |
note: the enum `Y` is defined here note: the enum `Y` is defined here
--> $DIR/export-tag-variant.rs:4:5 --> $DIR/export-tag-variant.rs:4:5

View File

@ -26,7 +26,7 @@ error[E0603]: function `z` is private
--> $DIR/export.rs:10:18 --> $DIR/export.rs:10:18
| |
LL | fn main() { foo::z(10); } LL | fn main() { foo::z(10); }
| ^ this function is private | ^ private function
| |
note: the function `z` is defined here note: the function `z` is defined here
--> $DIR/export.rs:5:5 --> $DIR/export.rs:5:5

View File

@ -2,7 +2,7 @@ error[E0603]: crate import `core` is private
--> $DIR/extern-crate-visibility.rs:6:10 --> $DIR/extern-crate-visibility.rs:6:10
| |
LL | use foo::core::cell; LL | use foo::core::cell;
| ^^^^ this crate import is private | ^^^^ private crate import
| |
note: the crate import `core` is defined here note: the crate import `core` is defined here
--> $DIR/extern-crate-visibility.rs:2:5 --> $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 --> $DIR/extern-crate-visibility.rs:9:10
| |
LL | foo::core::cell::Cell::new(0); LL | foo::core::cell::Cell::new(0);
| ^^^^ this crate import is private | ^^^^ private crate import
| |
note: the crate import `core` is defined here note: the crate import `core` is defined here
--> $DIR/extern-crate-visibility.rs:2:5 --> $DIR/extern-crate-visibility.rs:2:5

View File

@ -2,7 +2,7 @@ error[E0451]: field `secret_uid` of struct `foo::S` is private
--> $DIR/functional-struct-update-respects-privacy.rs:28:49 --> $DIR/functional-struct-update-respects-privacy.rs:28:49
| |
LL | let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ... 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 error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error: type `foo::S` is private
--> $DIR/fields.rs:15:17 --> $DIR/fields.rs:15:17
| |
LL | let s = S { x: 0 }; LL | let s = S { x: 0 };
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
... ...
LL | let s = foo::m!(S, x); LL | let s = foo::m!(S, x);
| ------------- in this macro invocation | ------------- in this macro invocation
@ -13,7 +13,7 @@ error: type `foo::S` is private
--> $DIR/fields.rs:16:17 --> $DIR/fields.rs:16:17
| |
LL | let _ = s.x; LL | let _ = s.x;
| ^ | ^ private type
... ...
LL | let s = foo::m!(S, x); LL | let s = foo::m!(S, x);
| ------------- in this macro invocation | ------------- in this macro invocation
@ -24,7 +24,7 @@ error: type `foo::T` is private
--> $DIR/fields.rs:18:17 --> $DIR/fields.rs:18:17
| |
LL | let t = T(0); LL | let t = T(0);
| ^^^^ | ^^^^ private type
... ...
LL | let s = foo::m!(S, x); LL | let s = foo::m!(S, x);
| ------------- in this macro invocation | ------------- in this macro invocation
@ -35,7 +35,7 @@ error: type `foo::T` is private
--> $DIR/fields.rs:19:17 --> $DIR/fields.rs:19:17
| |
LL | let _ = t.0; LL | let _ = t.0;
| ^ | ^ private type
... ...
LL | let s = foo::m!(S, x); LL | let s = foo::m!(S, x);
| ------------- in this macro invocation | ------------- in this macro invocation

View File

@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r foo::S) {foo::S::f}` is private
--> $DIR/impl_items.rs:12:23 --> $DIR/impl_items.rs:12:23
| |
LL | let _: () = S.f(); LL | let _: () = S.f();
| ^ | ^ private type
... ...
LL | foo::m!(); LL | foo::m!();
| ---------- in this macro invocation | ---------- in this macro invocation

View File

@ -2,7 +2,7 @@ error: type `fn() -> u32 {intercrate::foo::bar::f}` is private
--> $DIR/intercrate.rs:10:16 --> $DIR/intercrate.rs:10:16
| |
LL | assert_eq!(intercrate::foo::m!(), 1); 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) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -2,7 +2,7 @@ error[E0603]: function `f` is private
--> $DIR/privacy.rs:16:14 --> $DIR/privacy.rs:16:14
| |
LL | foo::f() LL | foo::f()
| ^ this function is private | ^ private function
| |
note: the function `f` is defined here note: the function `f` is defined here
--> $DIR/privacy.rs:4:5 --> $DIR/privacy.rs:4:5

View File

@ -8,13 +8,23 @@ error[E0423]: expected value, found macro `semitransparent`
--> $DIR/rustc-macro-transparency.rs:29:5 --> $DIR/rustc-macro-transparency.rs:29:5
| |
LL | semitransparent; LL | semitransparent;
| ^^^^^^^^^^^^^^^ help: use `!` to invoke the macro: `semitransparent!` | ^^^^^^^^^^^^^^^
|
help: use `!` to invoke the macro
|
LL | semitransparent!;
| ^
error[E0423]: expected value, found macro `opaque` error[E0423]: expected value, found macro `opaque`
--> $DIR/rustc-macro-transparency.rs:30:5 --> $DIR/rustc-macro-transparency.rs:30:5
| |
LL | opaque; LL | opaque;
| ^^^^^^ help: use `!` to invoke the macro: `opaque!` | ^^^^^^
|
help: use `!` to invoke the macro
|
LL | opaque!;
| ^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -17,7 +17,7 @@ error[E0603]: unresolved item import `foo` is private
--> $DIR/import.rs:15:10 --> $DIR/import.rs:15:10
| |
LL | zed::foo(); LL | zed::foo();
| ^^^ this unresolved item import is private | ^^^ private unresolved item import
| |
note: the unresolved item import `foo` is defined here note: the unresolved item import `foo` is defined here
--> $DIR/import.rs:10:9 --> $DIR/import.rs:10:9

View File

@ -2,7 +2,7 @@ error[E0603]: struct import `ParseOptions` is private
--> $DIR/issue-55884-2.rs:12:17 --> $DIR/issue-55884-2.rs:12:17
| |
LL | pub use parser::ParseOptions; LL | pub use parser::ParseOptions;
| ^^^^^^^^^^^^ this struct import is private | ^^^^^^^^^^^^ private struct import
| |
note: the struct import `ParseOptions` is defined here... note: the struct import `ParseOptions` is defined here...
--> $DIR/issue-55884-2.rs:9:9 --> $DIR/issue-55884-2.rs:9:9

View File

@ -14,7 +14,7 @@ error[E0603]: module import `foo` is private
--> $DIR/reexports.rs:33:15 --> $DIR/reexports.rs:33:15
| |
LL | use b::a::foo::S; LL | use b::a::foo::S;
| ^^^ this module import is private | ^^^ private module import
| |
note: the module import `foo` is defined here... note: the module import `foo` is defined here...
--> $DIR/reexports.rs:21:17 --> $DIR/reexports.rs:21:17
@ -31,7 +31,7 @@ error[E0603]: module import `foo` is private
--> $DIR/reexports.rs:34:15 --> $DIR/reexports.rs:34:15
| |
LL | use b::b::foo::S as T; LL | use b::b::foo::S as T;
| ^^^ this module import is private | ^^^ private module import
| |
note: the module import `foo` is defined here... note: the module import `foo` is defined here...
--> $DIR/reexports.rs:26:17 --> $DIR/reexports.rs:26:17

View File

@ -38,7 +38,7 @@ error[E0603]: function `quz` is private
--> $DIR/unresolved-imports-used.rs:9:10 --> $DIR/unresolved-imports-used.rs:9:10
| |
LL | use qux::quz; LL | use qux::quz;
| ^^^ this function is private | ^^^ private function
| |
note: the function `quz` is defined here note: the function `quz` is defined here
--> $DIR/unresolved-imports-used.rs:5:4 --> $DIR/unresolved-imports-used.rs:5:4

View File

@ -2,7 +2,7 @@ error[E0603]: struct `S` is private
--> $DIR/issue-10545.rs:6:14 --> $DIR/issue-10545.rs:6:14
| |
LL | fn foo(_: a::S) { LL | fn foo(_: a::S) {
| ^ this struct is private | ^ private struct
| |
note: the struct `S` is defined here note: the struct `S` is defined here
--> $DIR/issue-10545.rs:2:5 --> $DIR/issue-10545.rs:2:5

View File

@ -2,7 +2,7 @@ error[E0603]: trait `Foo` is private
--> $DIR/issue-11593.rs:7:24 --> $DIR/issue-11593.rs:7:24
| |
LL | impl private_trait_xc::Foo for Bar {} LL | impl private_trait_xc::Foo for Bar {}
| ^^^ this trait is private | ^^^ private trait
| |
note: the trait `Foo` is defined here note: the trait `Foo` is defined here
--> $DIR/auxiliary/private-trait-xc.rs:1:1 --> $DIR/auxiliary/private-trait-xc.rs:1:1

View File

@ -2,7 +2,7 @@ error[E0603]: enum `Foo` is private
--> $DIR/issue-11680.rs:6:21 --> $DIR/issue-11680.rs:6:21
| |
LL | let _b = other::Foo::Bar(1); LL | let _b = other::Foo::Bar(1);
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Foo` is defined here note: the enum `Foo` is defined here
--> $DIR/auxiliary/issue-11680.rs:1:1 --> $DIR/auxiliary/issue-11680.rs:1:1
@ -14,7 +14,7 @@ error[E0603]: enum `Foo` is private
--> $DIR/issue-11680.rs:9:27 --> $DIR/issue-11680.rs:9:27
| |
LL | let _b = other::test::Foo::Bar(1); LL | let _b = other::test::Foo::Bar(1);
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Foo` is defined here note: the enum `Foo` is defined here
--> $DIR/auxiliary/issue-11680.rs:6:5 --> $DIR/auxiliary/issue-11680.rs:6:5

View File

@ -2,7 +2,7 @@ error[E0603]: unit struct `C` is private
--> $DIR/issue-13407.rs:6:8 --> $DIR/issue-13407.rs:6:8
| |
LL | A::C = 1; LL | A::C = 1;
| ^ this unit struct is private | ^ private unit struct
| |
note: the unit struct `C` is defined here note: the unit struct `C` is defined here
--> $DIR/issue-13407.rs:2:5 --> $DIR/issue-13407.rs:2:5

View File

@ -2,7 +2,7 @@ error[E0603]: struct `Foo` is private
--> $DIR/issue-13641.rs:9:8 --> $DIR/issue-13641.rs:9:8
| |
LL | a::Foo::new(); LL | a::Foo::new();
| ^^^ this struct is private | ^^^ private struct
| |
note: the struct `Foo` is defined here note: the struct `Foo` is defined here
--> $DIR/issue-13641.rs:2:5 --> $DIR/issue-13641.rs:2:5
@ -14,7 +14,7 @@ error[E0603]: enum `Bar` is private
--> $DIR/issue-13641.rs:11:8 --> $DIR/issue-13641.rs:11:8
| |
LL | a::Bar::new(); LL | a::Bar::new();
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Bar` is defined here note: the enum `Bar` is defined here
--> $DIR/issue-13641.rs:4:5 --> $DIR/issue-13641.rs:4:5

View File

@ -2,7 +2,7 @@ error[E0603]: function `bar` is private
--> $DIR/issue-16725.rs:6:19 --> $DIR/issue-16725.rs:6:19
| |
LL | unsafe { foo::bar(); } LL | unsafe { foo::bar(); }
| ^^^ this function is private | ^^^ private function
| |
note: the function `bar` is defined here note: the function `bar` is defined here
--> $DIR/auxiliary/issue-16725.rs:2:5 --> $DIR/auxiliary/issue-16725.rs:2:5

View File

@ -2,7 +2,7 @@ error[E0603]: constant `B` is private
--> $DIR/issue-17718-const-privacy.rs:5:8 --> $DIR/issue-17718-const-privacy.rs:5:8
| |
LL | use a::B; LL | use a::B;
| ^ this constant is private | ^ private constant
| |
note: the constant `B` is defined here note: the constant `B` is defined here
--> $DIR/issue-17718-const-privacy.rs:13:5 --> $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 --> $DIR/issue-17718-const-privacy.rs:8:5
| |
LL | BAR, LL | BAR,
| ^^^ this constant is private | ^^^ private constant
| |
note: the constant `BAR` is defined here note: the constant `BAR` is defined here
--> $DIR/auxiliary/issue-17718-const-privacy.rs:4:1 --> $DIR/auxiliary/issue-17718-const-privacy.rs:4:1

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private
--> $DIR/issue-21202.rs:10:9 --> $DIR/issue-21202.rs:10:9
| |
LL | Foo::foo(&f); LL | Foo::foo(&f);
| ^^^^^^^^ | ^^^^^^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0603]: module `n` is private
--> $DIR/issue-28388-2.rs:7:8 --> $DIR/issue-28388-2.rs:7:8
| |
LL | use m::n::{}; LL | use m::n::{};
| ^ this module is private | ^ private module
| |
note: the module `n` is defined here note: the module `n` is defined here
--> $DIR/issue-28388-2.rs:4:5 --> $DIR/issue-28388-2.rs:4:5

View File

@ -8,7 +8,7 @@ error[E0603]: struct `A` is private
--> $DIR/issue-29161.rs:13:8 --> $DIR/issue-29161.rs:13:8
| |
LL | a::A::default(); LL | a::A::default();
| ^ this struct is private | ^ private struct
| |
note: the struct `A` is defined here note: the struct `A` is defined here
--> $DIR/issue-29161.rs:2:5 --> $DIR/issue-29161.rs:2:5

View File

@ -14,13 +14,13 @@ error[E0624]: associated function `happyfun` is private
--> $DIR/issue-3763.rs:24:18 --> $DIR/issue-3763.rs:24:18
| |
LL | (&my_struct).happyfun(); LL | (&my_struct).happyfun();
| ^^^^^^^^ | ^^^^^^^^ private associated function
error[E0624]: associated function `happyfun` is private error[E0624]: associated function `happyfun` is private
--> $DIR/issue-3763.rs:26:27 --> $DIR/issue-3763.rs:26:27
| |
LL | (Box::new(my_struct)).happyfun(); LL | (Box::new(my_struct)).happyfun();
| ^^^^^^^^ | ^^^^^^^^ private associated function
error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private
--> $DIR/issue-3763.rs:27:26 --> $DIR/issue-3763.rs:27:26

View File

@ -8,7 +8,7 @@ error[E0603]: module `sys` is private
--> $DIR/issue-38857.rs:7:18 --> $DIR/issue-38857.rs:7:18
| |
LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() }; LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
| ^^^ this module is private | ^^^ private module
| |
note: the module `sys` is defined here note: the module `sys` is defined here
--> $SRC_DIR/libstd/lib.rs:LL:COL --> $SRC_DIR/libstd/lib.rs:LL:COL

View File

@ -2,7 +2,7 @@ error[E0603]: function `fly` is private
--> $DIR/issue-3993.rs:1:10 --> $DIR/issue-3993.rs:1:10
| |
LL | use zoo::fly; LL | use zoo::fly;
| ^^^ this function is private | ^^^ private function
| |
note: the function `fly` is defined here note: the function `fly` is defined here
--> $DIR/issue-3993.rs:4:5 --> $DIR/issue-3993.rs:4:5

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private
--> $DIR/issue-53498.rs:16:5 --> $DIR/issue-53498.rs:16:5
| |
LL | test::Foo::<test::B>::foo(); LL | test::Foo::<test::B>::foo();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0603]: constant `baz` is private
--> $DIR/macro-local-data-key-priv.rs:8:10 --> $DIR/macro-local-data-key-priv.rs:8:10
| |
LL | bar::baz.with(|_| ()); LL | bar::baz.with(|_| ());
| ^^^ this constant is private | ^^^ private constant
| |
note: the constant `baz` is defined here note: the constant `baz` is defined here
--> $DIR/macro-local-data-key-priv.rs:4:5 --> $DIR/macro-local-data-key-priv.rs:4:5

View File

@ -14,7 +14,7 @@ error[E0603]: static `x` is private
--> $DIR/pub-item-macro.rs:20:23 --> $DIR/pub-item-macro.rs:20:23
| |
LL | let y: u32 = foo::x; LL | let y: u32 = foo::x;
| ^ this static is private | ^ private static
| |
note: the static `x` is defined here note: the static `x` is defined here
--> $DIR/pub-item-macro.rs:5:9 --> $DIR/pub-item-macro.rs:5:9

View File

@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is p
--> $DIR/associated-item-privacy-inherent.rs:13:21 --> $DIR/associated-item-privacy-inherent.rs:13:21
| |
LL | let value = Pub::method; LL | let value = Pub::method;
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private type
... ...
LL | priv_nominal::mac!(); LL | priv_nominal::mac!();
| --------------------- in this macro invocation | --------------------- 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 --> $DIR/associated-item-privacy-inherent.rs:15:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_nominal::mac!(); LL | priv_nominal::mac!();
| --------------------- in this macro invocation | --------------------- 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 --> $DIR/associated-item-privacy-inherent.rs:17:13
| |
LL | Pub.method(); LL | Pub.method();
| ^^^^^^ | ^^^^^^ private type
... ...
LL | priv_nominal::mac!(); LL | priv_nominal::mac!();
| --------------------- in this macro invocation | --------------------- in this macro invocation
@ -35,7 +35,7 @@ error: associated constant `CONST` is private
--> $DIR/associated-item-privacy-inherent.rs:19:9 --> $DIR/associated-item-privacy-inherent.rs:19:9
| |
LL | Pub::CONST; LL | Pub::CONST;
| ^^^^^^^^^^ | ^^^^^^^^^^ private associated constant
... ...
LL | priv_nominal::mac!(); LL | priv_nominal::mac!();
| --------------------- in this macro invocation | --------------------- in this macro invocation
@ -46,7 +46,7 @@ error: type `priv_signature::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:37:21 --> $DIR/associated-item-privacy-inherent.rs:37:21
| |
LL | let value = Pub::method; LL | let value = Pub::method;
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private type
... ...
LL | priv_signature::mac!(); LL | priv_signature::mac!();
| ----------------------- in this macro invocation | ----------------------- in this macro invocation
@ -57,7 +57,7 @@ error: type `priv_signature::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:39:9 --> $DIR/associated-item-privacy-inherent.rs:39:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_signature::mac!(); LL | priv_signature::mac!();
| ----------------------- in this macro invocation | ----------------------- in this macro invocation
@ -68,7 +68,7 @@ error: type `priv_signature::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:41:13 --> $DIR/associated-item-privacy-inherent.rs:41:13
| |
LL | Pub.method(loop {}); LL | Pub.method(loop {});
| ^^^^^^ | ^^^^^^ private type
... ...
LL | priv_signature::mac!(); LL | priv_signature::mac!();
| ----------------------- in this macro invocation | ----------------------- in this macro invocation
@ -79,7 +79,7 @@ error: type `priv_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:57:21 --> $DIR/associated-item-privacy-inherent.rs:57:21
| |
LL | let value = Pub::method::<Priv>; LL | let value = Pub::method::<Priv>;
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_substs::mac!(); LL | priv_substs::mac!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -90,7 +90,7 @@ error: type `priv_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:59:9 --> $DIR/associated-item-privacy-inherent.rs:59:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_substs::mac!(); LL | priv_substs::mac!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -101,7 +101,7 @@ error: type `priv_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:61:9 --> $DIR/associated-item-privacy-inherent.rs:61:9
| |
LL | Pub.method::<Priv>(); LL | Pub.method::<Priv>();
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_substs::mac!(); LL | priv_substs::mac!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -112,7 +112,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:80:21 --> $DIR/associated-item-privacy-inherent.rs:80:21
| |
LL | let value = <Pub>::method; LL | let value = <Pub>::method;
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -123,7 +123,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:82:9 --> $DIR/associated-item-privacy-inherent.rs:82:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -134,7 +134,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:84:21 --> $DIR/associated-item-privacy-inherent.rs:84:21
| |
LL | let value = Pub::method; LL | let value = Pub::method;
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -145,7 +145,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:86:9 --> $DIR/associated-item-privacy-inherent.rs:86:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -156,7 +156,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:88:21 --> $DIR/associated-item-privacy-inherent.rs:88:21
| |
LL | let value = <Pub>::static_method; LL | let value = <Pub>::static_method;
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -167,7 +167,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:90:9 --> $DIR/associated-item-privacy-inherent.rs:90:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -178,7 +178,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:92:21 --> $DIR/associated-item-privacy-inherent.rs:92:21
| |
LL | let value = Pub::static_method; LL | let value = Pub::static_method;
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -189,7 +189,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:94:9 --> $DIR/associated-item-privacy-inherent.rs:94:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -200,7 +200,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:96:19 --> $DIR/associated-item-privacy-inherent.rs:96:19
| |
LL | Pub(Priv).method(); LL | Pub(Priv).method();
| ^^^^^^ | ^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -211,7 +211,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:99:10 --> $DIR/associated-item-privacy-inherent.rs:99:10
| |
LL | <Pub>::CONST; LL | <Pub>::CONST;
| ^^^ | ^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -222,7 +222,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-inherent.rs:101:9 --> $DIR/associated-item-privacy-inherent.rs:101:9
| |
LL | Pub::CONST; LL | Pub::CONST;
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation

View File

@ -2,7 +2,7 @@ error: type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as priv_trait::Pr
--> $DIR/associated-item-privacy-trait.rs:17:21 --> $DIR/associated-item-privacy-trait.rs:17:21
| |
LL | let value = <Pub as PrivTr>::method; LL | let value = <Pub as PrivTr>::method;
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -13,7 +13,7 @@ error: type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as priv_trait::Pr
--> $DIR/associated-item-privacy-trait.rs:19:9 --> $DIR/associated-item-privacy-trait.rs:19:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -24,7 +24,7 @@ error: type `for<'r> fn(&'r Self) {<Self as priv_trait::PrivTr>::method}` is pri
--> $DIR/associated-item-privacy-trait.rs:21:13 --> $DIR/associated-item-privacy-trait.rs:21:13
| |
LL | Pub.method(); LL | Pub.method();
| ^^^^^^ | ^^^^^^ private type
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -35,7 +35,7 @@ error: associated constant `PrivTr::CONST` is private
--> $DIR/associated-item-privacy-trait.rs:23:9 --> $DIR/associated-item-privacy-trait.rs:23:9
| |
LL | <Pub as PrivTr>::CONST; LL | <Pub as PrivTr>::CONST;
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^ private associated constant
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -46,7 +46,7 @@ error: associated type `PrivTr::AssocTy` is private
--> $DIR/associated-item-privacy-trait.rs:25:16 --> $DIR/associated-item-privacy-trait.rs:25:16
| |
LL | let _: <Pub as PrivTr>::AssocTy; LL | let _: <Pub as PrivTr>::AssocTy;
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^ private associated type
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -57,7 +57,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-trait.rs:27:34 --> $DIR/associated-item-privacy-trait.rs:27:34
| |
LL | pub type InSignatureTy = <Pub as PrivTr>::AssocTy; LL | pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -68,7 +68,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-trait.rs:29:34 --> $DIR/associated-item-privacy-trait.rs:29:34
| |
LL | pub trait InSignatureTr: PrivTr {} LL | pub trait InSignatureTr: PrivTr {}
| ^^^^^^ | ^^^^^^ private trait
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -79,7 +79,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-trait.rs:31:14 --> $DIR/associated-item-privacy-trait.rs:31:14
| |
LL | impl PrivTr for u8 {} LL | impl PrivTr for u8 {}
| ^^^^^^ | ^^^^^^ private trait
... ...
LL | priv_trait::mac!(); LL | priv_trait::mac!();
| ------------------- in this macro invocation | ------------------- in this macro invocation
@ -90,7 +90,7 @@ error: type `priv_signature::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:48:21 --> $DIR/associated-item-privacy-trait.rs:48:21
| |
LL | let value = <Pub as PubTr>::method; LL | let value = <Pub as PubTr>::method;
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_signature::mac!(); LL | priv_signature::mac!();
| ----------------------- in this macro invocation | ----------------------- in this macro invocation
@ -101,7 +101,7 @@ error: type `priv_signature::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:50:9 --> $DIR/associated-item-privacy-trait.rs:50:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_signature::mac!(); LL | priv_signature::mac!();
| ----------------------- in this macro invocation | ----------------------- in this macro invocation
@ -112,7 +112,7 @@ error: type `priv_signature::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:52:13 --> $DIR/associated-item-privacy-trait.rs:52:13
| |
LL | Pub.method(loop {}); LL | Pub.method(loop {});
| ^^^^^^ | ^^^^^^ private type
... ...
LL | priv_signature::mac!(); LL | priv_signature::mac!();
| ----------------------- in this macro invocation | ----------------------- in this macro invocation
@ -123,7 +123,7 @@ error: type `priv_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:69:21 --> $DIR/associated-item-privacy-trait.rs:69:21
| |
LL | let value = <Pub as PubTr>::method::<Priv>; LL | let value = <Pub as PubTr>::method::<Priv>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_substs::mac!(); LL | priv_substs::mac!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -134,7 +134,7 @@ error: type `priv_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:71:9 --> $DIR/associated-item-privacy-trait.rs:71:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_substs::mac!(); LL | priv_substs::mac!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -145,7 +145,7 @@ error: type `priv_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:73:9 --> $DIR/associated-item-privacy-trait.rs:73:9
| |
LL | Pub.method::<Priv>(); LL | Pub.method::<Priv>();
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_substs::mac!(); LL | priv_substs::mac!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -156,7 +156,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:93:21 --> $DIR/associated-item-privacy-trait.rs:93:21
| |
LL | let value = <Pub as PubTr>::method; LL | let value = <Pub as PubTr>::method;
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -167,7 +167,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:95:9 --> $DIR/associated-item-privacy-trait.rs:95:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -178,7 +178,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:97:21 --> $DIR/associated-item-privacy-trait.rs:97:21
| |
LL | let value = <Pub as PubTr<_>>::method; LL | let value = <Pub as PubTr<_>>::method;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -189,7 +189,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:99:9 --> $DIR/associated-item-privacy-trait.rs:99:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -200,7 +200,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:101:9 --> $DIR/associated-item-privacy-trait.rs:101:9
| |
LL | Pub.method(); LL | Pub.method();
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -211,7 +211,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:104:21 --> $DIR/associated-item-privacy-trait.rs:104:21
| |
LL | let value = <Priv as PubTr<_>>::method; LL | let value = <Priv as PubTr<_>>::method;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -222,7 +222,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:106:9 --> $DIR/associated-item-privacy-trait.rs:106:9
| |
LL | value; LL | value;
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -233,7 +233,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:108:9 --> $DIR/associated-item-privacy-trait.rs:108:9
| |
LL | Priv.method(); LL | Priv.method();
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -244,7 +244,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:111:9 --> $DIR/associated-item-privacy-trait.rs:111:9
| |
LL | <Pub as PubTr>::CONST; LL | <Pub as PubTr>::CONST;
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -255,7 +255,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:113:9 --> $DIR/associated-item-privacy-trait.rs:113:9
| |
LL | <Pub as PubTr<_>>::CONST; LL | <Pub as PubTr<_>>::CONST;
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -266,7 +266,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:115:9 --> $DIR/associated-item-privacy-trait.rs:115:9
| |
LL | <Priv as PubTr<_>>::CONST; LL | <Priv as PubTr<_>>::CONST;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -277,7 +277,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:119:30 --> $DIR/associated-item-privacy-trait.rs:119:30
| |
LL | let _: <Pub as PubTr<_>>::AssocTy; LL | let _: <Pub as PubTr<_>>::AssocTy;
| ^ | ^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -288,7 +288,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:121:17 --> $DIR/associated-item-privacy-trait.rs:121:17
| |
LL | let _: <Priv as PubTr<_>>::AssocTy; LL | let _: <Priv as PubTr<_>>::AssocTy;
| ^^^^ | ^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -299,7 +299,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:124:35 --> $DIR/associated-item-privacy-trait.rs:124:35
| |
LL | pub type InSignatureTy1 = <Pub as PubTr>::AssocTy; LL | pub type InSignatureTy1 = <Pub as PubTr>::AssocTy;
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -310,7 +310,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:126:35 --> $DIR/associated-item-privacy-trait.rs:126:35
| |
LL | pub type InSignatureTy2 = <Priv as PubTr<Pub>>::AssocTy; LL | pub type InSignatureTy2 = <Priv as PubTr<Pub>>::AssocTy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation
@ -321,7 +321,7 @@ error: type `priv_parent_substs::Priv` is private
--> $DIR/associated-item-privacy-trait.rs:128:14 --> $DIR/associated-item-privacy-trait.rs:128:14
| |
LL | impl PubTr for u8 {} LL | impl PubTr for u8 {}
| ^^^^^ | ^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation

View File

@ -2,7 +2,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:11:13 --> $DIR/associated-item-privacy-type-binding.rs:11:13
| |
LL | let _: Box<dyn PubTr<AssocTy = u8>>; LL | let _: Box<dyn PubTr<AssocTy = u8>>;
| ^ | ^ private trait
... ...
LL | priv_trait::mac1!(); LL | priv_trait::mac1!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -13,7 +13,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:11:16 --> $DIR/associated-item-privacy-type-binding.rs:11:16
| |
LL | let _: Box<dyn PubTr<AssocTy = u8>>; LL | let _: Box<dyn PubTr<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac1!(); LL | priv_trait::mac1!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -24,7 +24,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:14:31 --> $DIR/associated-item-privacy-type-binding.rs:14:31
| |
LL | type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>; LL | type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac1!(); LL | priv_trait::mac1!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -35,7 +35,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:16:31 --> $DIR/associated-item-privacy-type-binding.rs:16:31
| |
LL | trait InSignatureTr2: PubTr<AssocTy = u8> {} LL | trait InSignatureTr2: PubTr<AssocTy = u8> {}
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac1!(); LL | priv_trait::mac1!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -46,7 +46,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:20:13 --> $DIR/associated-item-privacy-type-binding.rs:20:13
| |
LL | let _: Box<dyn PrivTr<AssocTy = u8>>; LL | let _: Box<dyn PrivTr<AssocTy = u8>>;
| ^ | ^ private trait
... ...
LL | priv_trait::mac2!(); LL | priv_trait::mac2!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -57,7 +57,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:20:16 --> $DIR/associated-item-privacy-type-binding.rs:20:16
| |
LL | let _: Box<dyn PrivTr<AssocTy = u8>>; LL | let _: Box<dyn PrivTr<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac2!(); LL | priv_trait::mac2!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -68,7 +68,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:23:31 --> $DIR/associated-item-privacy-type-binding.rs:23:31
| |
LL | type InSignatureTy1 = Box<dyn PrivTr<AssocTy = u8>>; LL | type InSignatureTy1 = Box<dyn PrivTr<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac2!(); LL | priv_trait::mac2!();
| -------------------- in this macro invocation | -------------------- in this macro invocation
@ -79,7 +79,7 @@ error: trait `priv_trait::PrivTr` is private
--> $DIR/associated-item-privacy-type-binding.rs:25:31 --> $DIR/associated-item-privacy-type-binding.rs:25:31
| |
LL | trait InSignatureTr1: PrivTr<AssocTy = u8> {} LL | trait InSignatureTr1: PrivTr<AssocTy = u8> {}
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^ private trait
... ...
LL | priv_trait::mac2!(); LL | priv_trait::mac2!();
| -------------------- in this macro invocation | -------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:44:13
| |
LL | let _: Box<dyn PubTrWithParam<AssocTy = u8>>; LL | let _: Box<dyn PubTrWithParam<AssocTy = u8>>;
| ^ | ^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:44:16
| |
LL | let _: Box<dyn PubTrWithParam<AssocTy = u8>>; LL | let _: Box<dyn PubTrWithParam<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:47:13
| |
LL | let _: Box<dyn PubTr<AssocTy = u8>>; LL | let _: Box<dyn PubTr<AssocTy = u8>>;
| ^ | ^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:47:16
| |
LL | let _: Box<dyn PubTr<AssocTy = u8>>; LL | let _: Box<dyn PubTr<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:50:35
| |
LL | pub type InSignatureTy1 = Box<dyn PubTrWithParam<AssocTy = u8>>; LL | pub type InSignatureTy1 = Box<dyn PubTrWithParam<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:52:35
| |
LL | pub type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>; LL | pub type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:54:31
| |
LL | trait InSignatureTr1: PubTrWithParam<AssocTy = u8> {} LL | trait InSignatureTr1: PubTrWithParam<AssocTy = u8> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- 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 --> $DIR/associated-item-privacy-type-binding.rs:56:31
| |
LL | trait InSignatureTr2: PubTr<AssocTy = u8> {} LL | trait InSignatureTr2: PubTr<AssocTy = u8> {}
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | priv_parent_substs::mac!(); LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation | --------------------------- in this macro invocation

View File

@ -2,7 +2,7 @@ error[E0603]: macro `mac` is private
--> $DIR/decl-macro.rs:8:8 --> $DIR/decl-macro.rs:8:8
| |
LL | m::mac!(); LL | m::mac!();
| ^^^ this macro is private | ^^^ private macro
| |
note: the macro `mac` is defined here note: the macro `mac` is defined here
--> $DIR/decl-macro.rs:4:5 --> $DIR/decl-macro.rs:4:5

View File

@ -2,7 +2,7 @@ error[E0603]: module `bar` is private
--> $DIR/privacy-in-paths.rs:24:16 --> $DIR/privacy-in-paths.rs:24:16
| |
LL | ::foo::bar::baz::f(); LL | ::foo::bar::baz::f();
| ^^^ this module is private | ^^^ private module
| |
note: the module `bar` is defined here note: the module `bar` is defined here
--> $DIR/privacy-in-paths.rs:3:5 --> $DIR/privacy-in-paths.rs:3:5
@ -14,7 +14,7 @@ error[E0603]: module `bar` is private
--> $DIR/privacy-in-paths.rs:25:16 --> $DIR/privacy-in-paths.rs:25:16
| |
LL | ::foo::bar::S::f(); LL | ::foo::bar::S::f();
| ^^^ this module is private | ^^^ private module
| |
note: the module `bar` is defined here note: the module `bar` is defined here
--> $DIR/privacy-in-paths.rs:3:5 --> $DIR/privacy-in-paths.rs:3:5
@ -26,7 +26,7 @@ error[E0603]: trait `T` is private
--> $DIR/privacy-in-paths.rs:26:23 --> $DIR/privacy-in-paths.rs:26:23
| |
LL | <() as ::foo::T>::Assoc::f(); LL | <() as ::foo::T>::Assoc::f();
| ^ this trait is private | ^ private trait
| |
note: the trait `T` is defined here note: the trait `T` is defined here
--> $DIR/privacy-in-paths.rs:8:5 --> $DIR/privacy-in-paths.rs:8:5

View File

@ -58,7 +58,7 @@ error[E0603]: trait `Bar` is private
--> $DIR/privacy-ns2.rs:63:15 --> $DIR/privacy-ns2.rs:63:15
| |
LL | use foo3::Bar; LL | use foo3::Bar;
| ^^^ this trait is private | ^^^ private trait
| |
note: the trait `Bar` is defined here note: the trait `Bar` is defined here
--> $DIR/privacy-ns2.rs:55:5 --> $DIR/privacy-ns2.rs:55:5
@ -70,7 +70,7 @@ error[E0603]: trait `Bar` is private
--> $DIR/privacy-ns2.rs:67:15 --> $DIR/privacy-ns2.rs:67:15
| |
LL | use foo3::Bar; LL | use foo3::Bar;
| ^^^ this trait is private | ^^^ private trait
| |
note: the trait `Bar` is defined here note: the trait `Bar` is defined here
--> $DIR/privacy-ns2.rs:55:5 --> $DIR/privacy-ns2.rs:55:5
@ -82,7 +82,7 @@ error[E0603]: trait `Bar` is private
--> $DIR/privacy-ns2.rs:74:16 --> $DIR/privacy-ns2.rs:74:16
| |
LL | use foo3::{Bar,Baz}; LL | use foo3::{Bar,Baz};
| ^^^ this trait is private | ^^^ private trait
| |
note: the trait `Bar` is defined here note: the trait `Bar` is defined here
--> $DIR/privacy-ns2.rs:55:5 --> $DIR/privacy-ns2.rs:55:5

View File

@ -2,7 +2,7 @@ error[E0603]: trait `Bar` is private
--> $DIR/privacy-ufcs.rs:12:20 --> $DIR/privacy-ufcs.rs:12:20
| |
LL | <i32 as ::foo::Bar>::baz(); LL | <i32 as ::foo::Bar>::baz();
| ^^^ this trait is private | ^^^ private trait
| |
note: the trait `Bar` is defined here note: the trait `Bar` is defined here
--> $DIR/privacy-ufcs.rs:4:5 --> $DIR/privacy-ufcs.rs:4:5

View File

@ -2,7 +2,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:132:18 --> $DIR/privacy1.rs:132:18
| |
LL | use bar::baz::{foo, bar}; LL | use bar::baz::{foo, bar};
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -14,7 +14,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:132:18 --> $DIR/privacy1.rs:132:18
| |
LL | use bar::baz::{foo, bar}; LL | use bar::baz::{foo, bar};
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -26,7 +26,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:141:18 --> $DIR/privacy1.rs:141:18
| |
LL | use bar::baz; LL | use bar::baz;
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -38,7 +38,7 @@ error[E0603]: module `i` is private
--> $DIR/privacy1.rs:165:20 --> $DIR/privacy1.rs:165:20
| |
LL | use self::foo::i::A; LL | use self::foo::i::A;
| ^ this module is private | ^ private module
| |
note: the module `i` is defined here note: the module `i` is defined here
--> $DIR/privacy1.rs:170:9 --> $DIR/privacy1.rs:170:9
@ -50,7 +50,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:104:16 --> $DIR/privacy1.rs:104:16
| |
LL | ::bar::baz::A::foo(); LL | ::bar::baz::A::foo();
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -62,7 +62,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:105:16 --> $DIR/privacy1.rs:105:16
| |
LL | ::bar::baz::A::bar(); LL | ::bar::baz::A::bar();
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -74,7 +74,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:107:16 --> $DIR/privacy1.rs:107:16
| |
LL | ::bar::baz::A.foo2(); LL | ::bar::baz::A.foo2();
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -86,7 +86,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:108:16 --> $DIR/privacy1.rs:108:16
| |
LL | ::bar::baz::A.bar2(); LL | ::bar::baz::A.bar2();
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -98,7 +98,7 @@ error[E0603]: trait `B` is private
--> $DIR/privacy1.rs:112:16 --> $DIR/privacy1.rs:112:16
| |
LL | ::bar::B::foo(); LL | ::bar::B::foo();
| ^ this trait is private | ^ private trait
| |
note: the trait `B` is defined here note: the trait `B` is defined here
--> $DIR/privacy1.rs:40:5 --> $DIR/privacy1.rs:40:5
@ -110,7 +110,7 @@ error[E0603]: function `epriv` is private
--> $DIR/privacy1.rs:118:20 --> $DIR/privacy1.rs:118:20
| |
LL | ::bar::epriv(); LL | ::bar::epriv();
| ^^^^^ this function is private | ^^^^^ private function
| |
note: the function `epriv` is defined here note: the function `epriv` is defined here
--> $DIR/privacy1.rs:65:9 --> $DIR/privacy1.rs:65:9
@ -122,7 +122,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:127:16 --> $DIR/privacy1.rs:127:16
| |
LL | ::bar::baz::foo(); LL | ::bar::baz::foo();
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -134,7 +134,7 @@ error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:128:16 --> $DIR/privacy1.rs:128:16
| |
LL | ::bar::baz::bar(); LL | ::bar::baz::bar();
| ^^^ this module is private | ^^^ private module
| |
note: the module `baz` is defined here note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5 --> $DIR/privacy1.rs:50:5
@ -146,7 +146,7 @@ error[E0603]: trait `B` is private
--> $DIR/privacy1.rs:157:17 --> $DIR/privacy1.rs:157:17
| |
LL | impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } } LL | impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
| ^ this trait is private | ^ private trait
| |
note: the trait `B` is defined here note: the trait `B` is defined here
--> $DIR/privacy1.rs:40:5 --> $DIR/privacy1.rs:40:5
@ -158,31 +158,31 @@ error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:77:9 --> $DIR/privacy1.rs:77:9
| |
LL | self::baz::A::bar(); LL | self::baz::A::bar();
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar` is private error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:95:5 --> $DIR/privacy1.rs:95:5
| |
LL | bar::A::bar(); LL | bar::A::bar();
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar` is private error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:102:9 --> $DIR/privacy1.rs:102:9
| |
LL | ::bar::A::bar(); LL | ::bar::A::bar();
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar` is private error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:105:9 --> $DIR/privacy1.rs:105:9
| |
LL | ::bar::baz::A::bar(); LL | ::bar::baz::A::bar();
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar2` is private error[E0624]: associated function `bar2` is private
--> $DIR/privacy1.rs:108:23 --> $DIR/privacy1.rs:108:23
| |
LL | ::bar::baz::A.bar2(); LL | ::bar::baz::A.bar2();
| ^^^^ | ^^^^ private associated function
error: aborting due to 18 previous errors error: aborting due to 18 previous errors

View File

@ -8,7 +8,7 @@ error[E0603]: function import `foo` is private
--> $DIR/privacy2.rs:23:20 --> $DIR/privacy2.rs:23:20
| |
LL | use bar::glob::foo; LL | use bar::glob::foo;
| ^^^ this function import is private | ^^^ private function import
| |
note: the function import `foo` is defined here... note: the function import `foo` is defined here...
--> $DIR/privacy2.rs:10:13 --> $DIR/privacy2.rs:10:13

View File

@ -2,7 +2,7 @@ error[E0603]: module `glob` is private
--> $DIR/privacy4.rs:21:14 --> $DIR/privacy4.rs:21:14
| |
LL | use bar::glob::gpriv; LL | use bar::glob::gpriv;
| ^^^^ this module is private | ^^^^ private module
| |
note: the module `glob` is defined here note: the module `glob` is defined here
--> $DIR/privacy4.rs:13:5 --> $DIR/privacy4.rs:13:5

View File

@ -5,7 +5,7 @@ LL | pub struct A(());
| -- a constructor is private if any of the fields is private | -- a constructor is private if any of the fields is private
... ...
LL | let a = a::A(()); LL | let a = a::A(());
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `A` is defined here note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | let b = a::B(2); 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 note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | let c = a::C(2, 3); 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $DIR/privacy5.rs:8:5
@ -50,7 +50,7 @@ LL | pub struct A(());
| -- a constructor is private if any of the fields is private | -- a constructor is private if any of the fields is private
... ...
LL | let a::A(()) = a; LL | let a::A(()) = a;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `A` is defined here note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5 --> $DIR/privacy5.rs:6:5
@ -65,7 +65,7 @@ LL | pub struct A(());
| -- a constructor is private if any of the fields is private | -- a constructor is private if any of the fields is private
... ...
LL | let a::A(_) = a; LL | let a::A(_) = a;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `A` is defined here note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5 --> $DIR/privacy5.rs:6:5
@ -80,7 +80,7 @@ LL | pub struct A(());
| -- a constructor is private if any of the fields is private | -- a constructor is private if any of the fields is private
... ...
LL | match a { a::A(()) => {} } LL | match a { a::A(()) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `A` is defined here note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5 --> $DIR/privacy5.rs:6:5
@ -95,7 +95,7 @@ LL | pub struct A(());
| -- a constructor is private if any of the fields is private | -- a constructor is private if any of the fields is private
... ...
LL | match a { a::A(_) => {} } LL | match a { a::A(_) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `A` is defined here note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | let a::B(_) = b; LL | let a::B(_) = b;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `B` is defined here note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | let a::B(_b) = b; 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 note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | match b { a::B(_) => {} } LL | match b { a::B(_) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `B` is defined here note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | match b { a::B(_b) => {} } 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 note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | match b { a::B(1) => {} a::B(_) => {} } 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 note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | match b { a::B(1) => {} a::B(_) => {} } 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 note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | let a::C(_, _) = c; LL | let a::C(_, _) = c;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `C` is defined here note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | let a::C(_a, _) = c; 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | let a::C(_, _b) = c; 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | let a::C(_a, _b) = c; 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | match c { a::C(_, _) => {} } LL | match c { a::C(_, _) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `C` is defined here note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | match c { a::C(_a, _) => {} } 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | match c { a::C(_, _b) => {} } 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | match c { a::C(_a, _b) => {} } 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 note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $DIR/privacy5.rs:8:5
@ -320,7 +320,7 @@ LL | pub struct A(());
| -- a constructor is private if any of the fields is private | -- a constructor is private if any of the fields is private
... ...
LL | let a2 = a::A; LL | let a2 = a::A;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `A` is defined here note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5 --> $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 | ----- a constructor is private if any of the fields is private
... ...
LL | let b2 = a::B; LL | let b2 = a::B;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `B` is defined here note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5 --> $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 | ---------------- a constructor is private if any of the fields is private
... ...
LL | let c2 = a::C; LL | let c2 = a::C;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `C` is defined here note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5 --> $DIR/privacy5.rs:8:5
@ -362,7 +362,7 @@ error[E0603]: tuple struct constructor `A` is private
--> $DIR/privacy5.rs:90:20 --> $DIR/privacy5.rs:90:20
| |
LL | let a = other::A(()); LL | let a = other::A(());
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 ::: $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 --> $DIR/privacy5.rs:91:20
| |
LL | let b = other::B(2); LL | let b = other::B(2);
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:92:20
| |
LL | let c = other::C(2, 3); 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 ::: $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 --> $DIR/privacy5.rs:95:16
| |
LL | let other::A(()) = a; LL | let other::A(()) = a;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 ::: $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 --> $DIR/privacy5.rs:96:16
| |
LL | let other::A(_) = a; LL | let other::A(_) = a;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 ::: $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 --> $DIR/privacy5.rs:97:22
| |
LL | match a { other::A(()) => {} } LL | match a { other::A(()) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 ::: $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 --> $DIR/privacy5.rs:98:22
| |
LL | match a { other::A(_) => {} } LL | match a { other::A(_) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 ::: $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 --> $DIR/privacy5.rs:100:16
| |
LL | let other::B(_) = b; LL | let other::B(_) = b;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:101:16
| |
LL | let other::B(_b) = b; LL | let other::B(_b) = b;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:102:22
| |
LL | match b { other::B(_) => {} } LL | match b { other::B(_) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:103:22
| |
LL | match b { other::B(_b) => {} } LL | match b { other::B(_b) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:104:22
| |
LL | match b { other::B(1) => {} LL | match b { other::B(1) => {}
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:105:16
| |
LL | other::B(_) => {} } LL | other::B(_) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:107:16
| |
LL | let other::C(_, _) = c; LL | let other::C(_, _) = c;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $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 --> $DIR/privacy5.rs:108:16
| |
LL | let other::C(_a, _) = c; LL | let other::C(_a, _) = c;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $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 --> $DIR/privacy5.rs:109:16
| |
LL | let other::C(_, _b) = c; LL | let other::C(_, _b) = c;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $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 --> $DIR/privacy5.rs:110:16
| |
LL | let other::C(_a, _b) = c; 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 ::: $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 --> $DIR/privacy5.rs:111:22
| |
LL | match c { other::C(_, _) => {} } LL | match c { other::C(_, _) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $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 --> $DIR/privacy5.rs:112:22
| |
LL | match c { other::C(_a, _) => {} } LL | match c { other::C(_a, _) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $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 --> $DIR/privacy5.rs:113:22
| |
LL | match c { other::C(_, _b) => {} } LL | match c { other::C(_, _b) => {} }
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $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 --> $DIR/privacy5.rs:114:22
| |
LL | match c { other::C(_a, _b) => {} } 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 ::: $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 --> $DIR/privacy5.rs:122:21
| |
LL | let a2 = other::A; LL | let a2 = other::A;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 ::: $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 --> $DIR/privacy5.rs:123:21
| |
LL | let b2 = other::B; LL | let b2 = other::B;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 ::: $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 --> $DIR/privacy5.rs:124:21
| |
LL | let c2 = other::C; LL | let c2 = other::C;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
| |

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `foo` is private
--> $DIR/private-impl-method.rs:20:7 --> $DIR/private-impl-method.rs:20:7
| |
LL | s.foo(); LL | s.foo();
| ^^^ | ^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error: trait `m::PrivNonPrincipal` is private
--> $DIR/private-in-public-non-principal-2.rs:11:5 --> $DIR/private-in-public-non-principal-2.rs:11:5
| |
LL | m::leak_dyn_nonprincipal(); LL | m::leak_dyn_nonprincipal();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,13 +2,13 @@ error: type `m::Priv` is private
--> $DIR/private-inferred-type-1.rs:16:5 --> $DIR/private-inferred-type-1.rs:16:5
| |
LL | [].arr0_secret(); LL | [].arr0_secret();
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type-1.rs:17:5 --> $DIR/private-inferred-type-1.rs:17:5
| |
LL | None.ty_param_secret(); LL | None.ty_param_secret();
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^ private type
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -2,19 +2,19 @@ error: type `m::Priv` is private
--> $DIR/private-inferred-type-2.rs:16:5 --> $DIR/private-inferred-type-2.rs:16:5
| |
LL | m::Pub::get_priv; LL | m::Pub::get_priv;
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type-2.rs:17:5 --> $DIR/private-inferred-type-2.rs:17:5
| |
LL | m::Pub::static_method; LL | m::Pub::static_method;
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^ private type
error: type `ext::Priv` is private error: type `ext::Priv` is private
--> $DIR/private-inferred-type-2.rs:18:5 --> $DIR/private-inferred-type-2.rs:18:5
| |
LL | ext::Pub::static_method; LL | ext::Pub::static_method;
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -2,7 +2,7 @@ error: type `fn() {ext::priv_fn}` is private
--> $DIR/private-inferred-type-3.rs:16:5 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = 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 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private static
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = 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 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
@ -26,7 +26,7 @@ error: type `fn() {<u8 as ext::PrivTrait>::method}` is private
--> $DIR/private-inferred-type-3.rs:16:5 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = 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 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = 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 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
@ -50,7 +50,7 @@ error: type `for<'r> fn(&'r ext::Pub<u8>) {ext::Pub::<u8>::priv_method}` is priv
--> $DIR/private-inferred-type-3.rs:16:5 --> $DIR/private-inferred-type-3.rs:16:5
| |
LL | ext::m!(); LL | ext::m!();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -20,97 +20,97 @@ error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:97:9 --> $DIR/private-inferred-type.rs:97:9
| |
LL | let _: m::Alias; LL | let _: m::Alias;
| ^ | ^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:97:12 --> $DIR/private-inferred-type.rs:97:12
| |
LL | let _: m::Alias; LL | let _: m::Alias;
| ^^^^^^^^ | ^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:99:13 --> $DIR/private-inferred-type.rs:99:13
| |
LL | let _: <m::Alias as m::TraitWithAssocTy>::AssocTy; LL | let _: <m::Alias as m::TraitWithAssocTy>::AssocTy;
| ^^^^^^^^ | ^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:100:5 --> $DIR/private-inferred-type.rs:100:5
| |
LL | m::Alias {}; LL | m::Alias {};
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:101:5 --> $DIR/private-inferred-type.rs:101:5
| |
LL | m::Pub { 0: m::Alias {} }; LL | m::Pub { 0: m::Alias {} };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:103:5 --> $DIR/private-inferred-type.rs:103:5
| |
LL | m::Pub::static_method; LL | m::Pub::static_method;
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:104:5 --> $DIR/private-inferred-type.rs:104:5
| |
LL | m::Pub::INHERENT_ASSOC_CONST; LL | m::Pub::INHERENT_ASSOC_CONST;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:105:5 --> $DIR/private-inferred-type.rs:105:5
| |
LL | m::Pub(0u8).method_with_substs::<m::Alias>(); LL | m::Pub(0u8).method_with_substs::<m::Alias>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:106:17 --> $DIR/private-inferred-type.rs:106:17
| |
LL | m::Pub(0u8).method_with_priv_params(loop{}); LL | m::Pub(0u8).method_with_priv_params(loop{});
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:107:5 --> $DIR/private-inferred-type.rs:107:5
| |
LL | <m::Alias as m::TraitWithAssocConst>::TRAIT_ASSOC_CONST; LL | <m::Alias as m::TraitWithAssocConst>::TRAIT_ASSOC_CONST;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:108:6 --> $DIR/private-inferred-type.rs:108:6
| |
LL | <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST; LL | <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST;
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:109:5 --> $DIR/private-inferred-type.rs:109:5
| |
LL | <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST_GENERIC_SELF; LL | <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST_GENERIC_SELF;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:110:5 --> $DIR/private-inferred-type.rs:110:5
| |
LL | <m::Pub<m::Alias>>::static_method_generic_self; LL | <m::Pub<m::Alias>>::static_method_generic_self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:112:5 --> $DIR/private-inferred-type.rs:112:5
| |
LL | u8::pub_method; LL | u8::pub_method;
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^ private type
error: type `adjust::S2` is private error: type `adjust::S2` is private
--> $DIR/private-inferred-type.rs:114:5 --> $DIR/private-inferred-type.rs:114:5
| |
LL | adjust::S1.method_s3(); LL | adjust::S1.method_s3();
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
error: type `fn() {m::priv_fn}` is private error: type `fn() {m::priv_fn}` is private
--> $DIR/private-inferred-type.rs:39:9 --> $DIR/private-inferred-type.rs:39:9
| |
LL | priv_fn; LL | priv_fn;
| ^^^^^^^ | ^^^^^^^ private type
... ...
LL | m::m!(); LL | m::m!();
| -------- in this macro invocation | -------- in this macro invocation
@ -121,7 +121,7 @@ error: type `m::PrivEnum` is private
--> $DIR/private-inferred-type.rs:41:9 --> $DIR/private-inferred-type.rs:41:9
| |
LL | PrivEnum::Variant; LL | PrivEnum::Variant;
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^ private type
... ...
LL | m::m!(); LL | m::m!();
| -------- in this macro invocation | -------- in this macro invocation
@ -132,7 +132,7 @@ error: type `fn() {<u8 as m::PrivTrait>::method}` is private
--> $DIR/private-inferred-type.rs:43:9 --> $DIR/private-inferred-type.rs:43:9
| |
LL | <u8 as PrivTrait>::method; LL | <u8 as PrivTrait>::method;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
... ...
LL | m::m!(); LL | m::m!();
| -------- in this macro invocation | -------- 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 --> $DIR/private-inferred-type.rs:45:9
| |
LL | PrivTupleStruct; LL | PrivTupleStruct;
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^ private type
... ...
LL | m::m!(); LL | m::m!();
| -------- in this macro invocation | -------- 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 --> $DIR/private-inferred-type.rs:47:9
| |
LL | PubTupleStruct; LL | PubTupleStruct;
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^ private type
... ...
LL | m::m!(); LL | m::m!();
| -------- in this macro invocation | -------- in this macro invocation
@ -165,7 +165,7 @@ error: type `for<'r> fn(&'r m::Pub<u8>) {m::Pub::<u8>::priv_method}` is private
--> $DIR/private-inferred-type.rs:49:18 --> $DIR/private-inferred-type.rs:49:18
| |
LL | Pub(0u8).priv_method(); LL | Pub(0u8).priv_method();
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private type
... ...
LL | m::m!(); LL | m::m!();
| -------- in this macro invocation | -------- in this macro invocation
@ -176,61 +176,61 @@ error: trait `m::Trait` is private
--> $DIR/private-inferred-type.rs:118:5 --> $DIR/private-inferred-type.rs:118:5
| |
LL | m::leak_anon1(); LL | m::leak_anon1();
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^ private trait
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:119:5 --> $DIR/private-inferred-type.rs:119:5
| |
LL | m::leak_anon2(); LL | m::leak_anon2();
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:120:5 --> $DIR/private-inferred-type.rs:120:5
| |
LL | m::leak_anon3(); LL | m::leak_anon3();
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^ private type
error: trait `m::Trait` is private error: trait `m::Trait` is private
--> $DIR/private-inferred-type.rs:122:5 --> $DIR/private-inferred-type.rs:122:5
| |
LL | m::leak_dyn1(); LL | m::leak_dyn1();
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^ private trait
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:123:5 --> $DIR/private-inferred-type.rs:123:5
| |
LL | m::leak_dyn2(); LL | m::leak_dyn2();
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:124:5 --> $DIR/private-inferred-type.rs:124:5
| |
LL | m::leak_dyn3(); LL | m::leak_dyn3();
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:127:13 --> $DIR/private-inferred-type.rs:127:13
| |
LL | let a = m::Alias {}; LL | let a = m::Alias {};
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:128:17 --> $DIR/private-inferred-type.rs:128:17
| |
LL | let mut b = a; LL | let mut b = a;
| ^ | ^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:129:9 --> $DIR/private-inferred-type.rs:129:9
| |
LL | b = a; LL | b = a;
| ^ | ^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:130:11 --> $DIR/private-inferred-type.rs:130:11
| |
LL | match a { LL | match a {
| ^ | ^ private type
error: aborting due to 33 previous errors error: aborting due to 33 previous errors

View File

@ -2,7 +2,7 @@ error[E0603]: function `f` is private
--> $DIR/private-item-simple.rs:6:8 --> $DIR/private-item-simple.rs:6:8
| |
LL | a::f(); LL | a::f();
| ^ this function is private | ^ private function
| |
note: the function `f` is defined here note: the function `f` is defined here
--> $DIR/private-item-simple.rs:2:5 --> $DIR/private-item-simple.rs:2:5

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `nap` is private
--> $DIR/private-method-cross-crate.rs:7:8 --> $DIR/private-method-cross-crate.rs:7:8
| |
LL | nyan.nap(); LL | nyan.nap();
| ^^^ | ^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `f` is private
--> $DIR/private-method-inherited.rs:13:7 --> $DIR/private-method-inherited.rs:13:7
| |
LL | x.f(); LL | x.f();
| ^ | ^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `nap` is private
--> $DIR/private-method.rs:22:8 --> $DIR/private-method.rs:22:8
| |
LL | nyan.nap(); LL | nyan.nap();
| ^^^ | ^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0451]: field `x` of struct `a::Foo` is private
--> $DIR/private-struct-field-ctor.rs:8:22 --> $DIR/private-struct-field-ctor.rs:8:22
| |
LL | let s = a::Foo { x: 1 }; LL | let s = a::Foo { x: 1 };
| ^^^^ field `x` is private | ^^^^ private field
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0451]: field `x` of struct `a::Foo` is private
--> $DIR/private-struct-field-pattern.rs:15:15 --> $DIR/private-struct-field-pattern.rs:15:15
| |
LL | Foo { x: _ } => {} LL | Foo { x: _ } => {}
| ^^^^ field `x` is private | ^^^^ private field
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,55 +2,55 @@ error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:15:9 --> $DIR/private-type-in-interface.rs:15:9
| |
LL | fn f(_: m::Alias) {} LL | fn f(_: m::Alias) {}
| ^^^^^^^^ | ^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:15:6 --> $DIR/private-type-in-interface.rs:15:6
| |
LL | fn f(_: m::Alias) {} LL | fn f(_: m::Alias) {}
| ^ | ^ private type
error: type `ext::Priv` is private error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:17:13 --> $DIR/private-type-in-interface.rs:17:13
| |
LL | fn f_ext(_: ext::Alias) {} LL | fn f_ext(_: ext::Alias) {}
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
error: type `ext::Priv` is private error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:17:10 --> $DIR/private-type-in-interface.rs:17:10
| |
LL | fn f_ext(_: ext::Alias) {} LL | fn f_ext(_: ext::Alias) {}
| ^ | ^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:21:6 --> $DIR/private-type-in-interface.rs:21:6
| |
LL | impl m::Alias {} LL | impl m::Alias {}
| ^^^^^^^^ | ^^^^^^^^ private type
error: type `ext::Priv` is private error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:22:14 --> $DIR/private-type-in-interface.rs:22:14
| |
LL | impl Tr1 for ext::Alias {} LL | impl Tr1 for ext::Alias {}
| ^^^^^^^^^^ | ^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:23:10 --> $DIR/private-type-in-interface.rs:23:10
| |
LL | type A = <m::Alias as m::Trait>::X; LL | type A = <m::Alias as m::Trait>::X;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:27:11 --> $DIR/private-type-in-interface.rs:27:11
| |
LL | fn g() -> impl Tr2<m::Alias> { 0 } LL | fn g() -> impl Tr2<m::Alias> { 0 }
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^ private type
error: type `ext::Priv` is private error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:28:15 --> $DIR/private-type-in-interface.rs:28:15
| |
LL | fn g_ext() -> impl Tr2<ext::Alias> { 0 } LL | fn g_ext() -> impl Tr2<ext::Alias> { 0 }
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^ private type
error: aborting due to 9 previous errors error: aborting due to 9 previous errors

View File

@ -2,7 +2,7 @@ error[E0451]: field `x` of struct `foo::bar::S` is private
--> $DIR/struct-literal-field.rs:18:9 --> $DIR/struct-literal-field.rs:18:9
| |
LL | S { x: 0 }; LL | S { x: 0 };
| ^^^^ field `x` is private | ^^^^ private field
error: aborting due to previous error error: aborting due to previous error

View File

@ -26,7 +26,7 @@ error[E0603]: struct `Crate` is private
--> $DIR/test.rs:38:25 --> $DIR/test.rs:38:25
| |
LL | use pub_restricted::Crate; LL | use pub_restricted::Crate;
| ^^^^^ this struct is private | ^^^^^ private struct
| |
note: the struct `Crate` is defined here note: the struct `Crate` is defined here
--> $DIR/auxiliary/pub_restricted.rs:3:1 --> $DIR/auxiliary/pub_restricted.rs:3:1
@ -38,7 +38,7 @@ error[E0603]: function `f` is private
--> $DIR/test.rs:30:19 --> $DIR/test.rs:30:19
| |
LL | use foo::bar::f; LL | use foo::bar::f;
| ^ this function is private | ^ private function
| |
note: the function `f` is defined here note: the function `f` is defined here
--> $DIR/test.rs:8:9 --> $DIR/test.rs:8:9
@ -56,13 +56,13 @@ error[E0624]: associated function `f` is private
--> $DIR/test.rs:32:18 --> $DIR/test.rs:32:18
| |
LL | S::default().f(); LL | S::default().f();
| ^ | ^ private associated function
error[E0624]: associated function `g` is private error[E0624]: associated function `g` is private
--> $DIR/test.rs:33:5 --> $DIR/test.rs:33:5
| |
LL | S::g(); LL | S::g();
| ^^^^ | ^^^^ private associated function
error[E0616]: field `y` of struct `pub_restricted::Universe` is private error[E0616]: field `y` of struct `pub_restricted::Universe` is private
--> $DIR/test.rs:42:15 --> $DIR/test.rs:42:15
@ -80,13 +80,13 @@ error[E0624]: associated function `g` is private
--> $DIR/test.rs:45:7 --> $DIR/test.rs:45:7
| |
LL | u.g(); LL | u.g();
| ^ | ^ private associated function
error[E0624]: associated function `h` is private error[E0624]: associated function `h` is private
--> $DIR/test.rs:46:7 --> $DIR/test.rs:46:7
| |
LL | u.h(); LL | u.h();
| ^ | ^ private associated function
error: aborting due to 12 previous errors error: aborting due to 12 previous errors

View File

@ -2,13 +2,13 @@ error[E0451]: field `c` of union `m::U` is private
--> $DIR/union-field-privacy-1.rs:12:20 --> $DIR/union-field-privacy-1.rs:12:20
| |
LL | let u = m::U { c: 0 }; LL | let u = m::U { c: 0 };
| ^^^^ field `c` is private | ^^^^ private field
error[E0451]: field `c` of union `m::U` is private error[E0451]: field `c` of union `m::U` is private
--> $DIR/union-field-privacy-1.rs:16:16 --> $DIR/union-field-privacy-1.rs:16:16
| |
LL | let m::U { c } = u; LL | let m::U { c } = u;
| ^ field `c` is private | ^ private field
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -8,7 +8,7 @@ error[E0603]: derive macro import `Empty` is private
--> $DIR/disappearing-resolution.rs:11:8 --> $DIR/disappearing-resolution.rs:11:8
| |
LL | use m::Empty; LL | use m::Empty;
| ^^^^^ this derive macro import is private | ^^^^^ private derive macro import
| |
note: the derive macro import `Empty` is defined here note: the derive macro import `Empty` is defined here
--> $DIR/disappearing-resolution.rs:9:9 --> $DIR/disappearing-resolution.rs:9:9

View File

@ -2,7 +2,7 @@ error[E0603]: module `super_sekrit` is private
--> $DIR/unreachable-variant.rs:6:21 --> $DIR/unreachable-variant.rs:6:21
| |
LL | let _x = other::super_sekrit::sooper_sekrit::baz; LL | let _x = other::super_sekrit::sooper_sekrit::baz;
| ^^^^^^^^^^^^ this module is private | ^^^^^^^^^^^^ private module
| |
note: the module `super_sekrit` is defined here note: the module `super_sekrit` is defined here
--> $DIR/auxiliary/unreachable_variant.rs:1:1 --> $DIR/auxiliary/unreachable_variant.rs:1:1

View File

@ -253,7 +253,7 @@ error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:57:22 --> $DIR/privacy-enum-ctor.rs:57:22
| |
LL | let _: Z = m::n::Z; LL | let _: Z = m::n::Z;
| ^ this enum is private | ^ private enum
| |
note: the enum `Z` is defined here note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9 --> $DIR/privacy-enum-ctor.rs:11:9
@ -265,7 +265,7 @@ error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:61:22 --> $DIR/privacy-enum-ctor.rs:61:22
| |
LL | let _: Z = m::n::Z::Fn; LL | let _: Z = m::n::Z::Fn;
| ^ this enum is private | ^ private enum
| |
note: the enum `Z` is defined here note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9 --> $DIR/privacy-enum-ctor.rs:11:9
@ -277,7 +277,7 @@ error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:64:22 --> $DIR/privacy-enum-ctor.rs:64:22
| |
LL | let _: Z = m::n::Z::Struct; LL | let _: Z = m::n::Z::Struct;
| ^ this enum is private | ^ private enum
| |
note: the enum `Z` is defined here note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9 --> $DIR/privacy-enum-ctor.rs:11:9
@ -289,7 +289,7 @@ error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:68:22 --> $DIR/privacy-enum-ctor.rs:68:22
| |
LL | let _: Z = m::n::Z::Unit {}; LL | let _: Z = m::n::Z::Unit {};
| ^ this enum is private | ^ private enum
| |
note: the enum `Z` is defined here note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9 --> $DIR/privacy-enum-ctor.rs:11:9

View File

@ -45,7 +45,7 @@ LL | pub(in m) struct Z(pub(in m::n) u8);
| --------------- a constructor is private if any of the fields is private | --------------- a constructor is private if any of the fields is private
... ...
LL | n::Z; LL | n::Z;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `Z` is defined here note: the tuple struct constructor `Z` is defined here
--> $DIR/privacy-struct-ctor.rs:12:9 --> $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 | -- a constructor is private if any of the fields is private
... ...
LL | m::S; LL | m::S;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `S` is defined here note: the tuple struct constructor `S` is defined here
--> $DIR/privacy-struct-ctor.rs:6:5 --> $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 | -- a constructor is private if any of the fields is private
... ...
LL | let _: S = m::S(2); 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 note: the tuple struct constructor `S` is defined here
--> $DIR/privacy-struct-ctor.rs:6:5 --> $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 | --------------- a constructor is private if any of the fields is private
... ...
LL | m::n::Z; LL | m::n::Z;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
note: the tuple struct constructor `Z` is defined here note: the tuple struct constructor `Z` is defined here
--> $DIR/privacy-struct-ctor.rs:12:9 --> $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 --> $DIR/privacy-struct-ctor.rs:41:16
| |
LL | xcrate::m::S; LL | xcrate::m::S;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18 ::: $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 --> $DIR/privacy-struct-ctor.rs:45:19
| |
LL | xcrate::m::n::Z; LL | xcrate::m::n::Z;
| ^ this tuple struct constructor is private | ^ private tuple struct constructor
| |
::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28 ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28
| |

View File

@ -2,7 +2,12 @@ error[E0423]: expected function, found macro `assert`
--> $DIR/resolve-hint-macro.rs:2:5 --> $DIR/resolve-hint-macro.rs:2:5
| |
LL | assert(true); 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 error: aborting due to previous error

View File

@ -14,7 +14,7 @@ error[E0603]: tuple struct constructor `TupleStruct` is private
--> $DIR/struct.rs:23:32 --> $DIR/struct.rs:23:32
| |
LL | let ts_explicit = structs::TupleStruct(640, 480); LL | let ts_explicit = structs::TupleStruct(640, 480);
| ^^^^^^^^^^^ this tuple struct constructor is private | ^^^^^^^^^^^ private tuple struct constructor
| |
::: $DIR/auxiliary/structs.rs:11:24 ::: $DIR/auxiliary/structs.rs:11:24
| |
@ -31,7 +31,7 @@ error[E0603]: unit struct `UnitStruct` is private
--> $DIR/struct.rs:32:32 --> $DIR/struct.rs:32:32
| |
LL | let us_explicit = structs::UnitStruct; LL | let us_explicit = structs::UnitStruct;
| ^^^^^^^^^^ this unit struct is private | ^^^^^^^^^^ private unit struct
| |
note: the unit struct `UnitStruct` is defined here note: the unit struct `UnitStruct` is defined here
--> $DIR/auxiliary/structs.rs:8:1 --> $DIR/auxiliary/structs.rs:8:1

View File

@ -2,7 +2,7 @@ error[E0603]: tuple variant `Tuple` is private
--> $DIR/variant.rs:11:48 --> $DIR/variant.rs:11:48
| |
LL | let variant_tuple = NonExhaustiveVariants::Tuple(640); LL | let variant_tuple = NonExhaustiveVariants::Tuple(640);
| ^^^^^ this tuple variant is private | ^^^^^ private tuple variant
| |
note: the tuple variant `Tuple` is defined here note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23 --> $DIR/auxiliary/variants.rs:5:23
@ -14,7 +14,7 @@ error[E0603]: unit variant `Unit` is private
--> $DIR/variant.rs:14:47 --> $DIR/variant.rs:14:47
| |
LL | let variant_unit = NonExhaustiveVariants::Unit; LL | let variant_unit = NonExhaustiveVariants::Unit;
| ^^^^ this unit variant is private | ^^^^ private unit variant
| |
note: the unit variant `Unit` is defined here note: the unit variant `Unit` is defined here
--> $DIR/auxiliary/variants.rs:4:23 --> $DIR/auxiliary/variants.rs:4:23
@ -26,7 +26,7 @@ error[E0603]: unit variant `Unit` is private
--> $DIR/variant.rs:18:32 --> $DIR/variant.rs:18:32
| |
LL | NonExhaustiveVariants::Unit => "", LL | NonExhaustiveVariants::Unit => "",
| ^^^^ this unit variant is private | ^^^^ private unit variant
| |
note: the unit variant `Unit` is defined here note: the unit variant `Unit` is defined here
--> $DIR/auxiliary/variants.rs:4:23 --> $DIR/auxiliary/variants.rs:4:23
@ -38,7 +38,7 @@ error[E0603]: tuple variant `Tuple` is private
--> $DIR/variant.rs:20:32 --> $DIR/variant.rs:20:32
| |
LL | NonExhaustiveVariants::Tuple(fe_tpl) => "", LL | NonExhaustiveVariants::Tuple(fe_tpl) => "",
| ^^^^^ this tuple variant is private | ^^^^^ private tuple variant
| |
note: the tuple variant `Tuple` is defined here note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23 --> $DIR/auxiliary/variants.rs:5:23
@ -50,7 +50,7 @@ error[E0603]: tuple variant `Tuple` is private
--> $DIR/variant.rs:26:35 --> $DIR/variant.rs:26:35
| |
LL | if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct { 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 note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23 --> $DIR/auxiliary/variants.rs:5:23

View File

@ -2,7 +2,7 @@ error[E0603]: module import `bar` is private
--> $DIR/shadowed-use-visibility.rs:9:14 --> $DIR/shadowed-use-visibility.rs:9:14
| |
LL | use foo::bar::f as g; LL | use foo::bar::f as g;
| ^^^ this module import is private | ^^^ private module import
| |
note: the module import `bar` is defined here... note: the module import `bar` is defined here...
--> $DIR/shadowed-use-visibility.rs:4:9 --> $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 --> $DIR/shadowed-use-visibility.rs:15:10
| |
LL | use bar::f::f; LL | use bar::f::f;
| ^ this module import is private | ^ private module import
| |
note: the module import `f` is defined here... note: the module import `f` is defined here...
--> $DIR/shadowed-use-visibility.rs:11:9 --> $DIR/shadowed-use-visibility.rs:11:9

View File

@ -2,7 +2,7 @@ error[E0603]: module `thread_info` is private
--> $DIR/stability-in-private-module.rs:7:26 --> $DIR/stability-in-private-module.rs:7:26
| |
LL | let _ = std::thread::thread_info::current_thread(); LL | let _ = std::thread::thread_info::current_thread();
| ^^^^^^^^^^^ this module is private | ^^^^^^^^^^^ private module
| |
note: the module `thread_info` is defined here note: the module `thread_info` is defined here
--> $SRC_DIR/libstd/thread/mod.rs:LL:COL --> $SRC_DIR/libstd/thread/mod.rs:LL:COL

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `new` is private
--> $DIR/static-method-privacy.rs:9:13 --> $DIR/static-method-privacy.rs:9:13
| |
LL | let _ = a::S::new(); LL | let _ = a::S::new();
| ^^^^^^^^^ | ^^^^^^^^^ private associated function
error: aborting due to previous error error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0603]: static `private` is private
--> $DIR/static-priv-by-default2.rs:15:30 --> $DIR/static-priv-by-default2.rs:15:30
| |
LL | use child::childs_child::private; LL | use child::childs_child::private;
| ^^^^^^^ this static is private | ^^^^^^^ private static
| |
note: the static `private` is defined here note: the static `private` is defined here
--> $DIR/static-priv-by-default2.rs:7:9 --> $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 --> $DIR/static-priv-by-default2.rs:23:33
| |
LL | use static_priv_by_default::private; LL | use static_priv_by_default::private;
| ^^^^^^^ this static is private | ^^^^^^^ private static
| |
note: the static `private` is defined here note: the static `private` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:3:1 --> $DIR/auxiliary/static_priv_by_default.rs:3:1

View File

@ -2,7 +2,7 @@ error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy-xc.rs:4:33 --> $DIR/struct-variant-privacy-xc.rs:4:33
| |
LL | fn f(b: struct_variant_privacy::Bar) { LL | fn f(b: struct_variant_privacy::Bar) {
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Bar` is defined here note: the enum `Bar` is defined here
--> $DIR/auxiliary/struct_variant_privacy.rs:1:1 --> $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 --> $DIR/struct-variant-privacy-xc.rs:6:33
| |
LL | struct_variant_privacy::Bar::Baz { a: _a } => {} LL | struct_variant_privacy::Bar::Baz { a: _a } => {}
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Bar` is defined here note: the enum `Bar` is defined here
--> $DIR/auxiliary/struct_variant_privacy.rs:1:1 --> $DIR/auxiliary/struct_variant_privacy.rs:1:1

View File

@ -2,7 +2,7 @@ error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy.rs:7:14 --> $DIR/struct-variant-privacy.rs:7:14
| |
LL | fn f(b: foo::Bar) { LL | fn f(b: foo::Bar) {
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Bar` is defined here note: the enum `Bar` is defined here
--> $DIR/struct-variant-privacy.rs:2:5 --> $DIR/struct-variant-privacy.rs:2:5
@ -14,7 +14,7 @@ error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy.rs:9:14 --> $DIR/struct-variant-privacy.rs:9:14
| |
LL | foo::Bar::Baz { a: _a } => {} LL | foo::Bar::Baz { a: _a } => {}
| ^^^ this enum is private | ^^^ private enum
| |
note: the enum `Bar` is defined here note: the enum `Bar` is defined here
--> $DIR/struct-variant-privacy.rs:2:5 --> $DIR/struct-variant-privacy.rs:2:5

View File

@ -40,7 +40,7 @@ error[E0624]: associated function `a` is private
--> $DIR/trait-item-privacy.rs:72:7 --> $DIR/trait-item-privacy.rs:72:7
| |
LL | c.a(); LL | c.a();
| ^ | ^ private associated function
error[E0599]: no function or associated item named `a` found for struct `S` in the current scope error[E0599]: no function or associated item named `a` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:78:8 --> $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 --> $DIR/trait-item-privacy.rs:84:5
| |
LL | C::a(&S); LL | C::a(&S);
| ^^^^ | ^^^^ private associated function
error[E0599]: no associated item named `A` found for struct `S` in the current scope error[E0599]: no associated item named `A` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:97:8 --> $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 --> $DIR/trait-item-privacy.rs:101:5
| |
LL | C::A; LL | C::A;
| ^^^^ | ^^^^ private associated constant
error[E0038]: the trait `assoc_const::C` cannot be made into an object error[E0038]: the trait `assoc_const::C` cannot be made into an object
--> $DIR/trait-item-privacy.rs:101:5 --> $DIR/trait-item-privacy.rs:101:5
@ -159,13 +159,13 @@ error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:119:12 --> $DIR/trait-item-privacy.rs:119:12
| |
LL | let _: T::A; LL | let _: T::A;
| ^^^^ | ^^^^ private associated type
error: associated type `A` is private error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:128:9 --> $DIR/trait-item-privacy.rs:128:9
| |
LL | A = u8, LL | A = u8,
| ^^^^^^ | ^^^^^^ private associated type
error: aborting due to 15 previous errors error: aborting due to 15 previous errors

View File

@ -2,7 +2,7 @@ error[E0624]: associated function `method` is private
--> $DIR/trait-method-private.rs:19:9 --> $DIR/trait-method-private.rs:19:9
| |
LL | foo.method(); LL | foo.method();
| ^^^^^^ | ^^^^^^ private associated function
| |
= help: items from traits can only be used if the trait is in scope = 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: help: the following trait is implemented but not in scope; perhaps add a `use` for it:

View File

@ -11,9 +11,13 @@ error[E0574]: expected struct, variant or union type, found macro `try`
--> $DIR/try-block-in-edition2015.rs:4:33 --> $DIR/try-block-in-edition2015.rs:4:33
| |
LL | let try_result: Option<_> = try { 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 = 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 error: aborting due to 2 previous errors

View File

@ -44,7 +44,7 @@ error[E0603]: struct `Foo` is private
--> $DIR/use-from-trait-xc.rs:14:24 --> $DIR/use-from-trait-xc.rs:14:24
| |
LL | use use_from_trait_xc::Foo::new; LL | use use_from_trait_xc::Foo::new;
| ^^^ this struct is private | ^^^ private struct
| |
note: the struct `Foo` is defined here note: the struct `Foo` is defined here
--> $DIR/auxiliary/use-from-trait-xc.rs:9:1 --> $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 --> $DIR/use-from-trait-xc.rs:17:24
| |
LL | use use_from_trait_xc::Foo::C; LL | use use_from_trait_xc::Foo::C;
| ^^^ this struct is private | ^^^ private struct
| |
note: the struct `Foo` is defined here note: the struct `Foo` is defined here
--> $DIR/auxiliary/use-from-trait-xc.rs:9:1 --> $DIR/auxiliary/use-from-trait-xc.rs:9:1

View File

@ -2,7 +2,7 @@ error[E0603]: module `bar` is private
--> $DIR/use-mod-3.rs:1:10 --> $DIR/use-mod-3.rs:1:10
| |
LL | use foo::bar::{ LL | use foo::bar::{
| ^^^ this module is private | ^^^ private module
| |
note: the module `bar` is defined here note: the module `bar` is defined here
--> $DIR/use-mod-3.rs:9:5 --> $DIR/use-mod-3.rs:9:5
@ -14,7 +14,7 @@ error[E0603]: module `bar` is private
--> $DIR/use-mod-3.rs:4:10 --> $DIR/use-mod-3.rs:4:10
| |
LL | use foo::bar::{ LL | use foo::bar::{
| ^^^ this module is private | ^^^ private module
| |
note: the module `bar` is defined here note: the module `bar` is defined here
--> $DIR/use-mod-3.rs:9:5 --> $DIR/use-mod-3.rs:9:5

View File

@ -2,13 +2,13 @@ error[E0624]: associated function `static_meth_struct` is private
--> $DIR/xc-private-method.rs:6:13 --> $DIR/xc-private-method.rs:6:13
| |
LL | let _ = xc_private_method_lib::Struct::static_meth_struct(); LL | let _ = xc_private_method_lib::Struct::static_meth_struct();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `static_meth_enum` is private error[E0624]: associated function `static_meth_enum` is private
--> $DIR/xc-private-method.rs:9:13 --> $DIR/xc-private-method.rs:9:13
| |
LL | let _ = xc_private_method_lib::Enum::static_meth_enum(); LL | let _ = xc_private_method_lib::Enum::static_meth_enum();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -2,13 +2,13 @@ error[E0624]: associated function `meth_struct` is private
--> $DIR/xc-private-method2.rs:6:52 --> $DIR/xc-private-method2.rs:6:52
| |
LL | let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct(); LL | let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct();
| ^^^^^^^^^^^ | ^^^^^^^^^^^ private associated function
error[E0624]: associated function `meth_enum` is private error[E0624]: associated function `meth_enum` is private
--> $DIR/xc-private-method2.rs:9:55 --> $DIR/xc-private-method2.rs:9:55
| |
LL | let _ = xc_private_method_lib::Enum::Variant1(20).meth_enum(); LL | let _ = xc_private_method_lib::Enum::Variant1(20).meth_enum();
| ^^^^^^^^^ | ^^^^^^^^^ private associated function
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -2,7 +2,7 @@ error[E0603]: static `j` is private
--> $DIR/xcrate-private-by-default.rs:23:29 --> $DIR/xcrate-private-by-default.rs:23:29
| |
LL | static_priv_by_default::j; LL | static_priv_by_default::j;
| ^ this static is private | ^ private static
| |
note: the static `j` is defined here note: the static `j` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:47:1 --> $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 --> $DIR/xcrate-private-by-default.rs:25:29
| |
LL | static_priv_by_default::k; LL | static_priv_by_default::k;
| ^ this function is private | ^ private function
| |
note: the function `k` is defined here note: the function `k` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:48:1 --> $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 --> $DIR/xcrate-private-by-default.rs:27:29
| |
LL | static_priv_by_default::l; LL | static_priv_by_default::l;
| ^ this unit struct is private | ^ private unit struct
| |
note: the unit struct `l` is defined here note: the unit struct `l` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:49:1 --> $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 --> $DIR/xcrate-private-by-default.rs:29:35
| |
LL | foo::<static_priv_by_default::m>(); LL | foo::<static_priv_by_default::m>();
| ^ this enum is private | ^ private enum
| |
note: the enum `m` is defined here note: the enum `m` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:50:1 --> $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 --> $DIR/xcrate-private-by-default.rs:31:35
| |
LL | foo::<static_priv_by_default::n>(); LL | foo::<static_priv_by_default::n>();
| ^ this type alias is private | ^ private type alias
| |
note: the type alias `n` is defined here note: the type alias `n` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:51:1 --> $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 --> $DIR/xcrate-private-by-default.rs:35:29
| |
LL | static_priv_by_default::foo::a; LL | static_priv_by_default::foo::a;
| ^^^ this module is private | ^^^ private module
| |
note: the module `foo` is defined here note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1 --> $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 --> $DIR/xcrate-private-by-default.rs:37:29
| |
LL | static_priv_by_default::foo::b; LL | static_priv_by_default::foo::b;
| ^^^ this module is private | ^^^ private module
| |
note: the module `foo` is defined here note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1 --> $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 --> $DIR/xcrate-private-by-default.rs:39:29
| |
LL | static_priv_by_default::foo::c; LL | static_priv_by_default::foo::c;
| ^^^ this module is private | ^^^ private module
| |
note: the module `foo` is defined here note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1 --> $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 --> $DIR/xcrate-private-by-default.rs:41:35
| |
LL | foo::<static_priv_by_default::foo::d>(); LL | foo::<static_priv_by_default::foo::d>();
| ^^^ this module is private | ^^^ private module
| |
note: the module `foo` is defined here note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1 --> $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 --> $DIR/xcrate-private-by-default.rs:43:35
| |
LL | foo::<static_priv_by_default::foo::e>(); LL | foo::<static_priv_by_default::foo::e>();
| ^^^ this module is private | ^^^ private module
| |
note: the module `foo` is defined here note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1 --> $DIR/auxiliary/static_priv_by_default.rs:12:1