about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-06-15 15:47:38 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-06-15 21:25:47 +0300
commitd326aed46f6fdc741fe78f29c948a4c358150094 (patch)
tree8f2ef09ea3e38baad6f609d7199153184dd1bf69 /tests/ui/error-codes
parentf9097f87c9c094f80826fb60a1a624b5f9f1ed82 (diff)
downloadrust-d326aed46f6fdc741fe78f29c948a4c358150094.tar.gz
rust-d326aed46f6fdc741fe78f29c948a4c358150094.zip
privacy: Feature gate new type privacy lints
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0445.rs1
-rw-r--r--tests/ui/error-codes/E0445.stderr20
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 {
    | ^^^^^^^^^