Skip to content

Commit 2e30f43

Browse files
committed
Bless ui tests.
1 parent 1db0925 commit 2e30f43

File tree

75 files changed

+309
-350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+309
-350
lines changed

src/test/ui/async-await/issue-74072-lifetime-name-annotations.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
error[E0506]: cannot assign to `*x` because it is borrowed
22
--> $DIR/issue-74072-lifetime-name-annotations.rs:9:5
33
|
4-
LL | pub async fn async_fn(x: &mut i32) -> &i32 {
5-
| - let's call the lifetime of this reference `'1`
64
LL | let y = &*x;
75
| --- borrow of `*x` occurs here
86
LL | *x += 1;
97
| ^^^^^^^ assignment to borrowed `*x` occurs here
10-
LL | y
11-
| - returning this value requires that `*x` is borrowed for `'1`
128

139
error[E0506]: cannot assign to `*x` because it is borrowed
1410
--> $DIR/issue-74072-lifetime-name-annotations.rs:16:9

src/test/ui/async-await/issue-75785-confusing-named-region.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
error[E0506]: cannot assign to `*x` because it is borrowed
22
--> $DIR/issue-75785-confusing-named-region.rs:9:5
33
|
4-
LL | pub async fn async_fn(x: &mut i32) -> (&i32, &i32) {
5-
| - let's call the lifetime of this reference `'1`
64
LL | let y = &*x;
75
| --- borrow of `*x` occurs here
86
LL | *x += 1;
97
| ^^^^^^^ assignment to borrowed `*x` occurs here
10-
LL | (&32, y)
11-
| -------- returning this value requires that `*x` is borrowed for `'1`
128

139
error: aborting due to previous error
1410

src/test/ui/binop/issue-77910-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fn main() {
77
// we shouldn't ice with the bound var here.
88
assert_eq!(foo, y);
99
//~^ ERROR binary operation `==` cannot be applied to type
10-
//~| ERROR `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug`
10+
//~| ERROR `fn(&i32) -> &i32 {foo}` doesn't implement `Debug`
1111
}

src/test/ui/binop/issue-77910-1.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
1+
error[E0369]: binary operation `==` cannot be applied to type `fn(&i32) -> &i32 {foo}`
22
--> $DIR/issue-77910-1.rs:8:5
33
|
44
LL | assert_eq!(foo, y);
55
| ^^^^^^^^^^^^^^^^^^
66
| |
7-
| for<'a> fn(&'a i32) -> &'a i32 {foo}
7+
| fn(&i32) -> &i32 {foo}
88
| _
99
|
1010
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
1111

12-
error[E0277]: `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug`
12+
error[E0277]: `fn(&i32) -> &i32 {foo}` doesn't implement `Debug`
1313
--> $DIR/issue-77910-1.rs:8:5
1414
|
1515
LL | fn foo(s: &i32) -> &i32 {
1616
| --- consider calling this function
1717
...
1818
LL | assert_eq!(foo, y);
19-
| ^^^^^^^^^^^^^^^^^^ `for<'a> fn(&'a i32) -> &'a i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
19+
| ^^^^^^^^^^^^^^^^^^ `fn(&i32) -> &i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
2020
|
21-
= help: the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}`
21+
= help: the trait `Debug` is not implemented for fn item `fn(&i32) -> &i32 {foo}`
2222
= help: use parentheses to call this function: `foo(/* &i32 */)`
2323
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
2424

src/test/ui/binop/issue-77910-2.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
1+
error[E0369]: binary operation `==` cannot be applied to type `fn(&i32) -> &i32 {foo}`
22
--> $DIR/issue-77910-2.rs:7:12
33
|
44
LL | if foo == y {}
55
| --- ^^ - _
66
| |
7-
| for<'a> fn(&'a i32) -> &'a i32 {foo}
7+
| fn(&i32) -> &i32 {foo}
88
|
99
help: use parentheses to call this function
1010
|

src/test/ui/borrowck/issue-81899.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | panic!()
88
| ^^^^^^^^
99
| |
1010
| the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:11:5
11-
| inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>` at $SRC_DIR/std/src/panic.rs:LL:COL
11+
| inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34], '_>` at $SRC_DIR/std/src/panic.rs:LL:COL
1212
|
1313
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
1414

src/test/ui/borrowck/issue-88434-minimal-example.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | panic!()
88
| ^^^^^^^^
99
| |
1010
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5
11-
| inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>` at $SRC_DIR/std/src/panic.rs:LL:COL
11+
| inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28], '_>` at $SRC_DIR/std/src/panic.rs:LL:COL
1212
|
1313
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
1414

src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | panic!()
88
| ^^^^^^^^
99
| |
1010
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5
11-
| inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>` at $SRC_DIR/std/src/panic.rs:LL:COL
11+
| inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34], '_>` at $SRC_DIR/std/src/panic.rs:LL:COL
1212
|
1313
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
1414

src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
1111
| requires that `'1` must outlive `'x`
1212

1313
error: lifetime may not live long enough
14-
--> $DIR/expect-fn-supply-fn.rs:16:49
14+
--> $DIR/expect-fn-supply-fn.rs:16:48
1515
|
1616
LL | fn expect_free_supply_free_from_fn<'x>(x: &'x u32) {
1717
| -- lifetime `'x` defined here
1818
...
1919
LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
20-
| ^ requires that `'x` must outlive `'static`
20+
| ^^^^^^^^^^^^^^^^^^^^^^ requires that `'x` must outlive `'static`
2121

2222
error[E0308]: mismatched types
2323
--> $DIR/expect-fn-supply-fn.rs:32:49

src/test/ui/closures/closure-expected-type/expect-region-supply-region-2.stderr

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ LL | closure_expecting_bound(|x: &'x u32| {
1010
| requires that `'1` must outlive `'x`
1111

1212
error: lifetime may not live long enough
13-
--> $DIR/expect-region-supply-region-2.rs:14:30
13+
--> $DIR/expect-region-supply-region-2.rs:14:29
1414
|
15-
LL | fn expect_bound_supply_named<'x>() {
16-
| -- lifetime `'x` defined here
15+
LL | fn expect_bound_supply_named<'x>() {
16+
| -- lifetime `'x` defined here
1717
...
18-
LL | closure_expecting_bound(|x: &'x u32| {
19-
| ^ requires that `'x` must outlive `'static`
18+
LL | closure_expecting_bound(|x: &'x u32| {
19+
| _____________________________^
20+
LL | |
21+
LL | |
22+
LL | |
23+
... |
24+
LL | | f = Some(x);
25+
LL | | });
26+
| |_____^ requires that `'x` must outlive `'static`
2027

2128
error: aborting due to 2 previous errors
2229

0 commit comments

Comments
 (0)