rust/src/test/ui/privacy/privacy1.stderr
Michael Hewson 153f5a7892 Stabilize Rc, Arc and Pin as method receivers
This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use.

This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled.

This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.
2018-12-20 01:14:01 -05:00

107 lines
2.9 KiB
Plaintext

error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:142:18
|
LL | use bar::baz::{foo, bar};
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:150:18
|
LL | use bar::baz;
| ^^^
error[E0603]: module `i` is private
--> $DIR/privacy1.rs:174:20
|
LL | use self::foo::i::A; //~ ERROR: module `i` is private
| ^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:114:16
|
LL | ::bar::baz::A::foo(); //~ ERROR: module `baz` is private
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:115:16
|
LL | ::bar::baz::A::bar(); //~ ERROR: module `baz` is private
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:117:16
|
LL | ::bar::baz::A.foo2(); //~ ERROR: module `baz` is private
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:118:16
|
LL | ::bar::baz::A.bar2(); //~ ERROR: module `baz` is private
| ^^^
error[E0603]: trait `B` is private
--> $DIR/privacy1.rs:122:16
|
LL | ::bar::B::foo(); //~ ERROR: trait `B` is private
| ^
error[E0603]: function `epriv` is private
--> $DIR/privacy1.rs:128:20
|
LL | ::bar::epriv(); //~ ERROR: function `epriv` is private
| ^^^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:137:16
|
LL | ::bar::baz::foo(); //~ ERROR: module `baz` is private
| ^^^
error[E0603]: module `baz` is private
--> $DIR/privacy1.rs:138:16
|
LL | ::bar::baz::bar(); //~ ERROR: module `baz` is private
| ^^^
error[E0603]: trait `B` is private
--> $DIR/privacy1.rs:166:17
|
LL | impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
| ^
error[E0624]: method `bar` is private
--> $DIR/privacy1.rs:87:9
|
LL | self::baz::A::bar(); //~ ERROR: method `bar` is private
| ^^^^^^^^^^^^^^^^^
error[E0624]: method `bar` is private
--> $DIR/privacy1.rs:105:5
|
LL | bar::A::bar(); //~ ERROR: method `bar` is private
| ^^^^^^^^^^^
error[E0624]: method `bar` is private
--> $DIR/privacy1.rs:112:9
|
LL | ::bar::A::bar(); //~ ERROR: method `bar` is private
| ^^^^^^^^^^^^^
error[E0624]: method `bar` is private
--> $DIR/privacy1.rs:115:9
|
LL | ::bar::baz::A::bar(); //~ ERROR: module `baz` is private
| ^^^^^^^^^^^^^^^^^^
error[E0624]: method `bar2` is private
--> $DIR/privacy1.rs:118:23
|
LL | ::bar::baz::A.bar2(); //~ ERROR: module `baz` is private
| ^^^^
error: aborting due to 17 previous errors
Some errors occurred: E0603, E0624.
For more information about an error, try `rustc --explain E0603`.