summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-18389.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/ui/issues/issue-18389.stderr
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/issues/issue-18389.stderr')
-rw-r--r--tests/ui/issues/issue-18389.stderr27
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/ui/issues/issue-18389.stderr b/tests/ui/issues/issue-18389.stderr
index 6ce78c45d..18ffc4177 100644
--- a/tests/ui/issues/issue-18389.stderr
+++ b/tests/ui/issues/issue-18389.stderr
@@ -1,16 +1,39 @@
error[E0445]: private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
- --> $DIR/issue-18389.rs:7:1
+ --> $DIR/issue-18389.rs:14:1
|
LL | trait Private<P, R> {
| ------------------- `Private<<Self as Public>::P, <Self as Public>::R>` declared as private
...
LL | / pub trait Public: Private<
LL | |
+LL | |
LL | | <Self as Public>::P,
LL | | <Self as Public>::R
LL | | > {
| |_^ can't leak private trait
-error: aborting due to previous error
+warning: trait `Private<<Self as Public>::P, <Self as Public>::R>` is more private than the item `Public`
+ --> $DIR/issue-18389.rs:14:1
+ |
+LL | / pub trait Public: Private<
+LL | |
+LL | |
+LL | | <Self as Public>::P,
+LL | | <Self as Public>::R
+LL | | > {
+ | |_^ trait `Public` is reachable at visibility `pub`
+ |
+note: but trait `Private<<Self as Public>::P, <Self as Public>::R>` is only usable at visibility `pub(crate)`
+ --> $DIR/issue-18389.rs:11:1
+ |
+LL | trait Private<P, R> {
+ | ^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+ --> $DIR/issue-18389.rs:2:9
+ |
+LL | #![warn(private_bounds)]
+ | ^^^^^^^^^^^^^^
+
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0445`.