diff options
| author | Lukas Markeffsky <@> | 2024-09-10 18:47:10 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2024-09-24 22:20:42 +0200 |
| commit | d1e82d438f9f3d2ce59be210a2710c560e93e688 (patch) | |
| tree | 06f69d7f065d45c820de22adaa90635e5be2810d /tests/ui/nll/user-annotations | |
| parent | b52dea823090223ee2e6faaf08210d085bbc52f2 (diff) | |
| download | rust-d1e82d438f9f3d2ce59be210a2710c560e93e688.tar.gz rust-d1e82d438f9f3d2ce59be210a2710c560e93e688.zip | |
use more accurate spans for user type ascriptions
Diffstat (limited to 'tests/ui/nll/user-annotations')
| -rw-r--r-- | tests/ui/nll/user-annotations/cast_static_lifetime.stderr | 3 | ||||
| -rw-r--r-- | tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/ui/nll/user-annotations/cast_static_lifetime.stderr b/tests/ui/nll/user-annotations/cast_static_lifetime.stderr index 35eec233ed5..efd14fe875d 100644 --- a/tests/ui/nll/user-annotations/cast_static_lifetime.stderr +++ b/tests/ui/nll/user-annotations/cast_static_lifetime.stderr @@ -4,10 +4,9 @@ error[E0597]: `x` does not live long enough LL | let x = 22_u32; | - binding `x` declared here LL | let y: &u32 = (&x) as &'static u32; - | ^^^^---------------- + | ^^^^ ------------ type annotation requires that `x` is borrowed for `'static` | | | borrowed value does not live long enough - | type annotation requires that `x` is borrowed for `'static` LL | } | - `x` dropped here while still borrowed diff --git a/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr index 3e2706309b3..2ed0fadc065 100644 --- a/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr +++ b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr @@ -4,10 +4,9 @@ error[E0597]: `x` does not live long enough LL | let x = 22_u32; | - binding `x` declared here LL | let y: &u32 = type_ascribe!(&x, &'static u32); - | --------------^^--------------- - | | | - | | borrowed value does not live long enough - | type annotation requires that `x` is borrowed for `'static` + | ^^ ------------ type annotation requires that `x` is borrowed for `'static` + | | + | borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed |
