about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_error_codes/error_codes/E0759.md14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/librustc_error_codes/error_codes/E0759.md b/src/librustc_error_codes/error_codes/E0759.md
index a74759bdf63..2daaeba82f0 100644
--- a/src/librustc_error_codes/error_codes/E0759.md
+++ b/src/librustc_error_codes/error_codes/E0759.md
@@ -5,14 +5,11 @@ Erroneous code examples:
 ```compile_fail,E0759
 use std::fmt::Debug;
 
-fn foo(x: &i32) -> impl Debug {
+fn foo(x: &i32) -> impl Debug { // error!
     x
 }
-```
 
-```compile_fail,E0759
-# use std::fmt::Debug;
-fn bar(x: &i32) -> Box<dyn Debug> {
+fn bar(x: &i32) -> Box<dyn Debug> { // error!
     Box::new(x)
 }
 ```
@@ -21,14 +18,11 @@ These examples have the same semantics as the following:
 
 ```compile_fail,E0759
 # use std::fmt::Debug;
-fn foo(x: &i32) -> impl Debug + 'static {
+fn foo(x: &i32) -> impl Debug + 'static { // ok!
     x
 }
-```
 
-```compile_fail,E0759
-# use std::fmt::Debug;
-fn bar(x: &i32) -> Box<dyn Debug + 'static> {
+fn bar(x: &i32) -> Box<dyn Debug + 'static> { // ok!
     Box::new(x)
 }
 ```