summaryrefslogtreecommitdiffstats
path: root/tests/ui/c-variadic/variadic-ffi-6.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/c-variadic/variadic-ffi-6.stderr')
-rw-r--r--tests/ui/c-variadic/variadic-ffi-6.stderr13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/ui/c-variadic/variadic-ffi-6.stderr b/tests/ui/c-variadic/variadic-ffi-6.stderr
index 4c7792d96..344bfed4b 100644
--- a/tests/ui/c-variadic/variadic-ffi-6.stderr
+++ b/tests/ui/c-variadic/variadic-ffi-6.stderr
@@ -5,11 +5,20 @@ LL | ) -> &usize {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | ) -> &'static usize {
| +++++++
+help: instead, you are more likely to want to change one of the arguments to be borrowed...
+ |
+LL | x: &usize,
+ | +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL - ) -> &usize {
+LL + ) -> usize {
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.