forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#71751 - oli-obk:const_ice, r=RalfJung
Move recursion check for zsts back to read site instead of access check site Reverts rust-lang#71140 (comment) Fix rust-lang#71612 Fix rust-lang#71709 r? @RalfJung
- Loading branch information
Showing
3 changed files
with
40 additions
and
12 deletions.
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
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,32 @@ | ||
// check-pass | ||
|
||
// This is a regression test for ICEs from | ||
// https://github.com/rust-lang/rust/issues/71612 | ||
// and | ||
// https://github.com/rust-lang/rust/issues/71709 | ||
|
||
#[derive(Copy, Clone)] | ||
pub struct Glfw; | ||
|
||
static mut GLFW: Option<Glfw> = None; | ||
pub fn new() -> Glfw { | ||
unsafe { | ||
if let Some(glfw) = GLFW { | ||
return glfw; | ||
} else { | ||
todo!() | ||
} | ||
}; | ||
} | ||
|
||
extern "C" { | ||
static _dispatch_queue_attr_concurrent: [u8; 0]; | ||
} | ||
|
||
static DISPATCH_QUEUE_CONCURRENT: &'static [u8; 0] = | ||
unsafe { &_dispatch_queue_attr_concurrent }; | ||
|
||
fn main() { | ||
*DISPATCH_QUEUE_CONCURRENT; | ||
new(); | ||
} |