Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
acdbd064
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
acdbd064
编写于
10月 27, 2018
作者:
V
Vadim Petrochenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
resolve: More precise spans for privacy errors
上级
b45b4dab
变更
45
显示空白变更内容
内联
并排
Showing
45 changed file
with
276 addition
and
281 deletion
+276
-281
src/librustc_resolve/lib.rs
src/librustc_resolve/lib.rs
+6
-4
src/librustc_resolve/resolve_imports.rs
src/librustc_resolve/resolve_imports.rs
+1
-1
src/test/ui/error-codes/E0603.stderr
src/test/ui/error-codes/E0603.stderr
+2
-2
src/test/ui/error-festival.stderr
src/test/ui/error-festival.stderr
+2
-2
src/test/ui/export-import.stderr
src/test/ui/export-import.stderr
+2
-2
src/test/ui/export-tag-variant.stderr
src/test/ui/export-tag-variant.stderr
+2
-2
src/test/ui/export.stderr
src/test/ui/export.stderr
+2
-2
src/test/ui/extern/extern-crate-visibility.stderr
src/test/ui/extern/extern-crate-visibility.stderr
+4
-4
src/test/ui/hygiene/privacy.stderr
src/test/ui/hygiene/privacy.stderr
+2
-2
src/test/ui/import.stderr
src/test/ui/import.stderr
+2
-2
src/test/ui/imports/reexports.stderr
src/test/ui/imports/reexports.stderr
+4
-4
src/test/ui/issues/issue-10545.stderr
src/test/ui/issues/issue-10545.stderr
+2
-2
src/test/ui/issues/issue-11593.stderr
src/test/ui/issues/issue-11593.stderr
+2
-2
src/test/ui/issues/issue-11680.stderr
src/test/ui/issues/issue-11680.stderr
+4
-4
src/test/ui/issues/issue-13407.stderr
src/test/ui/issues/issue-13407.stderr
+2
-2
src/test/ui/issues/issue-13641.stderr
src/test/ui/issues/issue-13641.stderr
+4
-4
src/test/ui/issues/issue-16725.stderr
src/test/ui/issues/issue-16725.stderr
+2
-2
src/test/ui/issues/issue-17718-const-privacy.stderr
src/test/ui/issues/issue-17718-const-privacy.stderr
+2
-2
src/test/ui/issues/issue-28388-2.stderr
src/test/ui/issues/issue-28388-2.stderr
+2
-2
src/test/ui/issues/issue-29161.stderr
src/test/ui/issues/issue-29161.stderr
+2
-2
src/test/ui/issues/issue-38857.stderr
src/test/ui/issues/issue-38857.stderr
+2
-2
src/test/ui/issues/issue-3993.stderr
src/test/ui/issues/issue-3993.stderr
+2
-2
src/test/ui/macros/macro-local-data-key-priv.stderr
src/test/ui/macros/macro-local-data-key-priv.stderr
+2
-2
src/test/ui/privacy/privacy-in-paths.stderr
src/test/ui/privacy/privacy-in-paths.stderr
+6
-6
src/test/ui/privacy/privacy-ns2.stderr
src/test/ui/privacy/privacy-ns2.stderr
+4
-4
src/test/ui/privacy/privacy-ufcs.stderr
src/test/ui/privacy/privacy-ufcs.stderr
+2
-2
src/test/ui/privacy/privacy1.rs
src/test/ui/privacy/privacy1.rs
+0
-1
src/test/ui/privacy/privacy1.stderr
src/test/ui/privacy/privacy1.stderr
+25
-31
src/test/ui/privacy/privacy2.stderr
src/test/ui/privacy/privacy2.stderr
+2
-2
src/test/ui/privacy/privacy4.stderr
src/test/ui/privacy/privacy4.stderr
+2
-2
src/test/ui/privacy/privacy5.stderr
src/test/ui/privacy/privacy5.stderr
+96
-96
src/test/ui/privacy/private-item-simple.stderr
src/test/ui/privacy/private-item-simple.stderr
+2
-2
src/test/ui/privacy/restricted/test.stderr
src/test/ui/privacy/restricted/test.stderr
+4
-4
src/test/ui/resolve/privacy-enum-ctor.stderr
src/test/ui/resolve/privacy-enum-ctor.stderr
+8
-8
src/test/ui/resolve/privacy-struct-ctor.stderr
src/test/ui/resolve/privacy-struct-ctor.stderr
+12
-12
src/test/ui/rfc-2008-non-exhaustive/structs.stderr
src/test/ui/rfc-2008-non-exhaustive/structs.stderr
+4
-4
src/test/ui/shadowed/shadowed-use-visibility.stderr
src/test/ui/shadowed/shadowed-use-visibility.stderr
+4
-4
src/test/ui/static/static-priv-by-default2.stderr
src/test/ui/static/static-priv-by-default2.stderr
+4
-4
src/test/ui/structs/struct-variant-privacy-xc.stderr
src/test/ui/structs/struct-variant-privacy-xc.stderr
+4
-4
src/test/ui/structs/struct-variant-privacy.stderr
src/test/ui/structs/struct-variant-privacy.stderr
+4
-4
src/test/ui/unreachable/unreachable-variant.stderr
src/test/ui/unreachable/unreachable-variant.stderr
+2
-2
src/test/ui/use/use-from-trait-xc.stderr
src/test/ui/use/use-from-trait-xc.stderr
+4
-4
src/test/ui/use/use-mod/use-mod-3.rs
src/test/ui/use/use-mod/use-mod-3.rs
+4
-4
src/test/ui/use/use-mod/use-mod-3.stderr
src/test/ui/use/use-mod/use-mod-3.stderr
+6
-6
src/test/ui/xcrate/xcrate-private-by-default.stderr
src/test/ui/xcrate/xcrate-private-by-default.stderr
+20
-20
未找到文件。
src/librustc_resolve/lib.rs
浏览文件 @
acdbd064
...
...
@@ -1207,7 +1207,7 @@ enum NameBindingKind<'a> {
}
}
struct
PrivacyError
<
'a
>
(
Span
,
Name
,
&
'a
NameBinding
<
'a
>
);
struct
PrivacyError
<
'a
>
(
Span
,
Ident
,
&
'a
NameBinding
<
'a
>
);
struct
UseError
<
'a
>
{
err
:
DiagnosticBuilder
<
'a
>
,
...
...
@@ -4743,9 +4743,11 @@ fn report_errors(&mut self, krate: &Crate) {
}
}
for
&
PrivacyError
(
span
,
name
,
binding
)
in
&
self
.privacy_errors
{
if
!
reported_spans
.insert
(
span
)
{
continue
}
span_err!
(
self
.session
,
span
,
E0603
,
"{} `{}` is private"
,
binding
.descr
(),
name
);
for
&
PrivacyError
(
dedup_span
,
ident
,
binding
)
in
&
self
.privacy_errors
{
if
reported_spans
.insert
(
dedup_span
)
{
span_err!
(
self
.session
,
ident
.span
,
E0603
,
"{} `{}` is private"
,
binding
.descr
(),
ident
.name
);
}
}
}
...
...
src/librustc_resolve/resolve_imports.rs
浏览文件 @
acdbd064
...
...
@@ -275,7 +275,7 @@ pub fn resolve_ident_in_module_unadjusted(&mut self,
return
Ok
(
self
.dummy_binding
);
}
if
!
self
.is_accessible
(
binding
.vis
)
{
self
.privacy_errors
.push
(
PrivacyError
(
path_span
,
ident
.name
,
binding
));
self
.privacy_errors
.push
(
PrivacyError
(
path_span
,
ident
,
binding
));
}
}
...
...
src/test/ui/error-codes/E0603.stderr
浏览文件 @
acdbd064
error[E0603]: constant `PRIVATE` is private
--> $DIR/E0603.rs:16:
5
--> $DIR/E0603.rs:16:
17
|
LL | SomeModule::PRIVATE; //~ ERROR E0603
|
^^^^^^^^^^^^
^^^^^^^
|
^^^^^^^
error: aborting due to previous error
...
...
src/test/ui/error-festival.stderr
浏览文件 @
acdbd064
...
...
@@ -5,10 +5,10 @@ LL | y = 2;
| ^ did you mean `x`?
error[E0603]: constant `FOO` is private
--> $DIR/error-festival.rs:32:
5
--> $DIR/error-festival.rs:32:
10
|
LL | foo::FOO;
|
^^^^^
^^^
|
^^^
error[E0368]: binary assignment operation `+=` cannot be applied to type `&str`
--> $DIR/error-festival.rs:22:5
...
...
src/test/ui/export-import.stderr
浏览文件 @
acdbd064
error[E0603]: function `unexported` is private
--> $DIR/export-import.rs:11:
5
--> $DIR/export-import.rs:11:
8
|
LL | use m::unexported;
|
^^^
^^^^^^^^^^
|
^^^^^^^^^^
error: aborting due to previous error
...
...
src/test/ui/export-tag-variant.stderr
浏览文件 @
acdbd064
error[E0603]: enum `y` is private
--> $DIR/export-tag-variant.rs:17:2
1
--> $DIR/export-tag-variant.rs:17:2
6
|
LL | fn main() { let z = foo::y::y1; } //~ ERROR: enum `y` is private
|
^^^^^^^^^
^
|
^
error: aborting due to previous error
...
...
src/test/ui/export.stderr
浏览文件 @
acdbd064
...
...
@@ -23,10 +23,10 @@ LL | fn z(y: isize) { log(debug, y); }
| ^^^^^ not found in this scope
error[E0603]: function `z` is private
--> $DIR/export.rs:20:1
3
--> $DIR/export.rs:20:1
8
|
LL | fn main() { foo::z(10); } //~ ERROR function `z` is private
|
^^^^^
^
|
^
error: aborting due to 5 previous errors
...
...
src/test/ui/extern/extern-crate-visibility.stderr
浏览文件 @
acdbd064
error[E0603]: extern crate `core` is private
--> $DIR/extern-crate-visibility.rs:16:
5
--> $DIR/extern-crate-visibility.rs:16:
10
|
LL | use foo::core::cell; //~ ERROR extern crate `core` is private
|
^^^^^^^^^^^
^^^^
|
^^^^
error[E0603]: extern crate `core` is private
--> $DIR/extern-crate-visibility.rs:19:
5
--> $DIR/extern-crate-visibility.rs:19:
10
|
LL | foo::core::cell::Cell::new(0); //~ ERROR extern crate `core` is private
|
^^^^^^^^^^^^^^^^^^^^^^
^^^^
|
^^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/hygiene/privacy.stderr
浏览文件 @
acdbd064
error[E0603]: function `f` is private
--> $DIR/privacy.rs:26:
9
--> $DIR/privacy.rs:26:
14
|
LL | foo::f() //~ ERROR `f` is private
|
^^^^^
^
|
^
error: aborting due to previous error
...
...
src/test/ui/import.stderr
浏览文件 @
acdbd064
...
...
@@ -11,10 +11,10 @@ LL | use foo; //~ ERROR unresolved import `foo` [E0432]
| ^^^ no `foo` in the root
error[E0603]: unresolved item `foo` is private
--> $DIR/import.rs:23:
5
--> $DIR/import.rs:23:
10
|
LL | zed::foo(); //~ ERROR `foo` is private
|
^^^^^
^^^
|
^^^
error: aborting due to 3 previous errors
...
...
src/test/ui/imports/reexports.stderr
浏览文件 @
acdbd064
...
...
@@ -17,16 +17,16 @@ LL | pub use super::*; //~ ERROR must import something with the glob's v
| ^^^^^^^^
error[E0603]: module `foo` is private
--> $DIR/reexports.rs:38:
9
--> $DIR/reexports.rs:38:
15
|
LL | use b::a::foo::S; //~ ERROR `foo`
|
^^^^^^^^^
^^^
|
^^^
error[E0603]: module `foo` is private
--> $DIR/reexports.rs:39:
9
--> $DIR/reexports.rs:39:
15
|
LL | use b::b::foo::S as T; //~ ERROR `foo`
|
^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to 4 previous errors
...
...
src/test/ui/issues/issue-10545.stderr
浏览文件 @
acdbd064
error[E0603]: struct `S` is private
--> $DIR/issue-10545.rs:17:1
1
--> $DIR/issue-10545.rs:17:1
4
|
LL | fn foo(_: a::S) { //~ ERROR: struct `S` is private
|
^^^
^
|
^
error: aborting due to previous error
...
...
src/test/ui/issues/issue-11593.stderr
浏览文件 @
acdbd064
error[E0603]: trait `Foo` is private
--> $DIR/issue-11593.rs:17:
6
--> $DIR/issue-11593.rs:17:
24
|
LL | impl private_trait_xc::Foo for Bar {}
|
^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to previous error
...
...
src/test/ui/issues/issue-11680.stderr
浏览文件 @
acdbd064
error[E0603]: enum `Foo` is private
--> $DIR/issue-11680.rs:16:
14
--> $DIR/issue-11680.rs:16:
21
|
LL | let _b = other::Foo::Bar(1);
|
^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: enum `Foo` is private
--> $DIR/issue-11680.rs:19:
14
--> $DIR/issue-11680.rs:19:
27
|
LL | let _b = other::test::Foo::Bar(1);
|
^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/issues/issue-13407.stderr
浏览文件 @
acdbd064
error[E0603]: unit struct `C` is private
--> $DIR/issue-13407.rs:16:
5
--> $DIR/issue-13407.rs:16:
8
|
LL | A::C = 1;
|
^^^
^
|
^
error[E0308]: mismatched types
--> $DIR/issue-13407.rs:16:12
...
...
src/test/ui/issues/issue-13641.stderr
浏览文件 @
acdbd064
error[E0603]: struct `Foo` is private
--> $DIR/issue-13641.rs:19:
5
--> $DIR/issue-13641.rs:19:
8
|
LL | a::Foo::new();
|
^^^^^^^^
^^^
|
^^^
error[E0603]: enum `Bar` is private
--> $DIR/issue-13641.rs:21:
5
--> $DIR/issue-13641.rs:21:
8
|
LL | a::Bar::new();
|
^^^^^^^^
^^^
|
^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/issues/issue-16725.stderr
浏览文件 @
acdbd064
error[E0603]: function `bar` is private
--> $DIR/issue-16725.rs:16:1
4
--> $DIR/issue-16725.rs:16:1
9
|
LL | unsafe { foo::bar(); }
|
^^^^^
^^^
|
^^^
error: aborting due to previous error
...
...
src/test/ui/issues/issue-17718-const-privacy.stderr
浏览文件 @
acdbd064
error[E0603]: constant `B` is private
--> $DIR/issue-17718-const-privacy.rs:15:
5
--> $DIR/issue-17718-const-privacy.rs:15:
8
|
LL | use a::B; //~ ERROR: constant `B` is private
|
^^^
^
|
^
error[E0603]: constant `BAR` is private
--> $DIR/issue-17718-const-privacy.rs:18:5
...
...
src/test/ui/issues/issue-28388-2.stderr
浏览文件 @
acdbd064
error[E0603]: module `n` is private
--> $DIR/issue-28388-2.rs:17:
5
--> $DIR/issue-28388-2.rs:17:
8
|
LL | use m::n::{};
|
^^^^^^^
^
|
^
error: aborting due to previous error
...
...
src/test/ui/issues/issue-29161.stderr
浏览文件 @
acdbd064
...
...
@@ -5,10 +5,10 @@ LL | pub fn default() -> A { //~ ERROR unnecessary visibility qualifier
| ^^^ `pub` not permitted here because it's implied
error[E0603]: struct `A` is private
--> $DIR/issue-29161.rs:23:
5
--> $DIR/issue-29161.rs:23:
8
|
LL | a::A::default();
|
^^^^^^^^^^^^
^
|
^
error: aborting due to 2 previous errors
...
...
src/test/ui/issues/issue-38857.stderr
浏览文件 @
acdbd064
...
...
@@ -5,10 +5,10 @@ LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!()
| ^^^ Could not find `imp` in `sys`
error[E0603]: module `sys` is private
--> $DIR/issue-38857.rs:12:1
3
--> $DIR/issue-38857.rs:12:1
8
|
LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/issues/issue-3993.stderr
浏览文件 @
acdbd064
error[E0603]: function `fly` is private
--> $DIR/issue-3993.rs:11:
5
--> $DIR/issue-3993.rs:11:
10
|
LL | use zoo::fly; //~ ERROR: function `fly` is private
|
^^^^^
^^^
|
^^^
error: aborting due to previous error
...
...
src/test/ui/macros/macro-local-data-key-priv.stderr
浏览文件 @
acdbd064
error[E0603]: constant `baz` is private
--> $DIR/macro-local-data-key-priv.rs:18:
5
--> $DIR/macro-local-data-key-priv.rs:18:
10
|
LL | bar::baz.with(|_| ());
|
^^^^^
^^^
|
^^^
error: aborting due to previous error
...
...
src/test/ui/privacy/privacy-in-paths.stderr
浏览文件 @
acdbd064
error[E0603]: module `bar` is private
--> $DIR/privacy-in-paths.rs:34:
9
--> $DIR/privacy-in-paths.rs:34:
16
|
LL | ::foo::bar::baz::f(); //~ERROR module `bar` is private
|
^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `bar` is private
--> $DIR/privacy-in-paths.rs:35:
9
--> $DIR/privacy-in-paths.rs:35:
16
|
LL | ::foo::bar::S::f(); //~ERROR module `bar` is private
|
^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: trait `T` is private
--> $DIR/privacy-in-paths.rs:36:
9
--> $DIR/privacy-in-paths.rs:36:
23
|
LL | <() as ::foo::T>::Assoc::f(); //~ERROR trait `T` is private
|
^^^^^^^^^^^^^^^^^^^^^^^^^
^
|
^
error: aborting due to 3 previous errors
...
...
src/test/ui/privacy/privacy-ns2.stderr
浏览文件 @
acdbd064
...
...
@@ -55,16 +55,16 @@ LL | use foo3::Bar;
|
error[E0603]: trait `Bar` is private
--> $DIR/privacy-ns2.rs:70:
9
--> $DIR/privacy-ns2.rs:70:
15
|
LL | use foo3::Bar; //~ ERROR `Bar` is private
|
^^^^^^
^^^
|
^^^
error[E0603]: trait `Bar` is private
--> $DIR/privacy-ns2.rs:74:
9
--> $DIR/privacy-ns2.rs:74:
15
|
LL | use foo3::Bar; //~ ERROR `Bar` is private
|
^^^^^^
^^^
|
^^^
error[E0603]: trait `Bar` is private
--> $DIR/privacy-ns2.rs:81:16
...
...
src/test/ui/privacy/privacy-ufcs.stderr
浏览文件 @
acdbd064
error[E0603]: trait `Bar` is private
--> $DIR/privacy-ufcs.rs:22:
5
--> $DIR/privacy-ufcs.rs:22:
20
|
LL | <i32 as ::foo::Bar>::baz(); //~ERROR trait `Bar` is private
|
^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to previous error
...
...
src/test/ui/privacy/privacy1.rs
浏览文件 @
acdbd064
...
...
@@ -127,7 +127,6 @@ fn test() {
fn
test2
()
{
use
bar
::
baz
::{
foo
,
bar
};
//~^ ERROR: module `baz` is private
//~| ERROR: module `baz` is private
foo
();
bar
();
...
...
src/test/ui/privacy/privacy1.stderr
浏览文件 @
acdbd064
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:128:
24
--> $DIR/privacy1.rs:128:
18
|
LL | use bar::baz::{foo, bar};
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:128:29
|
LL | use bar::baz::{foo, bar};
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:137:13
--> $DIR/privacy1.rs:136:18
|
LL | use bar::baz;
|
^^^^^
^^^
|
^^^
error[E0603]: module `i` is private
--> $DIR/privacy1.rs:16
1:9
--> $DIR/privacy1.rs:16
0:20
|
LL | use self::foo::i::A; //~ ERROR: module `i` is private
|
^^^^^^^^^^^^^^
^
|
^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:100:
9
--> $DIR/privacy1.rs:100:
16
|
LL | ::bar::baz::A::foo(); //~ ERROR: module `baz` is private
|
^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:101:
9
--> $DIR/privacy1.rs:101:
16
|
LL | ::bar::baz::A::bar(); //~ ERROR: module `baz` is private
|
^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:103:
9
--> $DIR/privacy1.rs:103:
16
|
LL | ::bar::baz::A.foo2(); //~ ERROR: module `baz` is private
|
^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:104:
9
--> $DIR/privacy1.rs:104:
16
|
LL | ::bar::baz::A.bar2(); //~ ERROR: module `baz` is private
|
^^^^^^^^^^
^^^
|
^^^
error[E0603]: trait `B` is private
--> $DIR/privacy1.rs:108:
9
--> $DIR/privacy1.rs:108:
16
|
LL | ::bar::B::foo(); //~ ERROR: trait `B` is private
|
^^^^^^^^^^^^
^
|
^
error[E0603]: function `epriv` is private
--> $DIR/privacy1.rs:114:
13
--> $DIR/privacy1.rs:114:
20
|
LL | ::bar::epriv(); //~ ERROR: function `epriv` is private
|
^^^^^^^
^^^^^
|
^^^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:123:
9
--> $DIR/privacy1.rs:123:
16
|
LL | ::bar::baz::foo(); //~ ERROR: module `baz` is private
|
^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:124:
9
--> $DIR/privacy1.rs:124:
16
|
LL | ::bar::baz::bar(); //~ ERROR: module `baz` is private
|
^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: trait `B` is private
--> $DIR/privacy1.rs:15
3:10
--> $DIR/privacy1.rs:15
2:17
|
LL | impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
|
^^^^^^^
^
|
^
error[E0624]: method `bar` is private
--> $DIR/privacy1.rs:73:9
...
...
@@ -106,7 +100,7 @@ error[E0624]: method `bar2` is private
LL | ::bar::baz::A.bar2(); //~ ERROR: module `baz` is private
| ^^^^
error: aborting due to 1
8
previous errors
error: aborting due to 1
7
previous errors
Some errors occurred: E0603, E0624.
For more information about an error, try `rustc --explain E0603`.
src/test/ui/privacy/privacy2.stderr
浏览文件 @
acdbd064
...
...
@@ -5,10 +5,10 @@ LL | use bar::foo;
| ^^^^^^^^ no `foo` in `bar`
error[E0603]: function `foo` is private
--> $DIR/privacy2.rs:33:
9
--> $DIR/privacy2.rs:33:
20
|
LL | use bar::glob::foo;
|
^^^^^^^^^^^
^^^
|
^^^
error: requires `sized` lang_item
...
...
src/test/ui/privacy/privacy4.stderr
浏览文件 @
acdbd064
error[E0603]: module `glob` is private
--> $DIR/privacy4.rs:31:
9
--> $DIR/privacy4.rs:31:
14
|
LL | use bar::glob::gpriv; //~ ERROR: module `glob` is private
|
^^^^^^^^^^^^
^^^^
|
^^^^
error: aborting due to previous error
...
...
src/test/ui/privacy/privacy5.stderr
浏览文件 @
acdbd064
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:61:1
3
--> $DIR/privacy5.rs:61:1
6
|
LL | let a = a::A(()); //~ ERROR tuple struct `A` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:62:1
3
--> $DIR/privacy5.rs:62:1
6
|
LL | let b = a::B(2); //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:63:1
3
--> $DIR/privacy5.rs:63:1
6
|
LL | let c = a::C(2, 3); //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:66:
9
--> $DIR/privacy5.rs:66:
12
|
LL | let a::A(()) = a; //~ ERROR tuple struct `A` is private
|
^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:67:
9
--> $DIR/privacy5.rs:67:
12
|
LL | let a::A(_) = a; //~ ERROR tuple struct `A` is private
|
^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:68:1
5
--> $DIR/privacy5.rs:68:1
8
|
LL | match a { a::A(()) => {} } //~ ERROR tuple struct `A` is private
|
^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:69:1
5
--> $DIR/privacy5.rs:69:1
8
|
LL | match a { a::A(_) => {} } //~ ERROR tuple struct `A` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:71:
9
--> $DIR/privacy5.rs:71:
12
|
LL | let a::B(_) = b; //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:72:
9
--> $DIR/privacy5.rs:72:
12
|
LL | let a::B(_b) = b; //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:73:1
5
--> $DIR/privacy5.rs:73:1
8
|
LL | match b { a::B(_) => {} } //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:74:1
5
--> $DIR/privacy5.rs:74:1
8
|
LL | match b { a::B(_b) => {} } //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:75:1
5
--> $DIR/privacy5.rs:75:1
8
|
LL | match b { a::B(1) => {} a::B(_) => {} } //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:75:
29
--> $DIR/privacy5.rs:75:
32
|
LL | match b { a::B(1) => {} a::B(_) => {} } //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:78:
9
--> $DIR/privacy5.rs:78:
12
|
LL | let a::C(_, _) = c; //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:79:
9
--> $DIR/privacy5.rs:79:
12
|
LL | let a::C(_a, _) = c; //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:80:
9
--> $DIR/privacy5.rs:80:
12
|
LL | let a::C(_, _b) = c; //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:81:
9
--> $DIR/privacy5.rs:81:
12
|
LL | let a::C(_a, _b) = c; //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:82:1
5
--> $DIR/privacy5.rs:82:1
8
|
LL | match c { a::C(_, _) => {} } //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:83:1
5
--> $DIR/privacy5.rs:83:1
8
|
LL | match c { a::C(_a, _) => {} } //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:84:1
5
--> $DIR/privacy5.rs:84:1
8
|
LL | match c { a::C(_, _b) => {} } //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:85:1
5
--> $DIR/privacy5.rs:85:1
8
|
LL | match c { a::C(_a, _b) => {} } //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:93:1
4
--> $DIR/privacy5.rs:93:1
7
|
LL | let a2 = a::A; //~ ERROR tuple struct `A` is private
|
^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:94:1
4
--> $DIR/privacy5.rs:94:1
7
|
LL | let b2 = a::B; //~ ERROR tuple struct `B` is private
|
^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:95:1
4
--> $DIR/privacy5.rs:95:1
7
|
LL | let c2 = a::C; //~ ERROR tuple struct `C` is private
|
^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:100:
13
--> $DIR/privacy5.rs:100:
20
|
LL | let a = other::A(()); //~ ERROR tuple struct `A` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:101:
13
--> $DIR/privacy5.rs:101:
20
|
LL | let b = other::B(2); //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:102:
13
--> $DIR/privacy5.rs:102:
20
|
LL | let c = other::C(2, 3); //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:105:
9
--> $DIR/privacy5.rs:105:
16
|
LL | let other::A(()) = a; //~ ERROR tuple struct `A` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:106:
9
--> $DIR/privacy5.rs:106:
16
|
LL | let other::A(_) = a; //~ ERROR tuple struct `A` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:107:
15
--> $DIR/privacy5.rs:107:
22
|
LL | match a { other::A(()) => {} } //~ ERROR tuple struct `A` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:108:
15
--> $DIR/privacy5.rs:108:
22
|
LL | match a { other::A(_) => {} } //~ ERROR tuple struct `A` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:110:
9
--> $DIR/privacy5.rs:110:
16
|
LL | let other::B(_) = b; //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:111:
9
--> $DIR/privacy5.rs:111:
16
|
LL | let other::B(_b) = b; //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:112:
15
--> $DIR/privacy5.rs:112:
22
|
LL | match b { other::B(_) => {} } //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:113:
15
--> $DIR/privacy5.rs:113:
22
|
LL | match b { other::B(_b) => {} } //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:114:
15
--> $DIR/privacy5.rs:114:
22
|
LL | match b { other::B(1) => {} other::B(_) => {} } //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:114:
33
--> $DIR/privacy5.rs:114:
40
|
LL | match b { other::B(1) => {} other::B(_) => {} } //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:117:
9
--> $DIR/privacy5.rs:117:
16
|
LL | let other::C(_, _) = c; //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:118:
9
--> $DIR/privacy5.rs:118:
16
|
LL | let other::C(_a, _) = c; //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:119:
9
--> $DIR/privacy5.rs:119:
16
|
LL | let other::C(_, _b) = c; //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:120:
9
--> $DIR/privacy5.rs:120:
16
|
LL | let other::C(_a, _b) = c; //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:121:
15
--> $DIR/privacy5.rs:121:
22
|
LL | match c { other::C(_, _) => {} } //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:122:
15
--> $DIR/privacy5.rs:122:
22
|
LL | match c { other::C(_a, _) => {} } //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:123:
15
--> $DIR/privacy5.rs:123:
22
|
LL | match c { other::C(_, _b) => {} } //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:124:
15
--> $DIR/privacy5.rs:124:
22
|
LL | match c { other::C(_a, _b) => {} } //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `A` is private
--> $DIR/privacy5.rs:132:
14
--> $DIR/privacy5.rs:132:
21
|
LL | let a2 = other::A; //~ ERROR tuple struct `A` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `B` is private
--> $DIR/privacy5.rs:133:
14
--> $DIR/privacy5.rs:133:
21
|
LL | let b2 = other::B; //~ ERROR tuple struct `B` is private
|
^^^^^^^
^
|
^
error[E0603]: tuple struct `C` is private
--> $DIR/privacy5.rs:134:
14
--> $DIR/privacy5.rs:134:
21
|
LL | let c2 = other::C; //~ ERROR tuple struct `C` is private
|
^^^^^^^
^
|
^
error: aborting due to 48 previous errors
...
...
src/test/ui/privacy/private-item-simple.stderr
浏览文件 @
acdbd064
error[E0603]: function `f` is private
--> $DIR/private-item-simple.rs:16:
5
--> $DIR/private-item-simple.rs:16:
8
|
LL | a::f(); //~ ERROR function `f` is private
|
^^^
^
|
^
error: aborting due to previous error
...
...
src/test/ui/privacy/restricted/test.stderr
浏览文件 @
acdbd064
...
...
@@ -23,16 +23,16 @@ LL | pub(super) use foo::bar::f as g; //~ ERROR cannot be re-exported
| ^^^^^^^^^^^^^^^^
error[E0603]: struct `Crate` is private
--> $DIR/test.rs:48:
9
--> $DIR/test.rs:48:
25
|
LL | use pub_restricted::Crate; //~ ERROR private
|
^^^^^^^^^^^^^^^^
^^^^^
|
^^^^^
error[E0603]: function `f` is private
--> $DIR/test.rs:40:9
--> $DIR/test.rs:40:
1
9
|
LL | use foo::bar::f; //~ ERROR private
|
^^^^^^^^^^
^
|
^
error[E0616]: field `x` of struct `foo::bar::S` is private
--> $DIR/test.rs:41:5
...
...
src/test/ui/resolve/privacy-enum-ctor.stderr
浏览文件 @
acdbd064
...
...
@@ -132,28 +132,28 @@ LL | use m::n::Z;
|
error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:67:
16
--> $DIR/privacy-enum-ctor.rs:67:
22
|
LL | let _: Z = m::n::Z;
|
^^^^^^
^
|
^
error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:71:
16
--> $DIR/privacy-enum-ctor.rs:71:
22
|
LL | let _: Z = m::n::Z::Fn;
|
^^^^^^^^^^
^
|
^
error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:74:
16
--> $DIR/privacy-enum-ctor.rs:74:
22
|
LL | let _: Z = m::n::Z::Struct;
|
^^^^^^^^^^^^^^
^
|
^
error[E0603]: enum `Z` is private
--> $DIR/privacy-enum-ctor.rs:78:
16
--> $DIR/privacy-enum-ctor.rs:78:
22
|
LL | let _: Z = m::n::Z::Unit {};
|
^^^^^^^^^^^^
^
|
^
error[E0308]: mismatched types
--> $DIR/privacy-enum-ctor.rs:37:20
...
...
src/test/ui/resolve/privacy-struct-ctor.stderr
浏览文件 @
acdbd064
...
...
@@ -38,40 +38,40 @@ LL | use m::S;
|
error[E0603]: tuple struct `Z` is private
--> $DIR/privacy-struct-ctor.rs:28:
9
--> $DIR/privacy-struct-ctor.rs:28:
12
|
LL | n::Z;
|
^^^
^
|
^
error[E0603]: tuple struct `S` is private
--> $DIR/privacy-struct-ctor.rs:39:
5
--> $DIR/privacy-struct-ctor.rs:39:
8
|
LL | m::S;
|
^^^
^
|
^
error[E0603]: tuple struct `S` is private
--> $DIR/privacy-struct-ctor.rs:41:1
6
--> $DIR/privacy-struct-ctor.rs:41:1
9
|
LL | let _: S = m::S(2);
|
^^^
^
|
^
error[E0603]: tuple struct `Z` is private
--> $DIR/privacy-struct-ctor.rs:45:
5
--> $DIR/privacy-struct-ctor.rs:45:
11
|
LL | m::n::Z;
|
^^^^^^
^
|
^
error[E0603]: tuple struct `S` is private
--> $DIR/privacy-struct-ctor.rs:51:
5
--> $DIR/privacy-struct-ctor.rs:51:
16
|
LL | xcrate::m::S;
|
^^^^^^^^^^^
^
|
^
error[E0603]: tuple struct `Z` is private
--> $DIR/privacy-struct-ctor.rs:55:
5
--> $DIR/privacy-struct-ctor.rs:55:
19
|
LL | xcrate::m::n::Z;
|
^^^^^^^^^^^^^^
^
|
^
error: aborting due to 10 previous errors
...
...
src/test/ui/rfc-2008-non-exhaustive/structs.stderr
浏览文件 @
acdbd064
...
...
@@ -11,16 +11,16 @@ LL | let us = UnitStruct;
| ^^^^^^^^^^ constructor is not visible here due to private fields
error[E0603]: tuple struct `TupleStruct` is private
--> $DIR/structs.rs:33:
23
--> $DIR/structs.rs:33:
32
|
LL | let ts_explicit = structs::TupleStruct(640, 480);
|
^^^^^^^^^
^^^^^^^^^^^
|
^^^^^^^^^^^
error[E0603]: unit struct `UnitStruct` is private
--> $DIR/structs.rs:42:
23
--> $DIR/structs.rs:42:
32
|
LL | let us_explicit = structs::UnitStruct;
|
^^^^^^^^^
^^^^^^^^^^
|
^^^^^^^^^^
error[E0639]: cannot create non-exhaustive struct using struct expression
--> $DIR/structs.rs:17:14
...
...
src/test/ui/shadowed/shadowed-use-visibility.stderr
浏览文件 @
acdbd064
error[E0603]: module `bar` is private
--> $DIR/shadowed-use-visibility.rs:19:
9
--> $DIR/shadowed-use-visibility.rs:19:
14
|
LL | use foo::bar::f as g; //~ ERROR module `bar` is private
|
^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `f` is private
--> $DIR/shadowed-use-visibility.rs:25:
5
--> $DIR/shadowed-use-visibility.rs:25:
10
|
LL | use bar::f::f; //~ ERROR module `f` is private
|
^^^^^^^^
^
|
^
error: aborting due to 2 previous errors
...
...
src/test/ui/static/static-priv-by-default2.stderr
浏览文件 @
acdbd064
error[E0603]: static `private` is private
--> $DIR/static-priv-by-default2.rs:25:
9
--> $DIR/static-priv-by-default2.rs:25:
30
|
LL | use child::childs_child::private;
|
^^^^^^^^^^^^^^^^^^^^^
^^^^^^^
|
^^^^^^^
error[E0603]: static `private` is private
--> $DIR/static-priv-by-default2.rs:33:
9
--> $DIR/static-priv-by-default2.rs:33:
33
|
LL | use static_priv_by_default::private;
|
^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^
|
^^^^^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/structs/struct-variant-privacy-xc.stderr
浏览文件 @
acdbd064
error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy-xc.rs:14:
9
--> $DIR/struct-variant-privacy-xc.rs:14:
33
|
LL | fn f(b: struct_variant_privacy::Bar) { //~ ERROR enum `Bar` is private
|
^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy-xc.rs:16:
9
--> $DIR/struct-variant-privacy-xc.rs:16:
33
|
LL | struct_variant_privacy::Bar::Baz { a: _a } => {} //~ ERROR enum `Bar` is private
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/structs/struct-variant-privacy.stderr
浏览文件 @
acdbd064
error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy.rs:16:
9
--> $DIR/struct-variant-privacy.rs:16:
14
|
LL | fn f(b: foo::Bar) { //~ ERROR enum `Bar` is private
|
^^^^^
^^^
|
^^^
error[E0603]: enum `Bar` is private
--> $DIR/struct-variant-privacy.rs:18:
9
--> $DIR/struct-variant-privacy.rs:18:
14
|
LL | foo::Bar::Baz { a: _a } => {} //~ ERROR enum `Bar` is private
|
^^^^^^^^^^
^^^
|
^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/unreachable/unreachable-variant.stderr
浏览文件 @
acdbd064
error[E0603]: module `super_sekrit` is private
--> $DIR/unreachable-variant.rs:16:
14
--> $DIR/unreachable-variant.rs:16:
21
|
LL | let _x = other::super_sekrit::sooper_sekrit::baz; //~ ERROR is private
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^
|
^^^^^^^^^^^^
error: aborting due to previous error
...
...
src/test/ui/use/use-from-trait-xc.stderr
浏览文件 @
acdbd064
...
...
@@ -41,16 +41,16 @@ LL | use use_from_trait_xc::Baz::new as baznew;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `new` in `Baz`
error[E0603]: struct `Foo` is private
--> $DIR/use-from-trait-xc.rs:24:
5
--> $DIR/use-from-trait-xc.rs:24:
24
|
LL | use use_from_trait_xc::Foo::new; //~ ERROR struct `Foo` is private
|
^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: struct `Foo` is private
--> $DIR/use-from-trait-xc.rs:27:
5
--> $DIR/use-from-trait-xc.rs:27:
24
|
LL | use use_from_trait_xc::Foo::C; //~ ERROR struct `Foo` is private
|
^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to 9 previous errors
...
...
src/test/ui/use/use-mod/use-mod-3.rs
浏览文件 @
acdbd064
...
...
@@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use
foo
::
bar
::{
self
//~ ERROR module `bar` is private
use
foo
::
bar
::{
//~ ERROR module `bar` is private
self
};
use
foo
::
bar
::{
Bar
//~ ERROR module `bar` is private
use
foo
::
bar
::{
//~ ERROR module `bar` is private
Bar
};
mod
foo
{
...
...
src/test/ui/use/use-mod/use-mod-3.stderr
浏览文件 @
acdbd064
error[E0603]: module `bar` is private
--> $DIR/use-mod-3.rs:1
2:5
--> $DIR/use-mod-3.rs:1
1:10
|
LL |
self
//~ ERROR module `bar` is private
|
^
^^^
LL |
use foo::bar::{
//~ ERROR module `bar` is private
|
^^^
error[E0603]: module `bar` is private
--> $DIR/use-mod-3.rs:1
5:5
--> $DIR/use-mod-3.rs:1
4:10
|
LL |
Bar
//~ ERROR module `bar` is private
LL |
use foo::bar::{
//~ ERROR module `bar` is private
| ^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/xcrate/xcrate-private-by-default.stderr
浏览文件 @
acdbd064
error[E0603]: static `j` is private
--> $DIR/xcrate-private-by-default.rs:33:
5
--> $DIR/xcrate-private-by-default.rs:33:
29
|
LL | static_priv_by_default::j;
|
^^^^^^^^^^^^^^^^^^^^^^^^
^
|
^
error[E0603]: function `k` is private
--> $DIR/xcrate-private-by-default.rs:35:
5
--> $DIR/xcrate-private-by-default.rs:35:
29
|
LL | static_priv_by_default::k;
|
^^^^^^^^^^^^^^^^^^^^^^^^
^
|
^
error[E0603]: unit struct `l` is private
--> $DIR/xcrate-private-by-default.rs:37:
5
--> $DIR/xcrate-private-by-default.rs:37:
29
|
LL | static_priv_by_default::l;
|
^^^^^^^^^^^^^^^^^^^^^^^^
^
|
^
error[E0603]: enum `m` is private
--> $DIR/xcrate-private-by-default.rs:39:
11
--> $DIR/xcrate-private-by-default.rs:39:
35
|
LL | foo::<static_priv_by_default::m>();
|
^^^^^^^^^^^^^^^^^^^^^^^^
^
|
^
error[E0603]: type alias `n` is private
--> $DIR/xcrate-private-by-default.rs:41:
11
--> $DIR/xcrate-private-by-default.rs:41:
35
|
LL | foo::<static_priv_by_default::n>();
|
^^^^^^^^^^^^^^^^^^^^^^^^
^
|
^
error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:45:
5
--> $DIR/xcrate-private-by-default.rs:45:
29
|
LL | static_priv_by_default::foo::a;
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:47:
5
--> $DIR/xcrate-private-by-default.rs:47:
29
|
LL | static_priv_by_default::foo::b;
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:49:
5
--> $DIR/xcrate-private-by-default.rs:49:
29
|
LL | static_priv_by_default::foo::c;
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:51:
11
--> $DIR/xcrate-private-by-default.rs:51:
35
|
LL | foo::<static_priv_by_default::foo::d>();
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:53:
11
--> $DIR/xcrate-private-by-default.rs:53:
35
|
LL | foo::<static_priv_by_default::foo::e>();
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
|
^^^
error: aborting due to 10 previous errors
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录