Skip to content

librustc_trans: Don't ICE on unsized type behind raw pointer in nullable pointer opt. #24807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2015

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented Apr 25, 2015

Fixes #23433.

@rust-highfive
Copy link
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

let b: Option<Unique<[u8]>> = unsafe { Some(Unique::new(&mut a)) };
match b {
Some(_) => println!("it's a some"),
None => println!("it's a none"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have an assertion of some sort here, please? Or a panic!() in the None arm?

@luqmana luqmana force-pushed the nullable-enum-opt-dst-raw-pointers branch from 66c2e46 to 34601af Compare April 25, 2015 11:48
@ghost
Copy link

ghost commented Apr 26, 2015

@bors: r+ 34601af

bors added a commit that referenced this pull request Apr 26, 2015
@bors
Copy link
Collaborator

bors commented Apr 26, 2015

⌛ Testing commit 34601af with merge d372434...

@bors bors merged commit 34601af into rust-lang:master Apr 26, 2015
@luqmana luqmana deleted the nullable-enum-opt-dst-raw-pointers branch July 16, 2015 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LLVM Assertion on Pattern Match + Unique
4 participants