Skip to content

Autoborrowing to a closure allows use of unsafe functions in safe code #10081

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

Closed
huonw opened this issue Oct 26, 2013 · 1 comment
Closed

Autoborrowing to a closure allows use of unsafe functions in safe code #10081

huonw opened this issue Oct 26, 2013 · 1 comment
Labels
A-type-system Area: Type system

Comments

@huonw
Copy link
Member

huonw commented Oct 26, 2013

use std::cast;
fn main() {
    let val = Some(1.23456f64).map(cast::transmute::<f64, u64>);
    println!("{:?}", val)
}
Some(4608238783128613432u64)
@alexcrichton
Copy link
Member

Closing as a dupe of #9582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

2 participants