about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
diff options
context:
space:
mode:
authorFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-06-06 22:54:00 +0200
committerFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-06-06 22:54:00 +0200
commit31eee595cf317d5a328356232016c8504dad9292 (patch)
treec1ba71c2035ad28dc972c0a290ac007c1e846baf /compiler/rustc_error_codes/src
parentf57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1 (diff)
downloadrust-31eee595cf317d5a328356232016c8504dad9292.tar.gz
rust-31eee595cf317d5a328356232016c8504dad9292.zip
Fix corrected example in E0759.md
Diffstat (limited to 'compiler/rustc_error_codes/src')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0759.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0759.md b/compiler/rustc_error_codes/src/error_codes/E0759.md
index 2fe5ada257f..6b16a7d415a 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0759.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0759.md
@@ -16,13 +16,13 @@ fn bar(x: &i32) -> Box<dyn Debug> { // error!
 
 Add `'static` requirement to fix them:
 
-```compile_fail,E0759
+```
 # use std::fmt::Debug;
-fn foo(x: &i32) -> impl Debug + 'static { // ok!
+fn foo(x: &'static i32) -> impl Debug + 'static { // ok!
     x
 }
 
-fn bar(x: &i32) -> Box<dyn Debug + 'static> { // ok!
+fn bar(x: &'static i32) -> Box<dyn Debug + 'static> { // ok!
     Box::new(x)
 }
 ```