correct coercion comments
This commit is contained in:
parent
dce20bf62a
commit
3ae4abbaa3
@ -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
|
||||
|
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user