diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-29 05:48:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-29 05:48:39 +0200 |
| commit | 42a495da7ec634a6e904732ae747f448a52beb3b (patch) | |
| tree | 63e6a2d964c82b0780428b3b89779e3bdc756e73 /tests/ui/error-codes | |
| parent | 75726cae37317c7262b69d3e9fd11a3496a88d04 (diff) | |
| parent | 98a86ffc9ffbbd8a94ba219b9cddc3d20ba23f4d (diff) | |
| download | rust-42a495da7ec634a6e904732ae747f448a52beb3b.tar.gz rust-42a495da7ec634a6e904732ae747f448a52beb3b.zip | |
Rollup merge of #112670 - petrochenkov:typriv, r=eholk
privacy: Type privacy lints fixes and cleanups See individual commits. Follow up to https://github.com/rust-lang/rust/pull/111801.
Diffstat (limited to 'tests/ui/error-codes')
| -rw-r--r-- | tests/ui/error-codes/E0445.rs | 1 | ||||
| -rw-r--r-- | tests/ui/error-codes/E0445.stderr | 20 |
2 files changed, 11 insertions, 10 deletions
diff --git a/tests/ui/error-codes/E0445.rs b/tests/ui/error-codes/E0445.rs index f5f35fb8a4d..30c222ae6f2 100644 --- a/tests/ui/error-codes/E0445.rs +++ b/tests/ui/error-codes/E0445.rs @@ -1,3 +1,4 @@ +#![feature(type_privacy_lints)] #[warn(private_bounds)] #[warn(private_interfaces)] diff --git a/tests/ui/error-codes/E0445.stderr b/tests/ui/error-codes/E0445.stderr index ac3637a8218..ba2c21485ef 100644 --- a/tests/ui/error-codes/E0445.stderr +++ b/tests/ui/error-codes/E0445.stderr @@ -1,5 +1,5 @@ error[E0445]: private trait `Foo` in public interface - --> $DIR/E0445.rs:12:1 + --> $DIR/E0445.rs:13:1 | LL | trait Foo { | --------- `Foo` declared as private @@ -10,23 +10,23 @@ LL | pub trait Bar : Foo {} warning: trait `Foo` is more private than the item `Bar` | note: trait `Bar` is reachable at visibility `pub` - --> $DIR/E0445.rs:12:1 + --> $DIR/E0445.rs:13:1 | LL | pub trait Bar : Foo {} | ^^^^^^^^^^^^^^^^^^^ note: but trait `Foo` is only usable at visibility `pub(crate)` - --> $DIR/E0445.rs:8:1 + --> $DIR/E0445.rs:9:1 | LL | trait Foo { | ^^^^^^^^^ note: the lint level is defined here - --> $DIR/E0445.rs:1:8 + --> $DIR/E0445.rs:2:8 | LL | #[warn(private_bounds)] | ^^^^^^^^^^^^^^ error[E0445]: private trait `Foo` in public interface - --> $DIR/E0445.rs:14:1 + --> $DIR/E0445.rs:15:1 | LL | trait Foo { | --------- `Foo` declared as private @@ -37,18 +37,18 @@ LL | pub struct Bar2<T: Foo>(pub T); warning: trait `Foo` is more private than the item `Bar2` | note: struct `Bar2` is reachable at visibility `pub` - --> $DIR/E0445.rs:14:1 + --> $DIR/E0445.rs:15:1 | LL | pub struct Bar2<T: Foo>(pub T); | ^^^^^^^^^^^^^^^^^^^^^^^ note: but trait `Foo` is only usable at visibility `pub(crate)` - --> $DIR/E0445.rs:8:1 + --> $DIR/E0445.rs:9:1 | LL | trait Foo { | ^^^^^^^^^ error[E0445]: private trait `Foo` in public interface - --> $DIR/E0445.rs:16:1 + --> $DIR/E0445.rs:17:1 | LL | trait Foo { | --------- `Foo` declared as private @@ -59,12 +59,12 @@ LL | pub fn foo<T: Foo> (t: T) {} warning: trait `Foo` is more private than the item `foo` | note: function `foo` is reachable at visibility `pub` - --> $DIR/E0445.rs:16:1 + --> $DIR/E0445.rs:17:1 | LL | pub fn foo<T: Foo> (t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: but trait `Foo` is only usable at visibility `pub(crate)` - --> $DIR/E0445.rs:8:1 + --> $DIR/E0445.rs:9:1 | LL | trait Foo { | ^^^^^^^^^ |
