diff options
Diffstat (limited to 'src/test/ui/privacy/where-priv-type.stderr')
-rw-r--r-- | src/test/ui/privacy/where-priv-type.stderr | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/test/ui/privacy/where-priv-type.stderr b/src/test/ui/privacy/where-priv-type.stderr new file mode 100644 index 000000000..7eb71346a --- /dev/null +++ b/src/test/ui/privacy/where-priv-type.stderr @@ -0,0 +1,66 @@ +warning: private type `PrivTy` in public interface (error E0446) + --> $DIR/where-priv-type.rs:19:1 + | +LL | pub struct S + | ^^^^^^^^^^^^ + | + = note: `#[warn(private_in_public)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> + +warning: private type `PrivTy` in public interface (error E0446) + --> $DIR/where-priv-type.rs:27:1 + | +LL | pub enum E + | ^^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> + +warning: private type `PrivTy` in public interface (error E0446) + --> $DIR/where-priv-type.rs:35:1 + | +LL | / pub fn f() +LL | | +LL | | +LL | | where +LL | | PrivTy: + | |___________^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> + +error[E0446]: private type `PrivTy` in public interface + --> $DIR/where-priv-type.rs:43:1 + | +LL | struct PrivTy; + | ------------- `PrivTy` declared as private +... +LL | impl S + | ^^^^^^ can't leak private type + +warning: private type `PrivTy` in public interface (error E0446) + --> $DIR/where-priv-type.rs:48:5 + | +LL | / pub fn f() +LL | | +LL | | +LL | | where +LL | | PrivTy: + | |_______________^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> + +error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface + --> $DIR/where-priv-type.rs:80:5 + | +LL | type AssocTy = Const<{ my_const_fn(U) }>; + | ^^^^^^^^^^^^ can't leak private type +... +LL | const fn my_const_fn(val: u8) -> u8 { + | ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private + +error: aborting due to 2 previous errors; 4 warnings emitted + +For more information about this error, try `rustc --explain E0446`. |