summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /tests/ui/privacy
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/privacy')
-rw-r--r--tests/ui/privacy/privacy1.rs2
-rw-r--r--tests/ui/privacy/privacy1.stderr6
-rw-r--r--tests/ui/privacy/private-impl-method.rs2
-rw-r--r--tests/ui/privacy/private-impl-method.stderr6
-rw-r--r--tests/ui/privacy/private-in-public-ill-formed.stderr8
-rw-r--r--tests/ui/privacy/private-method-cross-crate.rs2
-rw-r--r--tests/ui/privacy/private-method-cross-crate.stderr6
-rw-r--r--tests/ui/privacy/private-method-inherited.rs2
-rw-r--r--tests/ui/privacy/private-method-inherited.stderr6
-rw-r--r--tests/ui/privacy/private-method.rs2
-rw-r--r--tests/ui/privacy/private-method.stderr6
-rw-r--r--tests/ui/privacy/restricted/test.stderr18
12 files changed, 33 insertions, 33 deletions
diff --git a/tests/ui/privacy/privacy1.rs b/tests/ui/privacy/privacy1.rs
index 3c9fa983d..fcb2108ab 100644
--- a/tests/ui/privacy/privacy1.rs
+++ b/tests/ui/privacy/privacy1.rs
@@ -106,7 +106,7 @@ mod foo {
//~^ ERROR: associated function `bar` is private
::bar::baz::A.foo2(); //~ ERROR: module `baz` is private
::bar::baz::A.bar2(); //~ ERROR: module `baz` is private
- //~^ ERROR: associated function `bar2` is private
+ //~^ ERROR: method `bar2` is private
let _: isize =
::bar::B::foo(); //~ ERROR: trait `B` is private
diff --git a/tests/ui/privacy/privacy1.stderr b/tests/ui/privacy/privacy1.stderr
index 70e6fcb7a..6ebed8ee0 100644
--- a/tests/ui/privacy/privacy1.stderr
+++ b/tests/ui/privacy/privacy1.stderr
@@ -190,14 +190,14 @@ LL | fn bar() {}
LL | ::bar::baz::A::bar();
| ^^^ private associated function
-error[E0624]: associated function `bar2` is private
+error[E0624]: method `bar2` is private
--> $DIR/privacy1.rs:108:23
|
LL | fn bar2(&self) {}
- | -------------- private associated function defined here
+ | -------------- private method defined here
...
LL | ::bar::baz::A.bar2();
- | ^^^^ private associated function
+ | ^^^^ private method
error: aborting due to 18 previous errors
diff --git a/tests/ui/privacy/private-impl-method.rs b/tests/ui/privacy/private-impl-method.rs
index f7be6726c..b5587920f 100644
--- a/tests/ui/privacy/private-impl-method.rs
+++ b/tests/ui/privacy/private-impl-method.rs
@@ -17,5 +17,5 @@ fn f() {
fn main() {
let s = a::Foo { x: 1 };
s.bar();
- s.foo(); //~ ERROR associated function `foo` is private
+ s.foo(); //~ ERROR method `foo` is private
}
diff --git a/tests/ui/privacy/private-impl-method.stderr b/tests/ui/privacy/private-impl-method.stderr
index bb54dce7e..18e4531d1 100644
--- a/tests/ui/privacy/private-impl-method.stderr
+++ b/tests/ui/privacy/private-impl-method.stderr
@@ -1,11 +1,11 @@
-error[E0624]: associated function `foo` is private
+error[E0624]: method `foo` is private
--> $DIR/private-impl-method.rs:20:7
|
LL | fn foo(&self) {}
- | ------------- private associated function defined here
+ | ------------- private method defined here
...
LL | s.foo();
- | ^^^ private associated function
+ | ^^^ private method
error: aborting due to previous error
diff --git a/tests/ui/privacy/private-in-public-ill-formed.stderr b/tests/ui/privacy/private-in-public-ill-formed.stderr
index e7c94bc30..abc8538e5 100644
--- a/tests/ui/privacy/private-in-public-ill-formed.stderr
+++ b/tests/ui/privacy/private-in-public-ill-formed.stderr
@@ -1,16 +1,16 @@
error[E0118]: no nominal type found for inherent implementation
- --> $DIR/private-in-public-ill-formed.rs:14:10
+ --> $DIR/private-in-public-ill-formed.rs:14:5
|
LL | impl <Priv as PrivTr>::AssocAlias {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
|
= note: either implement a trait on it or create a newtype to wrap it instead
error[E0118]: no nominal type found for inherent implementation
- --> $DIR/private-in-public-ill-formed.rs:31:10
+ --> $DIR/private-in-public-ill-formed.rs:31:5
|
LL | impl <Priv as PrivTr>::AssocAlias {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
|
= note: either implement a trait on it or create a newtype to wrap it instead
diff --git a/tests/ui/privacy/private-method-cross-crate.rs b/tests/ui/privacy/private-method-cross-crate.rs
index ab3bbdfe4..4da44e068 100644
--- a/tests/ui/privacy/private-method-cross-crate.rs
+++ b/tests/ui/privacy/private-method-cross-crate.rs
@@ -4,5 +4,5 @@ use cci_class_5::kitties::cat;
fn main() {
let nyan : cat = cat(52, 99);
- nyan.nap(); //~ ERROR associated function `nap` is private
+ nyan.nap(); //~ ERROR method `nap` is private
}
diff --git a/tests/ui/privacy/private-method-cross-crate.stderr b/tests/ui/privacy/private-method-cross-crate.stderr
index 93f6a7f2f..e644440c8 100644
--- a/tests/ui/privacy/private-method-cross-crate.stderr
+++ b/tests/ui/privacy/private-method-cross-crate.stderr
@@ -1,13 +1,13 @@
-error[E0624]: associated function `nap` is private
+error[E0624]: method `nap` is private
--> $DIR/private-method-cross-crate.rs:7:8
|
LL | nyan.nap();
- | ^^^ private associated function
+ | ^^^ private method
|
::: $DIR/auxiliary/cci_class_5.rs:8:9
|
LL | fn nap(&self) {}
- | ------------- private associated function defined here
+ | ------------- private method defined here
error: aborting due to previous error
diff --git a/tests/ui/privacy/private-method-inherited.rs b/tests/ui/privacy/private-method-inherited.rs
index 2f6454288..bc27027e8 100644
--- a/tests/ui/privacy/private-method-inherited.rs
+++ b/tests/ui/privacy/private-method-inherited.rs
@@ -10,5 +10,5 @@ mod a {
fn main() {
let x = a::Foo;
- x.f(); //~ ERROR associated function `f` is private
+ x.f(); //~ ERROR method `f` is private
}
diff --git a/tests/ui/privacy/private-method-inherited.stderr b/tests/ui/privacy/private-method-inherited.stderr
index 011a7fee4..0104a1b27 100644
--- a/tests/ui/privacy/private-method-inherited.stderr
+++ b/tests/ui/privacy/private-method-inherited.stderr
@@ -1,11 +1,11 @@
-error[E0624]: associated function `f` is private
+error[E0624]: method `f` is private
--> $DIR/private-method-inherited.rs:13:7
|
LL | fn f(self) {}
- | ---------- private associated function defined here
+ | ---------- private method defined here
...
LL | x.f();
- | ^ private associated function
+ | ^ private method
error: aborting due to previous error
diff --git a/tests/ui/privacy/private-method.rs b/tests/ui/privacy/private-method.rs
index 76a642cde..a9bea520e 100644
--- a/tests/ui/privacy/private-method.rs
+++ b/tests/ui/privacy/private-method.rs
@@ -19,5 +19,5 @@ mod kitties {
fn main() {
let nyan : kitties::Cat = kitties::cat(52, 99);
- nyan.nap(); //~ ERROR associated function `nap` is private
+ nyan.nap(); //~ ERROR method `nap` is private
}
diff --git a/tests/ui/privacy/private-method.stderr b/tests/ui/privacy/private-method.stderr
index 17c7179dc..42fec7622 100644
--- a/tests/ui/privacy/private-method.stderr
+++ b/tests/ui/privacy/private-method.stderr
@@ -1,11 +1,11 @@
-error[E0624]: associated function `nap` is private
+error[E0624]: method `nap` is private
--> $DIR/private-method.rs:22:8
|
LL | fn nap(&self) {}
- | ------------- private associated function defined here
+ | ------------- private method defined here
...
LL | nyan.nap();
- | ^^^ private associated function
+ | ^^^ private method
error: aborting due to previous error
diff --git a/tests/ui/privacy/restricted/test.stderr b/tests/ui/privacy/restricted/test.stderr
index 1acd221b4..76f19525d 100644
--- a/tests/ui/privacy/restricted/test.stderr
+++ b/tests/ui/privacy/restricted/test.stderr
@@ -54,14 +54,14 @@ error[E0616]: field `x` of struct `S` is private
LL | S::default().x;
| ^ private field
-error[E0624]: associated function `f` is private
+error[E0624]: method `f` is private
--> $DIR/test.rs:32:18
|
LL | pub(super) fn f(&self) {}
- | ---------------------- private associated function defined here
+ | ---------------------- private method defined here
...
LL | S::default().f();
- | ^ private associated function
+ | ^ private method
error[E0624]: associated function `g` is private
--> $DIR/test.rs:33:8
@@ -84,27 +84,27 @@ error[E0616]: field `z` of struct `Universe` is private
LL | let _ = u.z;
| ^ private field
-error[E0624]: associated function `g` is private
+error[E0624]: method `g` is private
--> $DIR/test.rs:45:7
|
LL | u.g();
- | ^ private associated function
+ | ^ private method
|
::: $DIR/auxiliary/pub_restricted.rs:12:5
|
LL | pub(crate) fn g(&self) {}
- | ---------------------- private associated function defined here
+ | ---------------------- private method defined here
-error[E0624]: associated function `h` is private
+error[E0624]: method `h` is private
--> $DIR/test.rs:46:7
|
LL | u.h();
- | ^ private associated function
+ | ^ private method
|
::: $DIR/auxiliary/pub_restricted.rs:13:5
|
LL | pub(crate) fn h(&self) {}
- | ---------------------- private associated function defined here
+ | ---------------------- private method defined here
error: aborting due to 12 previous errors