about summary refs log tree commit diff
path: root/tests/ui/privacy
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy')
-rw-r--r--tests/ui/privacy/privacy1.rs10
-rw-r--r--tests/ui/privacy/privacy1.stderr62
-rw-r--r--tests/ui/privacy/privacy4.rs4
-rw-r--r--tests/ui/privacy/privacy4.stderr4
4 files changed, 44 insertions, 36 deletions
diff --git a/tests/ui/privacy/privacy1.rs b/tests/ui/privacy/privacy1.rs
index 6cd12b80782..16aacd81289 100644
--- a/tests/ui/privacy/privacy1.rs
+++ b/tests/ui/privacy/privacy1.rs
@@ -1,8 +1,14 @@
 #![feature(lang_items, no_core)]
 #![no_core] // makes debugging this test *a lot* easier (during resolve)
 
-#[lang="sized"]
-pub trait Sized {}
+#[lang = "sized"]
+pub trait Sized: MetaSized {}
+
+#[lang = "meta_sized"]
+pub trait MetaSized: PointeeSized {}
+
+#[lang = "pointee_sized"]
+pub trait PointeeSized {}
 
 #[lang="copy"]
 pub trait Copy {}
diff --git a/tests/ui/privacy/privacy1.stderr b/tests/ui/privacy/privacy1.stderr
index 1f2f4a92c48..98750cee610 100644
--- a/tests/ui/privacy/privacy1.stderr
+++ b/tests/ui/privacy/privacy1.stderr
@@ -1,54 +1,54 @@
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:132:18
+  --> $DIR/privacy1.rs:138:18
    |
 LL |         use bar::baz::{foo, bar};
    |                  ^^^ private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:132:18
+  --> $DIR/privacy1.rs:138:18
    |
 LL |         use bar::baz::{foo, bar};
    |                  ^^^ private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:141:18
+  --> $DIR/privacy1.rs:147:18
    |
 LL |         use bar::baz;
    |                  ^^^ private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `i` is private
-  --> $DIR/privacy1.rs:165:20
+  --> $DIR/privacy1.rs:171:20
    |
 LL |     use self::foo::i::A;
    |                    ^ private module
    |
 note: the module `i` is defined here
