summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/private-in-public-assoc-ty.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/privacy/private-in-public-assoc-ty.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/privacy/private-in-public-assoc-ty.stderr')
-rw-r--r--tests/ui/privacy/private-in-public-assoc-ty.stderr68
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/ui/privacy/private-in-public-assoc-ty.stderr b/tests/ui/privacy/private-in-public-assoc-ty.stderr
new file mode 100644
index 000000000..a59027d81
--- /dev/null
+++ b/tests/ui/privacy/private-in-public-assoc-ty.stderr
@@ -0,0 +1,68 @@
+error[E0446]: private type `Priv` in public interface
+ --> $DIR/private-in-public-assoc-ty.rs:17:9
+ |
+LL | struct Priv;
+ | ----------- `Priv` declared as private
+...
+LL | type A = Priv;
+ | ^^^^^^ can't leak private type
+
+warning: private trait `PrivTr` in public interface (error E0445)
+ --> $DIR/private-in-public-assoc-ty.rs:24:9
+ |
+LL | type Alias1: PrivTr;
+ | ^^^^^^^^^^^^^^^^^^^
+ |
+ = 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>
+ = note: `#[warn(private_in_public)]` on by default
+
+warning: private type `Priv` in public interface (error E0446)
+ --> $DIR/private-in-public-assoc-ty.rs:27:9
+ |
+LL | type Alias2: PubTrAux1<Priv> = u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = 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 `Priv` in public interface (error E0446)
+ --> $DIR/private-in-public-assoc-ty.rs:30:9
+ |
+LL | type Alias3: PubTrAux2<A = Priv> = u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = 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 `Priv` in public interface
+ --> $DIR/private-in-public-assoc-ty.rs:34:9
+ |
+LL | struct Priv;
+ | ----------- `Priv` declared as private
+...
+LL | type Alias4 = Priv;
+ | ^^^^^^^^^^^ can't leak private type
+
+error[E0446]: private type `Priv` in public interface
+ --> $DIR/private-in-public-assoc-ty.rs:41:9
+ |
+LL | struct Priv;
+ | ----------- `Priv` declared as private
+...
+LL | type Alias1 = Priv;
+ | ^^^^^^^^^^^ can't leak private type
+
+error[E0445]: private trait `PrivTr` in public interface
+ --> $DIR/private-in-public-assoc-ty.rs:44:9
+ |
+LL | trait PrivTr {}
+ | ------------ `PrivTr` declared as private
+...
+LL | type Exist = impl PrivTr;
+ | ^^^^^^^^^^ can't leak private trait
+
+error: aborting due to 4 previous errors; 3 warnings emitted
+
+Some errors have detailed explanations: E0445, E0446.
+For more information about an error, try `rustc --explain E0445`.