Skip to content

Commit fbed13a

Browse files
committed
update UI tests for Rust 1.86 (#5041)
1 parent 12a67af commit fbed13a

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

tests/ui/invalid_intern_arg.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ error[E0435]: attempt to use a non-constant value in a constant
77
help: consider using `let` instead of `static`
88
--> src/sync.rs
99
|
10-
| let INTERNED: $crate::sync::Interned = $crate::sync::Interned::new($text);
11-
| ~~~
10+
- static INTERNED: $crate::sync::Interned = $crate::sync::Interned::new($text);
11+
+ let INTERNED: $crate::sync::Interned = $crate::sync::Interned::new($text);
12+
|
1213

1314
error: lifetime may not live long enough
1415
--> tests/ui/invalid_intern_arg.rs:5:27

tests/ui/static_ref.stderr

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
error: lifetime may not live long enough
1+
error[E0521]: borrowed data escapes outside of function
22
--> tests/ui/static_ref.rs:4:1
33
|
44
4 | #[pyfunction]
55
| ^^^^^^^^^^^^^
66
| |
7+
| `py` is a reference that is only valid in the function body
8+
| `py` escapes the function body here
79
| lifetime `'py` defined here
8-
| coercion requires that `'py` must outlive `'static`
10+
| argument requires that `'py` must outlive `'static`
911
|
1012
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
1113

@@ -29,19 +31,19 @@ error[E0597]: `holder_0` does not live long enough
2931
| | |
3032
| | `holder_0` dropped here while still borrowed
3133
| binding `holder_0` declared here
34+
| argument requires that `holder_0` is borrowed for `'static`
3235
5 | fn static_ref(list: &'static Bound<'_, PyList>) -> usize {
33-
| ^^^^^^-
34-
| | |
35-
| | argument requires that `holder_0` is borrowed for `'static`
36-
| borrowed value does not live long enough
36+
| ^^^^^^^ borrowed value does not live long enough
3737

38-
error: lifetime may not live long enough
38+
error[E0521]: borrowed data escapes outside of function
3939
--> tests/ui/static_ref.rs:9:1
4040
|
4141
9 | #[pyfunction]
4242
| ^^^^^^^^^^^^^
4343
| |
44+
| `py` is a reference that is only valid in the function body
45+
| `py` escapes the function body here
4446
| lifetime `'py` defined here
45-
| coercion requires that `'py` must outlive `'static`
47+
| argument requires that `'py` must outlive `'static`
4648
|
4749
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)

0 commit comments

Comments
 (0)