nightly-crimes

Crates.ionightly-crimes
lib.rsnightly-crimes
version1.0.2
sourcesrc
created_at2021-07-02 12:51:21.39255
updated_at2021-07-04 07:01:01.945841
descriptionPlease do not use this.
homepage
repositoryhttps://github.com/m-ou-se/nightly-crimes
max_upload_size
id417812
size3,779
Mara Bos (m-ou-se)

documentation

README

nightly-crimes

The nightly_crimes!{} macro commits horrible crimes to allow you to enable nightly features on the stable compiler.

https://twitter.com/m_ou_se/status/1410930900116951040

Please do not use this.

Example

use nightly_crimes::nightly_crimes;

nightly_crimes! {
    #![feature(never_type)]
    #![feature(box_syntax)]
    fn hey(x: Result<&str, !>) -> Box<String> {
        match x {
            Ok(x) => box x.to_string(),
            Err(x) => x,
        }
    }
}

fn main() {
    println!("{}", hey(Ok("success!")));
}
$ cargo +stable r
success!
Commit count: 11

cargo fmt