def.variant_descr(),
self.tcx.def_path_str(def.did)
)
- .span_label(span, format!("field `{}` is private", field.ident))
+ .span_label(span, "private field")
.emit();
}
}
fn check_def_id(&mut self, def_id: DefId, kind: &str, descr: &dyn fmt::Display) -> bool {
let is_error = !self.item_is_accessible(def_id);
if is_error {
- self.tcx.sess.span_err(self.span, &format!("{} `{}` is private", kind, descr));
+ self.tcx
+ .sess
+ .struct_span_err(self.span, &format!("{} `{}` is private", kind, descr))
+ .span_label(self.span, &format!("private {}", kind))
+ .emit();
}
is_error
}
hir::QPath::Resolved(_, ref path) => path.to_string(),
hir::QPath::TypeRelative(_, ref segment) => segment.ident.to_string(),
};
- let msg = format!("{} `{}` is private", kind.descr(def_id), name);
- self.tcx.sess.span_err(span, &msg);
+ let kind = kind.descr(def_id);
+ self.tcx
+ .sess
+ .struct_span_err(span, &format!("{} `{}` is private", kind, name))
+ .span_label(span, &format!("private {}", kind))
+ .emit();
return;
}
}
let descr = get_descr(binding);
let mut err =
struct_span_err!(self.session, ident.span, E0603, "{} `{}` is private", descr, ident);
- err.span_label(ident.span, &format!("this {} is private", descr));
+ err.span_label(ident.span, &format!("private {}", descr));
if let Some(span) = ctor_fields_span {
err.span_label(span, "a constructor is private if any of the fields is private");
}
match (res, source) {
(Res::Def(DefKind::Macro(MacroKind::Bang), _), _) => {
- err.span_suggestion(
- span,
+ err.span_suggestion_verbose(
+ span.shrink_to_hi(),
"use `!` to invoke the macro",
- format!("{}!", path_str),
+ "!".to_string(),
Applicability::MaybeIncorrect,
);
if path_str == "try" && span.rust_2015() {
.expect("missing associated type");
if !assoc_ty.vis.is_accessible_from(def_scope, tcx) {
- let msg = format!("associated type `{}` is private", binding.item_name);
- tcx.sess.span_err(binding.span, &msg);
+ tcx.sess
+ .struct_span_err(
+ binding.span,
+ &format!("associated type `{}` is private", binding.item_name),
+ )
+ .span_label(binding.span, "private associated type")
+ .emit();
}
tcx.check_stability(assoc_ty.def_id, Some(hir_ref_id), binding.span);
let kind = DefKind::AssocTy;
if !item.vis.is_accessible_from(def_scope, tcx) {
- let msg = format!("{} `{}` is private", kind.descr(item.def_id), assoc_ident);
- tcx.sess.span_err(span, &msg);
+ let kind = kind.descr(item.def_id);
+ let msg = format!("{} `{}` is private", kind, assoc_ident);
+ tcx.sess
+ .struct_span_err(span, &msg)
+ .span_label(span, &format!("private {}", kind))
+ .emit();
}
tcx.check_stability(item.def_id, Some(hir_ref_id), span);
}
MethodError::PrivateMatch(kind, def_id, out_of_scope_traits) => {
+ let kind = kind.descr(def_id);
let mut err = struct_span_err!(
self.tcx.sess,
span,
E0624,
"{} `{}` is private",
- kind.descr(def_id),
+ kind,
item_name
);
+ err.span_label(span, &format!("private {}", kind));
self.suggest_valid_traits(&mut err, out_of_scope_traits);
err.emit();
}
--> $DIR/associated-const-private-impl.rs:13:19
|
LL | assert_eq!(1, bar1::Foo::ID);
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^ private associated constant
error: aborting due to previous error
--> $DIR/E0451.rs:14:21
|
LL | let bar::Foo{a, b} = foo;
- | ^ field `b` is private
+ | ^ private field
error[E0451]: field `b` of struct `bar::Foo` is private
--> $DIR/E0451.rs:18:29
|
LL | let f = bar::Foo{ a: 0, b: 0 };
- | ^^^^ field `b` is private
+ | ^^^^ private field
error: aborting due to 2 previous errors
--> $DIR/E0603.rs:6:17
|
LL | SomeModule::PRIVATE;
- | ^^^^^^^ this constant is private
+ | ^^^^^^^ private constant
|
note: the constant `PRIVATE` is defined here
--> $DIR/E0603.rs:2:5
--> $DIR/E0624.rs:11:9
|
LL | foo.method();
- | ^^^^^^
+ | ^^^^^^ private associated function
error: aborting due to previous error
--> $DIR/error-festival.rs:22:10
|
LL | foo::FOO;
- | ^^^ this constant is private
+ | ^^^ private constant
|
note: the constant `FOO` is defined here
--> $DIR/error-festival.rs:7:5
--> $DIR/explore-issue-38412.rs:50:7
|
LL | r.pub_crate();
- | ^^^^^^^^^
+ | ^^^^^^^^^ private associated function
error[E0624]: associated function `pub_mod` is private
--> $DIR/explore-issue-38412.rs:51:7
|
LL | r.pub_mod();
- | ^^^^^^^
+ | ^^^^^^^ private associated function
error[E0624]: associated function `private` is private
--> $DIR/explore-issue-38412.rs:52:7
|
LL | r.private();
- | ^^^^^^^
+ | ^^^^^^^ private associated function
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:57:7
--> $DIR/explore-issue-38412.rs:63:7
|
LL | t.pub_crate();
- | ^^^^^^^^^
+ | ^^^^^^^^^ private associated function
error[E0624]: associated function `pub_mod` is private
--> $DIR/explore-issue-38412.rs:64:7
|
LL | t.pub_mod();
- | ^^^^^^^
+ | ^^^^^^^ private associated function
error[E0624]: associated function `private` is private
--> $DIR/explore-issue-38412.rs:65:7
|
LL | t.private();
- | ^^^^^^^
+ | ^^^^^^^ private associated function
error: aborting due to 19 previous errors
--> $DIR/export-import.rs:1:8
|
LL | use m::unexported;
- | ^^^^^^^^^^ this function is private
+ | ^^^^^^^^^^ private function
|
note: the function `unexported` is defined here
--> $DIR/export-import.rs:7:5
--> $DIR/export-tag-variant.rs:7:26
|
LL | fn main() { let z = foo::Y::Y1; }
- | ^ this enum is private
+ | ^ private enum
|
note: the enum `Y` is defined here
--> $DIR/export-tag-variant.rs:4:5
--> $DIR/export.rs:10:18
|
LL | fn main() { foo::z(10); }
- | ^ this function is private
+ | ^ private function
|
note: the function `z` is defined here
--> $DIR/export.rs:5:5
--> $DIR/extern-crate-visibility.rs:6:10
|
LL | use foo::core::cell;
- | ^^^^ this crate import is private
+ | ^^^^ private crate import
|
note: the crate import `core` is defined here
--> $DIR/extern-crate-visibility.rs:2:5
--> $DIR/extern-crate-visibility.rs:9:10
|
LL | foo::core::cell::Cell::new(0);
- | ^^^^ this crate import is private
+ | ^^^^ private crate import
|
note: the crate import `core` is defined here
--> $DIR/extern-crate-visibility.rs:2:5
--> $DIR/functional-struct-update-respects-privacy.rs:28:49
|
LL | let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
- | ^^^ field `secret_uid` is private
+ | ^^^ private field
error: aborting due to previous error
--> $DIR/fields.rs:15:17
|
LL | let s = S { x: 0 };
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
...
LL | let s = foo::m!(S, x);
| ------------- in this macro invocation
--> $DIR/fields.rs:16:17
|
LL | let _ = s.x;
- | ^
+ | ^ private type
...
LL | let s = foo::m!(S, x);
| ------------- in this macro invocation
--> $DIR/fields.rs:18:17
|
LL | let t = T(0);
- | ^^^^
+ | ^^^^ private type
...
LL | let s = foo::m!(S, x);
| ------------- in this macro invocation
--> $DIR/fields.rs:19:17
|
LL | let _ = t.0;
- | ^
+ | ^ private type
...
LL | let s = foo::m!(S, x);
| ------------- in this macro invocation
--> $DIR/impl_items.rs:12:23
|
LL | let _: () = S.f();
- | ^
+ | ^ private type
...
LL | foo::m!();
| ---------- in this macro invocation
--> $DIR/intercrate.rs:10:16
|
LL | assert_eq!(intercrate::foo::m!(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/privacy.rs:16:14
|
LL | foo::f()
- | ^ this function is private
+ | ^ private function
|
note: the function `f` is defined here
--> $DIR/privacy.rs:4:5
--> $DIR/rustc-macro-transparency.rs:29:5
|
LL | semitransparent;
- | ^^^^^^^^^^^^^^^ help: use `!` to invoke the macro: `semitransparent!`
+ | ^^^^^^^^^^^^^^^
+ |
+help: use `!` to invoke the macro
+ |
+LL | semitransparent!;
+ | ^
error[E0423]: expected value, found macro `opaque`
--> $DIR/rustc-macro-transparency.rs:30:5
|
LL | opaque;
- | ^^^^^^ help: use `!` to invoke the macro: `opaque!`
+ | ^^^^^^
+ |
+help: use `!` to invoke the macro
+ |
+LL | opaque!;
+ | ^
error: aborting due to 3 previous errors
--> $DIR/import.rs:15:10
|
LL | zed::foo();
- | ^^^ this unresolved item import is private
+ | ^^^ private unresolved item import
|
note: the unresolved item import `foo` is defined here
--> $DIR/import.rs:10:9
--> $DIR/issue-55884-2.rs:12:17
|
LL | pub use parser::ParseOptions;
- | ^^^^^^^^^^^^ this struct import is private
+ | ^^^^^^^^^^^^ private struct import
|
note: the struct import `ParseOptions` is defined here...
--> $DIR/issue-55884-2.rs:9:9
--> $DIR/reexports.rs:33:15
|
LL | use b::a::foo::S;
- | ^^^ this module import is private
+ | ^^^ private module import
|
note: the module import `foo` is defined here...
--> $DIR/reexports.rs:21:17
--> $DIR/reexports.rs:34:15
|
LL | use b::b::foo::S as T;
- | ^^^ this module import is private
+ | ^^^ private module import
|
note: the module import `foo` is defined here...
--> $DIR/reexports.rs:26:17
--> $DIR/unresolved-imports-used.rs:9:10
|
LL | use qux::quz;
- | ^^^ this function is private
+ | ^^^ private function
|
note: the function `quz` is defined here
--> $DIR/unresolved-imports-used.rs:5:4
--> $DIR/issue-10545.rs:6:14
|
LL | fn foo(_: a::S) {
- | ^ this struct is private
+ | ^ private struct
|
note: the struct `S` is defined here
--> $DIR/issue-10545.rs:2:5
--> $DIR/issue-11593.rs:7:24
|
LL | impl private_trait_xc::Foo for Bar {}
- | ^^^ this trait is private
+ | ^^^ private trait
|
note: the trait `Foo` is defined here
--> $DIR/auxiliary/private-trait-xc.rs:1:1
--> $DIR/issue-11680.rs:6:21
|
LL | let _b = other::Foo::Bar(1);
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Foo` is defined here
--> $DIR/auxiliary/issue-11680.rs:1:1
--> $DIR/issue-11680.rs:9:27
|
LL | let _b = other::test::Foo::Bar(1);
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Foo` is defined here
--> $DIR/auxiliary/issue-11680.rs:6:5
--> $DIR/issue-13407.rs:6:8
|
LL | A::C = 1;
- | ^ this unit struct is private
+ | ^ private unit struct
|
note: the unit struct `C` is defined here
--> $DIR/issue-13407.rs:2:5
--> $DIR/issue-13641.rs:9:8
|
LL | a::Foo::new();
- | ^^^ this struct is private
+ | ^^^ private struct
|
note: the struct `Foo` is defined here
--> $DIR/issue-13641.rs:2:5
--> $DIR/issue-13641.rs:11:8
|
LL | a::Bar::new();
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Bar` is defined here
--> $DIR/issue-13641.rs:4:5
--> $DIR/issue-16725.rs:6:19
|
LL | unsafe { foo::bar(); }
- | ^^^ this function is private
+ | ^^^ private function
|
note: the function `bar` is defined here
--> $DIR/auxiliary/issue-16725.rs:2:5
--> $DIR/issue-17718-const-privacy.rs:5:8
|
LL | use a::B;
- | ^ this constant is private
+ | ^ private constant
|
note: the constant `B` is defined here
--> $DIR/issue-17718-const-privacy.rs:13:5
--> $DIR/issue-17718-const-privacy.rs:8:5
|
LL | BAR,
- | ^^^ this constant is private
+ | ^^^ private constant
|
note: the constant `BAR` is defined here
--> $DIR/auxiliary/issue-17718-const-privacy.rs:4:1
--> $DIR/issue-21202.rs:10:9
|
LL | Foo::foo(&f);
- | ^^^^^^^^
+ | ^^^^^^^^ private associated function
error: aborting due to previous error
--> $DIR/issue-28388-2.rs:7:8
|
LL | use m::n::{};
- | ^ this module is private
+ | ^ private module
|
note: the module `n` is defined here
--> $DIR/issue-28388-2.rs:4:5
--> $DIR/issue-29161.rs:13:8
|
LL | a::A::default();
- | ^ this struct is private
+ | ^ private struct
|
note: the struct `A` is defined here
--> $DIR/issue-29161.rs:2:5
--> $DIR/issue-3763.rs:24:18
|
LL | (&my_struct).happyfun();
- | ^^^^^^^^
+ | ^^^^^^^^ private associated function
error[E0624]: associated function `happyfun` is private
--> $DIR/issue-3763.rs:26:27
|
LL | (Box::new(my_struct)).happyfun();
- | ^^^^^^^^
+ | ^^^^^^^^ private associated function
error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private
--> $DIR/issue-3763.rs:27:26
--> $DIR/issue-38857.rs:7:18
|
LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `sys` is defined here
--> $SRC_DIR/libstd/lib.rs:LL:COL
--> $DIR/issue-3993.rs:1:10
|
LL | use zoo::fly;
- | ^^^ this function is private
+ | ^^^ private function
|
note: the function `fly` is defined here
--> $DIR/issue-3993.rs:4:5
--> $DIR/issue-53498.rs:16:5
|
LL | test::Foo::<test::B>::foo();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
error: aborting due to previous error
--> $DIR/macro-local-data-key-priv.rs:8:10
|
LL | bar::baz.with(|_| ());
- | ^^^ this constant is private
+ | ^^^ private constant
|
note: the constant `baz` is defined here
--> $DIR/macro-local-data-key-priv.rs:4:5
--> $DIR/pub-item-macro.rs:20:23
|
LL | let y: u32 = foo::x;
- | ^ this static is private
+ | ^ private static
|
note: the static `x` is defined here
--> $DIR/pub-item-macro.rs:5:9
--> $DIR/associated-item-privacy-inherent.rs:13:21
|
LL | let value = Pub::method;
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private type
...
LL | priv_nominal::mac!();
| --------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:15:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_nominal::mac!();
| --------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:17:13
|
LL | Pub.method();
- | ^^^^^^
+ | ^^^^^^ private type
...
LL | priv_nominal::mac!();
| --------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:19:9
|
LL | Pub::CONST;
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private associated constant
...
LL | priv_nominal::mac!();
| --------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:37:21
|
LL | let value = Pub::method;
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private type
...
LL | priv_signature::mac!();
| ----------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:39:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_signature::mac!();
| ----------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:41:13
|
LL | Pub.method(loop {});
- | ^^^^^^
+ | ^^^^^^ private type
...
LL | priv_signature::mac!();
| ----------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:57:21
|
LL | let value = Pub::method::<Priv>;
- | ^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_substs::mac!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:59:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_substs::mac!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:61:9
|
LL | Pub.method::<Priv>();
- | ^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_substs::mac!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:80:21
|
LL | let value = <Pub>::method;
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:82:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:84:21
|
LL | let value = Pub::method;
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:86:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:88:21
|
LL | let value = <Pub>::static_method;
- | ^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:90:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:92:21
|
LL | let value = Pub::static_method;
- | ^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:94:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:96:19
|
LL | Pub(Priv).method();
- | ^^^^^^
+ | ^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:99:10
|
LL | <Pub>::CONST;
- | ^^^
+ | ^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-inherent.rs:101:9
|
LL | Pub::CONST;
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:17:21
|
LL | let value = <Pub as PrivTr>::method;
- | ^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:19:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:21:13
|
LL | Pub.method();
- | ^^^^^^
+ | ^^^^^^ private type
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:23:9
|
LL | <Pub as PrivTr>::CONST;
- | ^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^ private associated constant
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:25:16
|
LL | let _: <Pub as PrivTr>::AssocTy;
- | ^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ private associated type
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:27:34
|
LL | pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
- | ^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:29:34
|
LL | pub trait InSignatureTr: PrivTr {}
- | ^^^^^^
+ | ^^^^^^ private trait
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:31:14
|
LL | impl PrivTr for u8 {}
- | ^^^^^^
+ | ^^^^^^ private trait
...
LL | priv_trait::mac!();
| ------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:48:21
|
LL | let value = <Pub as PubTr>::method;
- | ^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_signature::mac!();
| ----------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:50:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_signature::mac!();
| ----------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:52:13
|
LL | Pub.method(loop {});
- | ^^^^^^
+ | ^^^^^^ private type
...
LL | priv_signature::mac!();
| ----------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:69:21
|
LL | let value = <Pub as PubTr>::method::<Priv>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_substs::mac!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:71:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_substs::mac!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:73:9
|
LL | Pub.method::<Priv>();
- | ^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_substs::mac!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:93:21
|
LL | let value = <Pub as PubTr>::method;
- | ^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:95:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:97:21
|
LL | let value = <Pub as PubTr<_>>::method;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:99:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:101:9
|
LL | Pub.method();
- | ^^^^^^^^^^^^
+ | ^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:104:21
|
LL | let value = <Priv as PubTr<_>>::method;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:106:9
|
LL | value;
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:108:9
|
LL | Priv.method();
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:111:9
|
LL | <Pub as PubTr>::CONST;
- | ^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:113:9
|
LL | <Pub as PubTr<_>>::CONST;
- | ^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:115:9
|
LL | <Priv as PubTr<_>>::CONST;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:119:30
|
LL | let _: <Pub as PubTr<_>>::AssocTy;
- | ^
+ | ^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:121:17
|
LL | let _: <Priv as PubTr<_>>::AssocTy;
- | ^^^^
+ | ^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:124:35
|
LL | pub type InSignatureTy1 = <Pub as PubTr>::AssocTy;
- | ^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:126:35
|
LL | pub type InSignatureTy2 = <Priv as PubTr<Pub>>::AssocTy;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-trait.rs:128:14
|
LL | impl PubTr for u8 {}
- | ^^^^^
+ | ^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:11:13
|
LL | let _: Box<dyn PubTr<AssocTy = u8>>;
- | ^
+ | ^ private trait
...
LL | priv_trait::mac1!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:11:16
|
LL | let _: Box<dyn PubTr<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac1!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:14:31
|
LL | type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac1!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:16:31
|
LL | trait InSignatureTr2: PubTr<AssocTy = u8> {}
- | ^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac1!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:20:13
|
LL | let _: Box<dyn PrivTr<AssocTy = u8>>;
- | ^
+ | ^ private trait
...
LL | priv_trait::mac2!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:20:16
|
LL | let _: Box<dyn PrivTr<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac2!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:23:31
|
LL | type InSignatureTy1 = Box<dyn PrivTr<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac2!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:25:31
|
LL | trait InSignatureTr1: PrivTr<AssocTy = u8> {}
- | ^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^ private trait
...
LL | priv_trait::mac2!();
| -------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:44:13
|
LL | let _: Box<dyn PubTrWithParam<AssocTy = u8>>;
- | ^
+ | ^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:44:16
|
LL | let _: Box<dyn PubTrWithParam<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:47:13
|
LL | let _: Box<dyn PubTr<AssocTy = u8>>;
- | ^
+ | ^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:47:16
|
LL | let _: Box<dyn PubTr<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:50:35
|
LL | pub type InSignatureTy1 = Box<dyn PubTrWithParam<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:52:35
|
LL | pub type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:54:31
|
LL | trait InSignatureTr1: PubTrWithParam<AssocTy = u8> {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/associated-item-privacy-type-binding.rs:56:31
|
LL | trait InSignatureTr2: PubTr<AssocTy = u8> {}
- | ^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^ private type
...
LL | priv_parent_substs::mac!();
| --------------------------- in this macro invocation
--> $DIR/decl-macro.rs:8:8
|
LL | m::mac!();
- | ^^^ this macro is private
+ | ^^^ private macro
|
note: the macro `mac` is defined here
--> $DIR/decl-macro.rs:4:5
--> $DIR/privacy-in-paths.rs:24:16
|
LL | ::foo::bar::baz::f();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `bar` is defined here
--> $DIR/privacy-in-paths.rs:3:5
--> $DIR/privacy-in-paths.rs:25:16
|
LL | ::foo::bar::S::f();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `bar` is defined here
--> $DIR/privacy-in-paths.rs:3:5
--> $DIR/privacy-in-paths.rs:26:23
|
LL | <() as ::foo::T>::Assoc::f();
- | ^ this trait is private
+ | ^ private trait
|
note: the trait `T` is defined here
--> $DIR/privacy-in-paths.rs:8:5
--> $DIR/privacy-ns2.rs:63:15
|
LL | use foo3::Bar;
- | ^^^ this trait is private
+ | ^^^ private trait
|
note: the trait `Bar` is defined here
--> $DIR/privacy-ns2.rs:55:5
--> $DIR/privacy-ns2.rs:67:15
|
LL | use foo3::Bar;
- | ^^^ this trait is private
+ | ^^^ private trait
|
note: the trait `Bar` is defined here
--> $DIR/privacy-ns2.rs:55:5
--> $DIR/privacy-ns2.rs:74:16
|
LL | use foo3::{Bar,Baz};
- | ^^^ this trait is private
+ | ^^^ private trait
|
note: the trait `Bar` is defined here
--> $DIR/privacy-ns2.rs:55:5
--> $DIR/privacy-ufcs.rs:12:20
|
LL | <i32 as ::foo::Bar>::baz();
- | ^^^ this trait is private
+ | ^^^ private trait
|
note: the trait `Bar` is defined here
--> $DIR/privacy-ufcs.rs:4:5
--> $DIR/privacy1.rs:132:18
|
LL | use bar::baz::{foo, bar};
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:132:18
|
LL | use bar::baz::{foo, bar};
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:141:18
|
LL | use bar::baz;
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:165:20
|
LL | use self::foo::i::A;
- | ^ this module is private
+ | ^ private module
|
note: the module `i` is defined here
--> $DIR/privacy1.rs:170:9
--> $DIR/privacy1.rs:104:16
|
LL | ::bar::baz::A::foo();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:105:16
|
LL | ::bar::baz::A::bar();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:107:16
|
LL | ::bar::baz::A.foo2();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:108:16
|
LL | ::bar::baz::A.bar2();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:112:16
|
LL | ::bar::B::foo();
- | ^ this trait is private
+ | ^ private trait
|
note: the trait `B` is defined here
--> $DIR/privacy1.rs:40:5
--> $DIR/privacy1.rs:118:20
|
LL | ::bar::epriv();
- | ^^^^^ this function is private
+ | ^^^^^ private function
|
note: the function `epriv` is defined here
--> $DIR/privacy1.rs:65:9
--> $DIR/privacy1.rs:127:16
|
LL | ::bar::baz::foo();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:128:16
|
LL | ::bar::baz::bar();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `baz` is defined here
--> $DIR/privacy1.rs:50:5
--> $DIR/privacy1.rs:157:17
|
LL | impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
- | ^ this trait is private
+ | ^ private trait
|
note: the trait `B` is defined here
--> $DIR/privacy1.rs:40:5
--> $DIR/privacy1.rs:77:9
|
LL | self::baz::A::bar();
- | ^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:95:5
|
LL | bar::A::bar();
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:102:9
|
LL | ::bar::A::bar();
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar` is private
--> $DIR/privacy1.rs:105:9
|
LL | ::bar::baz::A::bar();
- | ^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `bar2` is private
--> $DIR/privacy1.rs:108:23
|
LL | ::bar::baz::A.bar2();
- | ^^^^
+ | ^^^^ private associated function
error: aborting due to 18 previous errors
--> $DIR/privacy2.rs:23:20
|
LL | use bar::glob::foo;
- | ^^^ this function import is private
+ | ^^^ private function import
|
note: the function import `foo` is defined here...
--> $DIR/privacy2.rs:10:13
--> $DIR/privacy4.rs:21:14
|
LL | use bar::glob::gpriv;
- | ^^^^ this module is private
+ | ^^^^ private module
|
note: the module `glob` is defined here
--> $DIR/privacy4.rs:13:5
| -- a constructor is private if any of the fields is private
...
LL | let a = a::A(());
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5
| ----- a constructor is private if any of the fields is private
...
LL | let b = a::B(2);
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ---------------- a constructor is private if any of the fields is private
...
LL | let c = a::C(2, 3);
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| -- a constructor is private if any of the fields is private
...
LL | let a::A(()) = a;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5
| -- a constructor is private if any of the fields is private
...
LL | let a::A(_) = a;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5
| -- a constructor is private if any of the fields is private
...
LL | match a { a::A(()) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5
| -- a constructor is private if any of the fields is private
...
LL | match a { a::A(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5
| ----- a constructor is private if any of the fields is private
...
LL | let a::B(_) = b;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ----- a constructor is private if any of the fields is private
...
LL | let a::B(_b) = b;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ----- a constructor is private if any of the fields is private
...
LL | match b { a::B(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ----- a constructor is private if any of the fields is private
...
LL | match b { a::B(_b) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ----- a constructor is private if any of the fields is private
...
LL | match b { a::B(1) => {} a::B(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ----- a constructor is private if any of the fields is private
...
LL | match b { a::B(1) => {} a::B(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ---------------- a constructor is private if any of the fields is private
...
LL | let a::C(_, _) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | let a::C(_a, _) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | let a::C(_, _b) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | let a::C(_a, _b) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | match c { a::C(_, _) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | match c { a::C(_a, _) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | match c { a::C(_, _b) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| ---------------- a constructor is private if any of the fields is private
...
LL | match c { a::C(_a, _b) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
| -- a constructor is private if any of the fields is private
...
LL | let a2 = a::A;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `A` is defined here
--> $DIR/privacy5.rs:6:5
| ----- a constructor is private if any of the fields is private
...
LL | let b2 = a::B;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `B` is defined here
--> $DIR/privacy5.rs:7:5
| ---------------- a constructor is private if any of the fields is private
...
LL | let c2 = a::C;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `C` is defined here
--> $DIR/privacy5.rs:8:5
--> $DIR/privacy5.rs:90:20
|
LL | let a = other::A(());
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
|
--> $DIR/privacy5.rs:91:20
|
LL | let b = other::B(2);
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:92:20
|
LL | let c = other::C(2, 3);
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:95:16
|
LL | let other::A(()) = a;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
|
--> $DIR/privacy5.rs:96:16
|
LL | let other::A(_) = a;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
|
--> $DIR/privacy5.rs:97:22
|
LL | match a { other::A(()) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
|
--> $DIR/privacy5.rs:98:22
|
LL | match a { other::A(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
|
--> $DIR/privacy5.rs:100:16
|
LL | let other::B(_) = b;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:101:16
|
LL | let other::B(_b) = b;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:102:22
|
LL | match b { other::B(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:103:22
|
LL | match b { other::B(_b) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:104:22
|
LL | match b { other::B(1) => {}
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:105:16
|
LL | other::B(_) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:107:16
|
LL | let other::C(_, _) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:108:16
|
LL | let other::C(_a, _) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:109:16
|
LL | let other::C(_, _b) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:110:16
|
LL | let other::C(_a, _b) = c;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:111:22
|
LL | match c { other::C(_, _) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:112:22
|
LL | match c { other::C(_a, _) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:113:22
|
LL | match c { other::C(_, _b) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:114:22
|
LL | match c { other::C(_a, _b) => {} }
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/privacy5.rs:122:21
|
LL | let a2 = other::A;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14
|
--> $DIR/privacy5.rs:123:21
|
LL | let b2 = other::B;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14
|
--> $DIR/privacy5.rs:124:21
|
LL | let c2 = other::C;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14
|
--> $DIR/private-impl-method.rs:20:7
|
LL | s.foo();
- | ^^^
+ | ^^^ private associated function
error: aborting due to previous error
--> $DIR/private-in-public-non-principal-2.rs:11:5
|
LL | m::leak_dyn_nonprincipal();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
error: aborting due to previous error
--> $DIR/private-inferred-type-1.rs:16:5
|
LL | [].arr0_secret();
- | ^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type-1.rs:17:5
|
LL | None.ty_param_secret();
- | ^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^ private type
error: aborting due to 2 previous errors
--> $DIR/private-inferred-type-2.rs:16:5
|
LL | m::Pub::get_priv;
- | ^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type-2.rs:17:5
|
LL | m::Pub::static_method;
- | ^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^ private type
error: type `ext::Priv` is private
--> $DIR/private-inferred-type-2.rs:18:5
|
LL | ext::Pub::static_method;
- | ^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
error: aborting due to 3 previous errors
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private static
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/private-inferred-type.rs:97:9
|
LL | let _: m::Alias;
- | ^
+ | ^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:97:12
|
LL | let _: m::Alias;
- | ^^^^^^^^
+ | ^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:99:13
|
LL | let _: <m::Alias as m::TraitWithAssocTy>::AssocTy;
- | ^^^^^^^^
+ | ^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:100:5
|
LL | m::Alias {};
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:101:5
|
LL | m::Pub { 0: m::Alias {} };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:103:5
|
LL | m::Pub::static_method;
- | ^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:104:5
|
LL | m::Pub::INHERENT_ASSOC_CONST;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:105:5
|
LL | m::Pub(0u8).method_with_substs::<m::Alias>();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:106:17
|
LL | m::Pub(0u8).method_with_priv_params(loop{});
- | ^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:107:5
|
LL | <m::Alias as m::TraitWithAssocConst>::TRAIT_ASSOC_CONST;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:108:6
|
LL | <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST;
- | ^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:109:5
|
LL | <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST_GENERIC_SELF;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:110:5
|
LL | <m::Pub<m::Alias>>::static_method_generic_self;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:112:5
|
LL | u8::pub_method;
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ private type
error: type `adjust::S2` is private
--> $DIR/private-inferred-type.rs:114:5
|
LL | adjust::S1.method_s3();
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
error: type `fn() {m::priv_fn}` is private
--> $DIR/private-inferred-type.rs:39:9
|
LL | priv_fn;
- | ^^^^^^^
+ | ^^^^^^^ private type
...
LL | m::m!();
| -------- in this macro invocation
--> $DIR/private-inferred-type.rs:41:9
|
LL | PrivEnum::Variant;
- | ^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^ private type
...
LL | m::m!();
| -------- in this macro invocation
--> $DIR/private-inferred-type.rs:43:9
|
LL | <u8 as PrivTrait>::method;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
...
LL | m::m!();
| -------- in this macro invocation
--> $DIR/private-inferred-type.rs:45:9
|
LL | PrivTupleStruct;
- | ^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^ private type
...
LL | m::m!();
| -------- in this macro invocation
--> $DIR/private-inferred-type.rs:47:9
|
LL | PubTupleStruct;
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ private type
...
LL | m::m!();
| -------- in this macro invocation
--> $DIR/private-inferred-type.rs:49:18
|
LL | Pub(0u8).priv_method();
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private type
...
LL | m::m!();
| -------- in this macro invocation
--> $DIR/private-inferred-type.rs:118:5
|
LL | m::leak_anon1();
- | ^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^ private trait
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:119:5
|
LL | m::leak_anon2();
- | ^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:120:5
|
LL | m::leak_anon3();
- | ^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^ private type
error: trait `m::Trait` is private
--> $DIR/private-inferred-type.rs:122:5
|
LL | m::leak_dyn1();
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ private trait
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:123:5
|
LL | m::leak_dyn2();
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:124:5
|
LL | m::leak_dyn3();
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:127:13
|
LL | let a = m::Alias {};
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:128:17
|
LL | let mut b = a;
- | ^
+ | ^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:129:9
|
LL | b = a;
- | ^
+ | ^ private type
error: type `m::Priv` is private
--> $DIR/private-inferred-type.rs:130:11
|
LL | match a {
- | ^
+ | ^ private type
error: aborting due to 33 previous errors
--> $DIR/private-item-simple.rs:6:8
|
LL | a::f();
- | ^ this function is private
+ | ^ private function
|
note: the function `f` is defined here
--> $DIR/private-item-simple.rs:2:5
--> $DIR/private-method-cross-crate.rs:7:8
|
LL | nyan.nap();
- | ^^^
+ | ^^^ private associated function
error: aborting due to previous error
--> $DIR/private-method-inherited.rs:13:7
|
LL | x.f();
- | ^
+ | ^ private associated function
error: aborting due to previous error
--> $DIR/private-method.rs:22:8
|
LL | nyan.nap();
- | ^^^
+ | ^^^ private associated function
error: aborting due to previous error
--> $DIR/private-struct-field-ctor.rs:8:22
|
LL | let s = a::Foo { x: 1 };
- | ^^^^ field `x` is private
+ | ^^^^ private field
error: aborting due to previous error
--> $DIR/private-struct-field-pattern.rs:15:15
|
LL | Foo { x: _ } => {}
- | ^^^^ field `x` is private
+ | ^^^^ private field
error: aborting due to previous error
--> $DIR/private-type-in-interface.rs:15:9
|
LL | fn f(_: m::Alias) {}
- | ^^^^^^^^
+ | ^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:15:6
|
LL | fn f(_: m::Alias) {}
- | ^
+ | ^ private type
error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:17:13
|
LL | fn f_ext(_: ext::Alias) {}
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:17:10
|
LL | fn f_ext(_: ext::Alias) {}
- | ^
+ | ^ private type
error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:21:6
|
LL | impl m::Alias {}
- | ^^^^^^^^
+ | ^^^^^^^^ private type
error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:22:14
|
LL | impl Tr1 for ext::Alias {}
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:23:10
|
LL | type A = <m::Alias as m::Trait>::X;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
error: type `m::Priv` is private
--> $DIR/private-type-in-interface.rs:27:11
|
LL | fn g() -> impl Tr2<m::Alias> { 0 }
- | ^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^ private type
error: type `ext::Priv` is private
--> $DIR/private-type-in-interface.rs:28:15
|
LL | fn g_ext() -> impl Tr2<ext::Alias> { 0 }
- | ^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^ private type
error: aborting due to 9 previous errors
--> $DIR/struct-literal-field.rs:18:9
|
LL | S { x: 0 };
- | ^^^^ field `x` is private
+ | ^^^^ private field
error: aborting due to previous error
--> $DIR/test.rs:38:25
|
LL | use pub_restricted::Crate;
- | ^^^^^ this struct is private
+ | ^^^^^ private struct
|
note: the struct `Crate` is defined here
--> $DIR/auxiliary/pub_restricted.rs:3:1
--> $DIR/test.rs:30:19
|
LL | use foo::bar::f;
- | ^ this function is private
+ | ^ private function
|
note: the function `f` is defined here
--> $DIR/test.rs:8:9
--> $DIR/test.rs:32:18
|
LL | S::default().f();
- | ^
+ | ^ private associated function
error[E0624]: associated function `g` is private
--> $DIR/test.rs:33:5
|
LL | S::g();
- | ^^^^
+ | ^^^^ private associated function
error[E0616]: field `y` of struct `pub_restricted::Universe` is private
--> $DIR/test.rs:42:15
--> $DIR/test.rs:45:7
|
LL | u.g();
- | ^
+ | ^ private associated function
error[E0624]: associated function `h` is private
--> $DIR/test.rs:46:7
|
LL | u.h();
- | ^
+ | ^ private associated function
error: aborting due to 12 previous errors
--> $DIR/union-field-privacy-1.rs:12:20
|
LL | let u = m::U { c: 0 };
- | ^^^^ field `c` is private
+ | ^^^^ private field
error[E0451]: field `c` of union `m::U` is private
--> $DIR/union-field-privacy-1.rs:16:16
|
LL | let m::U { c } = u;
- | ^ field `c` is private
+ | ^ private field
error: aborting due to 2 previous errors
--> $DIR/disappearing-resolution.rs:11:8
|
LL | use m::Empty;
- | ^^^^^ this derive macro import is private
+ | ^^^^^ private derive macro import
|
note: the derive macro import `Empty` is defined here
--> $DIR/disappearing-resolution.rs:9:9
--> $DIR/unreachable-variant.rs:6:21
|
LL | let _x = other::super_sekrit::sooper_sekrit::baz;
- | ^^^^^^^^^^^^ this module is private
+ | ^^^^^^^^^^^^ private module
|
note: the module `super_sekrit` is defined here
--> $DIR/auxiliary/unreachable_variant.rs:1:1
--> $DIR/privacy-enum-ctor.rs:57:22
|
LL | let _: Z = m::n::Z;
- | ^ this enum is private
+ | ^ private enum
|
note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9
--> $DIR/privacy-enum-ctor.rs:61:22
|
LL | let _: Z = m::n::Z::Fn;
- | ^ this enum is private
+ | ^ private enum
|
note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9
--> $DIR/privacy-enum-ctor.rs:64:22
|
LL | let _: Z = m::n::Z::Struct;
- | ^ this enum is private
+ | ^ private enum
|
note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9
--> $DIR/privacy-enum-ctor.rs:68:22
|
LL | let _: Z = m::n::Z::Unit {};
- | ^ this enum is private
+ | ^ private enum
|
note: the enum `Z` is defined here
--> $DIR/privacy-enum-ctor.rs:11:9
| --------------- a constructor is private if any of the fields is private
...
LL | n::Z;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `Z` is defined here
--> $DIR/privacy-struct-ctor.rs:12:9
| -- a constructor is private if any of the fields is private
...
LL | m::S;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `S` is defined here
--> $DIR/privacy-struct-ctor.rs:6:5
| -- a constructor is private if any of the fields is private
...
LL | let _: S = m::S(2);
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `S` is defined here
--> $DIR/privacy-struct-ctor.rs:6:5
| --------------- a constructor is private if any of the fields is private
...
LL | m::n::Z;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
note: the tuple struct constructor `Z` is defined here
--> $DIR/privacy-struct-ctor.rs:12:9
--> $DIR/privacy-struct-ctor.rs:41:16
|
LL | xcrate::m::S;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18
|
--> $DIR/privacy-struct-ctor.rs:45:19
|
LL | xcrate::m::n::Z;
- | ^ this tuple struct constructor is private
+ | ^ private tuple struct constructor
|
::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28
|
--> $DIR/resolve-hint-macro.rs:2:5
|
LL | assert(true);
- | ^^^^^^ help: use `!` to invoke the macro: `assert!`
+ | ^^^^^^
+ |
+help: use `!` to invoke the macro
+ |
+LL | assert!(true);
+ | ^
error: aborting due to previous error
--> $DIR/struct.rs:23:32
|
LL | let ts_explicit = structs::TupleStruct(640, 480);
- | ^^^^^^^^^^^ this tuple struct constructor is private
+ | ^^^^^^^^^^^ private tuple struct constructor
|
::: $DIR/auxiliary/structs.rs:11:24
|
--> $DIR/struct.rs:32:32
|
LL | let us_explicit = structs::UnitStruct;
- | ^^^^^^^^^^ this unit struct is private
+ | ^^^^^^^^^^ private unit struct
|
note: the unit struct `UnitStruct` is defined here
--> $DIR/auxiliary/structs.rs:8:1
--> $DIR/variant.rs:11:48
|
LL | let variant_tuple = NonExhaustiveVariants::Tuple(640);
- | ^^^^^ this tuple variant is private
+ | ^^^^^ private tuple variant
|
note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23
--> $DIR/variant.rs:14:47
|
LL | let variant_unit = NonExhaustiveVariants::Unit;
- | ^^^^ this unit variant is private
+ | ^^^^ private unit variant
|
note: the unit variant `Unit` is defined here
--> $DIR/auxiliary/variants.rs:4:23
--> $DIR/variant.rs:18:32
|
LL | NonExhaustiveVariants::Unit => "",
- | ^^^^ this unit variant is private
+ | ^^^^ private unit variant
|
note: the unit variant `Unit` is defined here
--> $DIR/auxiliary/variants.rs:4:23
--> $DIR/variant.rs:20:32
|
LL | NonExhaustiveVariants::Tuple(fe_tpl) => "",
- | ^^^^^ this tuple variant is private
+ | ^^^^^ private tuple variant
|
note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23
--> $DIR/variant.rs:26:35
|
LL | if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct {
- | ^^^^^ this tuple variant is private
+ | ^^^^^ private tuple variant
|
note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23
--> $DIR/shadowed-use-visibility.rs:9:14
|
LL | use foo::bar::f as g;
- | ^^^ this module import is private
+ | ^^^ private module import
|
note: the module import `bar` is defined here...
--> $DIR/shadowed-use-visibility.rs:4:9
--> $DIR/shadowed-use-visibility.rs:15:10
|
LL | use bar::f::f;
- | ^ this module import is private
+ | ^ private module import
|
note: the module import `f` is defined here...
--> $DIR/shadowed-use-visibility.rs:11:9
--> $DIR/stability-in-private-module.rs:7:26
|
LL | let _ = std::thread::thread_info::current_thread();
- | ^^^^^^^^^^^ this module is private
+ | ^^^^^^^^^^^ private module
|
note: the module `thread_info` is defined here
--> $SRC_DIR/libstd/thread/mod.rs:LL:COL
--> $DIR/static-method-privacy.rs:9:13
|
LL | let _ = a::S::new();
- | ^^^^^^^^^
+ | ^^^^^^^^^ private associated function
error: aborting due to previous error
--> $DIR/static-priv-by-default2.rs:15:30
|
LL | use child::childs_child::private;
- | ^^^^^^^ this static is private
+ | ^^^^^^^ private static
|
note: the static `private` is defined here
--> $DIR/static-priv-by-default2.rs:7:9
--> $DIR/static-priv-by-default2.rs:23:33
|
LL | use static_priv_by_default::private;
- | ^^^^^^^ this static is private
+ | ^^^^^^^ private static
|
note: the static `private` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:3:1
--> $DIR/struct-variant-privacy-xc.rs:4:33
|
LL | fn f(b: struct_variant_privacy::Bar) {
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Bar` is defined here
--> $DIR/auxiliary/struct_variant_privacy.rs:1:1
--> $DIR/struct-variant-privacy-xc.rs:6:33
|
LL | struct_variant_privacy::Bar::Baz { a: _a } => {}
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Bar` is defined here
--> $DIR/auxiliary/struct_variant_privacy.rs:1:1
--> $DIR/struct-variant-privacy.rs:7:14
|
LL | fn f(b: foo::Bar) {
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Bar` is defined here
--> $DIR/struct-variant-privacy.rs:2:5
--> $DIR/struct-variant-privacy.rs:9:14
|
LL | foo::Bar::Baz { a: _a } => {}
- | ^^^ this enum is private
+ | ^^^ private enum
|
note: the enum `Bar` is defined here
--> $DIR/struct-variant-privacy.rs:2:5
--> $DIR/trait-item-privacy.rs:72:7
|
LL | c.a();
- | ^
+ | ^ private associated function
error[E0599]: no function or associated item named `a` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:78:8
--> $DIR/trait-item-privacy.rs:84:5
|
LL | C::a(&S);
- | ^^^^
+ | ^^^^ private associated function
error[E0599]: no associated item named `A` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:97:8
--> $DIR/trait-item-privacy.rs:101:5
|
LL | C::A;
- | ^^^^
+ | ^^^^ private associated constant
error[E0038]: the trait `assoc_const::C` cannot be made into an object
--> $DIR/trait-item-privacy.rs:101:5
--> $DIR/trait-item-privacy.rs:119:12
|
LL | let _: T::A;
- | ^^^^
+ | ^^^^ private associated type
error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:128:9
|
LL | A = u8,
- | ^^^^^^
+ | ^^^^^^ private associated type
error: aborting due to 15 previous errors
--> $DIR/trait-method-private.rs:19:9
|
LL | foo.method();
- | ^^^^^^
+ | ^^^^^^ private associated function
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
--> $DIR/try-block-in-edition2015.rs:4:33
|
LL | let try_result: Option<_> = try {
- | ^^^ help: use `!` to invoke the macro: `try!`
+ | ^^^
|
= note: if you want the `try` keyword, you need to be in the 2018 edition
+help: use `!` to invoke the macro
+ |
+LL | let try_result: Option<_> = try! {
+ | ^
error: aborting due to 2 previous errors
--> $DIR/use-from-trait-xc.rs:14:24
|
LL | use use_from_trait_xc::Foo::new;
- | ^^^ this struct is private
+ | ^^^ private struct
|
note: the struct `Foo` is defined here
--> $DIR/auxiliary/use-from-trait-xc.rs:9:1
--> $DIR/use-from-trait-xc.rs:17:24
|
LL | use use_from_trait_xc::Foo::C;
- | ^^^ this struct is private
+ | ^^^ private struct
|
note: the struct `Foo` is defined here
--> $DIR/auxiliary/use-from-trait-xc.rs:9:1
--> $DIR/use-mod-3.rs:1:10
|
LL | use foo::bar::{
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `bar` is defined here
--> $DIR/use-mod-3.rs:9:5
--> $DIR/use-mod-3.rs:4:10
|
LL | use foo::bar::{
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `bar` is defined here
--> $DIR/use-mod-3.rs:9:5
--> $DIR/xc-private-method.rs:6:13
|
LL | let _ = xc_private_method_lib::Struct::static_meth_struct();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
error[E0624]: associated function `static_meth_enum` is private
--> $DIR/xc-private-method.rs:9:13
|
LL | let _ = xc_private_method_lib::Enum::static_meth_enum();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private associated function
error: aborting due to 2 previous errors
--> $DIR/xc-private-method2.rs:6:52
|
LL | let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct();
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^ private associated function
error[E0624]: associated function `meth_enum` is private
--> $DIR/xc-private-method2.rs:9:55
|
LL | let _ = xc_private_method_lib::Enum::Variant1(20).meth_enum();
- | ^^^^^^^^^
+ | ^^^^^^^^^ private associated function
error: aborting due to 2 previous errors
--> $DIR/xcrate-private-by-default.rs:23:29
|
LL | static_priv_by_default::j;
- | ^ this static is private
+ | ^ private static
|
note: the static `j` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:47:1
--> $DIR/xcrate-private-by-default.rs:25:29
|
LL | static_priv_by_default::k;
- | ^ this function is private
+ | ^ private function
|
note: the function `k` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:48:1
--> $DIR/xcrate-private-by-default.rs:27:29
|
LL | static_priv_by_default::l;
- | ^ this unit struct is private
+ | ^ private unit struct
|
note: the unit struct `l` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:49:1
--> $DIR/xcrate-private-by-default.rs:29:35
|
LL | foo::<static_priv_by_default::m>();
- | ^ this enum is private
+ | ^ private enum
|
note: the enum `m` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:50:1
--> $DIR/xcrate-private-by-default.rs:31:35
|
LL | foo::<static_priv_by_default::n>();
- | ^ this type alias is private
+ | ^ private type alias
|
note: the type alias `n` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:51:1
--> $DIR/xcrate-private-by-default.rs:35:29
|
LL | static_priv_by_default::foo::a;
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1
--> $DIR/xcrate-private-by-default.rs:37:29
|
LL | static_priv_by_default::foo::b;
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1
--> $DIR/xcrate-private-by-default.rs:39:29
|
LL | static_priv_by_default::foo::c;
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1
--> $DIR/xcrate-private-by-default.rs:41:35
|
LL | foo::<static_priv_by_default::foo::d>();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1
--> $DIR/xcrate-private-by-default.rs:43:35
|
LL | foo::<static_priv_by_default::foo::e>();
- | ^^^ this module is private
+ | ^^^ private module
|
note: the module `foo` is defined here
--> $DIR/auxiliary/static_priv_by_default.rs:12:1