forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#58757 - aoikonomopoulos:issue-58212, r=oli-obk
Normalize the type Self resolves to in an impl This is required at the very least in order to evaluate associated constants for arrays. Fixes rust-lang#57796 Fixes rust-lang#58212. r? @oli-obk cc @hellow554
- Loading branch information
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() { | ||
} |