summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll/mir_check_cast_unsafe_fn.stderr')
-rw-r--r--src/test/ui/nll/mir_check_cast_unsafe_fn.stderr11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr b/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr
new file mode 100644
index 000000000..321d17ba6
--- /dev/null
+++ b/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr
@@ -0,0 +1,11 @@
+error: lifetime may not live long enough
+ --> $DIR/mir_check_cast_unsafe_fn.rs:7:14
+ |
+LL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {
+ | -- lifetime `'a` defined here
+...
+LL | unsafe { g(input) }
+ | ^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+