We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f57d5ba commit 31eee59Copy full SHA for 31eee59
compiler/rustc_error_codes/src/error_codes/E0759.md
@@ -16,13 +16,13 @@ fn bar(x: &i32) -> Box<dyn Debug> { // error!
16
17
Add `'static` requirement to fix them:
18
19
-```compile_fail,E0759
+```
20
# use std::fmt::Debug;
21
-fn foo(x: &i32) -> impl Debug + 'static { // ok!
+fn foo(x: &'static i32) -> impl Debug + 'static { // ok!
22
x
23
}
24
25
-fn bar(x: &i32) -> Box<dyn Debug + 'static> { // ok!
+fn bar(x: &'static i32) -> Box<dyn Debug + 'static> { // ok!
26
Box::new(x)
27
28
```
0 commit comments