forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize the type Self resolves to in an impl
This is required at the very least in order to evaluate associated constants for arrays (see rust-lang#58212).
- Loading branch information
Angelos Oikonomopoulos
committed
Feb 26, 2019
1 parent
ea43c3c
commit 9b4055b
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
trait FromUnchecked { | ||
unsafe fn from_unchecked(); | ||
} | ||
|
||
impl FromUnchecked for [u8; 1] { | ||
unsafe fn from_unchecked() { | ||
let mut array: Self = std::mem::uninitialized(); | ||
let _ptr = &mut array as *mut [u8] as *mut u8; | ||
} | ||
} | ||
|
||
fn main() { | ||
} |