summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/regions
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/regions')
-rw-r--r--tests/ui/regions/higher-ranked-implied.stderr8
-rw-r--r--tests/ui/regions/issue-102374.stderr3
-rw-r--r--tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr4
-rw-r--r--tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr4
-rw-r--r--tests/ui/regions/region-object-lifetime-5.rs2
-rw-r--r--tests/ui/regions/region-object-lifetime-5.stderr7
-rw-r--r--tests/ui/regions/regions-lifetime-bounds-on-fns.stderr4
7 files changed, 22 insertions, 10 deletions
diff --git a/tests/ui/regions/higher-ranked-implied.stderr b/tests/ui/regions/higher-ranked-implied.stderr
index 9d80eacd7..8fa65f116 100644
--- a/tests/ui/regions/higher-ranked-implied.stderr
+++ b/tests/ui/regions/higher-ranked-implied.stderr
@@ -2,7 +2,9 @@ error[E0308]: mismatched types
--> $DIR/higher-ranked-implied.rs:12:16
|
LL | let y: B = x;
- | ^ one type is more general than the other
+ | - ^ one type is more general than the other
+ | |
+ | expected due to this
|
= note: expected fn pointer `for<'a, 'b> fn(Inv<&'a &'b ()>, Inv<&'b &'a ()>, Inv<&'b ()>)`
found fn pointer `for<'a, 'b> fn(Inv<&'a &'b ()>, Inv<&'b &'a ()>, Inv<&'a ()>)`
@@ -11,7 +13,9 @@ error[E0308]: mismatched types
--> $DIR/higher-ranked-implied.rs:13:16
|
LL | let _: A = y;
- | ^ one type is more general than the other
+ | - ^ one type is more general than the other
+ | |
+ | expected due to this
|
= note: expected fn pointer `for<'a, 'b> fn(Inv<&'a &'b ()>, Inv<&'b &'a ()>, Inv<&'a ()>)`
found fn pointer `for<'a, 'b> fn(Inv<&'a &'b ()>, Inv<&'b &'a ()>, Inv<&'b ()>)`
diff --git a/tests/ui/regions/issue-102374.stderr b/tests/ui/regions/issue-102374.stderr
index af64b6867..a4230cf8b 100644
--- a/tests/ui/regions/issue-102374.stderr
+++ b/tests/ui/regions/issue-102374.stderr
@@ -7,8 +7,7 @@ LL | f
| ^ expected `i32`, found fn pointer
|
= note: expected type `i32`
- found fn pointer `fn(Cell<...>)`
- the full type name has been written to '$TEST_BUILD_DIR/regions/issue-102374/issue-102374.long-type-hash.txt'
+ found fn pointer `for<'z1, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z0> fn(Cell<(&'z1 i32, &'a i32, &'b i32, &'c i32, &'d i32, &'e i32, &'f i32, &'g i32, &'h i32, &'i i32, &'j i32, &'k i32, &'l i32, &'m i32, &'n i32, &'o i32, &'p i32, &'q i32, &'r i32, &'s i32, &'t i32, &'u i32, &'v i32, &'w i32, &'x i32, &'y i32, &'z i32, &'z0 i32)>)`
error: aborting due to previous error
diff --git a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
index bb5bc6f66..f2328cf3b 100644
--- a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
+++ b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
@@ -2,7 +2,9 @@ error[E0308]: mismatched types
--> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:20:43
|
LL | let _: fn(&mut &isize, &mut &isize) = a;
- | ^ one type is more general than the other
+ | ---------------------------- ^ one type is more general than the other
+ | |
+ | expected due to this
|
= note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
diff --git a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
index dbe9e9b1a..9c5004981 100644
--- a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
+++ b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
@@ -2,7 +2,9 @@ error[E0308]: mismatched types
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:56
|
LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
- | ^ one type is more general than the other
+ | ----------------------------------------- ^ one type is more general than the other
+ | |
+ | expected due to this
|
= note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b isize, &'c mut &'d isize, &'e mut &'f isize)`
found fn item `for<'a, 'b, 'c> fn(&'a mut &isize, &'b mut &isize, &'c mut &isize) {a::<'_, '_, '_>}`
diff --git a/tests/ui/regions/region-object-lifetime-5.rs b/tests/ui/regions/region-object-lifetime-5.rs
index ad3593671..307bbcbd5 100644
--- a/tests/ui/regions/region-object-lifetime-5.rs
+++ b/tests/ui/regions/region-object-lifetime-5.rs
@@ -8,7 +8,7 @@ trait Foo {
// Here, the object is bounded by an anonymous lifetime and returned
// as `&'static`, so you get an error.
fn owned_receiver(x: Box<dyn Foo>) -> &'static () {
- x.borrowed() //~ ERROR cannot return reference to local data `*x`
+ x.borrowed() //~ ERROR cannot return value referencing local data `*x`
}
fn main() {}
diff --git a/tests/ui/regions/region-object-lifetime-5.stderr b/tests/ui/regions/region-object-lifetime-5.stderr
index b82b58c7a..b86f6e3a2 100644
--- a/tests/ui/regions/region-object-lifetime-5.stderr
+++ b/tests/ui/regions/region-object-lifetime-5.stderr
@@ -1,8 +1,11 @@
-error[E0515]: cannot return reference to local data `*x`
+error[E0515]: cannot return value referencing local data `*x`
--> $DIR/region-object-lifetime-5.rs:11:5
|
LL | x.borrowed()
- | ^^^^^^^^^^^^ returns a reference to data owned by the current function
+ | -^^^^^^^^^^^
+ | |
+ | returns a value referencing data owned by the current function
+ | `*x` is borrowed here
error: aborting due to previous error
diff --git a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
index df0fd069e..2fab29865 100644
--- a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
+++ b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
@@ -2,7 +2,9 @@ error[E0308]: mismatched types
--> $DIR/regions-lifetime-bounds-on-fns.rs:20:43
|
LL | let _: fn(&mut &isize, &mut &isize) = a;
- | ^ one type is more general than the other
+ | ---------------------------- ^ one type is more general than the other
+ | |
+ | expected due to this
|
= note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`