Skip to content

Commit

Permalink
correct coercion comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 2, 2019
1 parent dce20bf commit 3ae4abb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/async-await/return-ty-raw-ptr-coercion.rs
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/async-await/return-ty-unsize-coercion.rs
Expand Up @@ -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")
Expand All @@ -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])
Expand Down

0 comments on commit 3ae4abb

Please sign in to comment.