From d49111f501d2fa3b390792689f68bc8b146e61a4 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 19 Feb 2026 04:17:57 +0200 Subject: [PATCH 1/2] coerce.site.return: make example more simple - remove the import and use the type directly - get the type from its original path, and not a re-export --- src/type-coercions.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/type-coercions.md b/src/type-coercions.md index 76b994d64c..8c0411c2c7 100644 --- a/src/type-coercions.md +++ b/src/type-coercions.md @@ -63,8 +63,7 @@ r[coerce.site.return] For example, `x` is coerced to have type `&dyn Display` in the following: ```rust - use std::fmt::Display; - fn foo(x: &u32) -> &dyn Display { + fn foo(x: &u32) -> &dyn core::fmt::Display { x } ``` From fbb5e3107690ba632aec0453a2a8cf29949cacd0 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 20 Feb 2026 07:20:10 +0200 Subject: [PATCH 2/2] match the example --- src/type-coercions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type-coercions.md b/src/type-coercions.md index 8c0411c2c7..a75160871c 100644 --- a/src/type-coercions.md +++ b/src/type-coercions.md @@ -60,7 +60,7 @@ r[coerce.site.constructor] r[coerce.site.return] * Function results—either the final line of a block if it is not semicolon-terminated or any expression in a `return` statement - For example, `x` is coerced to have type `&dyn Display` in the following: + For example, `x` is coerced to have type `&dyn core::fmt::Display` in the following: ```rust fn foo(x: &u32) -> &dyn core::fmt::Display {