summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0446.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/error-codes/E0446.stderr23
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/ui/error-codes/E0446.stderr b/tests/ui/error-codes/E0446.stderr
index b6a195c40..2951e69d1 100644
--- a/tests/ui/error-codes/E0446.stderr
+++ b/tests/ui/error-codes/E0446.stderr
@@ -1,12 +1,21 @@
error[E0446]: private type `Bar` in public interface
- --> $DIR/E0446.rs:4:5
+ --> $DIR/E0446.rs:10:5
|
-LL | struct Bar(u32);
- | ---------- `Bar` declared as private
-LL |
-LL | pub fn bar() -> Bar {
- | ^^^^^^^^^^^^^^^^^^^ can't leak private type
+LL | struct Bar;
+ | ---------- `Bar` declared as private
+...
+LL | type Alias1 = Bar;
+ | ^^^^^^^^^^^ can't leak private type
-error: aborting due to previous error
+error[E0446]: private trait `PrivTr` in public interface
+ --> $DIR/E0446.rs:11:5
+ |
+LL | trait PrivTr {}
+ | ------------ `PrivTr` declared as private
+...
+LL | type Alias2 = Box<dyn PrivTr>;
+ | ^^^^^^^^^^^ can't leak private trait
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0446`.