correct coercion comments

This commit is contained in:
Niko Matsakis 2019-10-02 14:23:36 -04:00
parent dce20bf62a
commit 3ae4abbaa3
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ use std::fmt::Debug;
const TMP: u32 = 22;
// Coerce from `Box<"asdf">` to `Box<dyn Debug>`.
// Coerce from `&u32` to `*const u32`
fn raw_pointer_coercion() {
fn sync_example() -> *const u32 {
&TMP

View File

@ -9,7 +9,7 @@
use std::fmt::Debug;
// Coerce from `Box<"asdf">` to `Box<dyn Debug>`.
// Unsizing coercion from `Box<&'static str>` to `Box<dyn Debug>`.
fn unsize_trait_coercion() {
fn sync_example() -> Box<dyn Debug> {
Box::new("asdf")
@ -20,7 +20,7 @@ fn unsize_trait_coercion() {
}
}
// Coerce from `Box<[u32; N]>` to `Box<[32]>`.
// Unsizing coercion from `Box<[u32; N]>` to `Box<[32]>`.
fn unsize_slice_coercion() {
fn sync_example() -> Box<[u32]> {
Box::new([0])