-  --> $DIR/privacy1.rs:170:9
+  --> $DIR/privacy1.rs:176:9
    |
 LL |         mod i {
    |         ^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:104:21
+  --> $DIR/privacy1.rs:110:21
    |
 LL |         crate::bar::baz::A::foo();
    |                     ^^^  - struct `A` is not publicly re-exported
@@ -56,13 +56,13 @@ LL |         crate::bar::baz::A::foo();
    |                     private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:105:21
+  --> $DIR/privacy1.rs:111:21
    |
 LL |         crate::bar::baz::A::bar();
    |                     ^^^  - struct `A` is not publicly re-exported
@@ -70,13 +70,13 @@ LL |         crate::bar::baz::A::bar();
    |                     private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:107:21
+  --> $DIR/privacy1.rs:113:21
    |
 LL |         crate::bar::baz::A.foo2();
    |                     ^^^  - unit struct `A` is not publicly re-exported
@@ -84,13 +84,13 @@ LL |         crate::bar::baz::A.foo2();
    |                     private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:108:21
+  --> $DIR/privacy1.rs:114:21
    |
 LL |         crate::bar::baz::A.bar2();
    |                     ^^^  - unit struct `A` is not publicly re-exported
@@ -98,13 +98,13 @@ LL |         crate::bar::baz::A.bar2();
    |                     private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: trait `B` is private
-  --> $DIR/privacy1.rs:112:21
+  --> $DIR/privacy1.rs:118:21
    |
 LL |         crate::bar::B::foo();
    |                     ^  --- associated function `foo` is not publicly re-exported
@@ -112,31 +112,31 @@ LL |         crate::bar::B::foo();
    |                     private trait
    |
 note: the trait `B` is defined here
-  --> $DIR/privacy1.rs:40:5
+  --> $DIR/privacy1.rs:46:5
    |
 LL |     trait B {
    |     ^^^^^^^
 
 error[E0603]: function `epriv` is private
-  --> $DIR/privacy1.rs:118:25
+  --> $DIR/privacy1.rs:124:25
    |
 LL |             crate::bar::epriv();
    |                         ^^^^^ private function
    |
 note: the function `epriv` is defined here
-  --> $DIR/privacy1.rs:65:9
+  --> $DIR/privacy1.rs:71:9
    |
 LL |         fn epriv();
    |         ^^^^^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:127:21
+  --> $DIR/privacy1.rs:133:21
    |
 LL |         crate::bar::baz::foo();
    |                     ^^^ private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
@@ -147,13 +147,13 @@ LL +         bar::foo();
    |
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:128:21
+  --> $DIR/privacy1.rs:134:21
    |
 LL |         crate::bar::baz::bar();
    |                     ^^^ private module
    |
 note: the module `baz` is defined here
-  --> $DIR/privacy1.rs:50:5
+  --> $DIR/privacy1.rs:56:5
    |
 LL |     mod baz {
    |     ^^^^^^^
@@ -164,19 +164,19 @@ LL +         bar::bar();
    |
 
 error[E0603]: trait `B` is private
-  --> $DIR/privacy1.rs:157:22
+  --> $DIR/privacy1.rs:163:22
    |
 LL |     impl crate::bar::B for f32 { fn foo() -> f32 { 1.0 } }
    |                      ^ private trait
    |
 note: the trait `B` is defined here
-  --> $DIR/privacy1.rs:40:5
+  --> $DIR/privacy1.rs:46:5
    |
 LL |     trait B {
    |     ^^^^^^^
 
 error[E0624]: associated function `bar` is private
-  --> $DIR/privacy1.rs:77:23
+  --> $DIR/privacy1.rs:83:23
    |
 LL |             fn bar() {}
    |             -------- private associated function defined here
@@ -185,7 +185,7 @@ LL |         self::baz::A::bar();
    |                       ^^^ private associated function
 
 error[E0624]: associated function `bar` is private
-  --> $DIR/privacy1.rs:95:13
+  --> $DIR/privacy1.rs:101:13
    |
 LL |         fn bar() {}
    |         -------- private associated function defined here
@@ -194,7 +194,7 @@ LL |     bar::A::bar();
    |             ^^^ private associated function
 
 error[E0624]: associated function `bar` is private
-  --> $DIR/privacy1.rs:102:24
+  --> $DIR/privacy1.rs:108:24
    |
 LL |         fn bar() {}
    |         -------- private associated function defined here
@@ -203,7 +203,7 @@ LL |         crate::bar::A::bar();
    |                        ^^^ private associated function
 
 error[E0624]: associated function `bar` is private
-  --> $DIR/privacy1.rs:105:29
+  --> $DIR/privacy1.rs:111:29
    |
 LL |             fn bar() {}
    |             -------- private associated function defined here
@@ -212,7 +212,7 @@ LL |         crate::bar::baz::A::bar();
    |                             ^^^ private associated function
 
 error[E0624]: method `bar2` is private
-  --> $DIR/privacy1.rs:108:28
+  --> $DIR/privacy1.rs:114:28
    |
 LL |             fn bar2(&self) {}
    |             -------------- private method defined here
diff --git a/tests/ui/privacy/privacy4.rs b/tests/ui/privacy/privacy4.rs
index 7341c7752bb..6091613271f 100644
--- a/tests/ui/privacy/privacy4.rs
+++ b/tests/ui/privacy/privacy4.rs
@@ -1,7 +1,9 @@
 #![feature(lang_items, no_core)]
 #![no_core] // makes debugging this test *a lot* easier (during resolve)
 
-#[lang = "sized"] pub trait Sized {}
+#[lang = "sized"] pub trait Sized: MetaSized {}
+#[lang = "meta_sized"] pub trait MetaSized: PointeeSized {}
+#[lang = "pointee_sized"] pub trait PointeeSized {}
 #[lang="copy"] pub trait Copy {}
 
 // Test to make sure that private items imported through globs remain private
diff --git a/tests/ui/privacy/privacy4.stderr b/tests/ui/privacy/privacy4.stderr
index 4aa3ae964c0..eeefd85645c 100644
--- a/tests/ui/privacy/privacy4.stderr
+++ b/tests/ui/privacy/privacy4.stderr
@@ -1,11 +1,11 @@
 error[E0603]: module `glob` is private
-  --> $DIR/privacy4.rs:21:14
+  --> $DIR/privacy4.rs:23:14
    |
 LL |     use bar::glob::gpriv;
    |              ^^^^ private module
    |
 note: the module `glob` is defined here
-  --> $DIR/privacy4.rs:13:5
+  --> $DIR/privacy4.rs:15:5
    |
 LL |     mod glob {
    |     ^^^^^^^^