| Crates.io | nightly-crimes |
| lib.rs | nightly-crimes |
| version | 1.0.2 |
| created_at | 2021-07-02 12:51:21.39255+00 |
| updated_at | 2021-07-04 07:01:01.945841+00 |
| description | Please do not use this. |
| homepage | |
| repository | https://github.com/m-ou-se/nightly-crimes |
| max_upload_size | |
| id | 417812 |
| size | 3,779 |
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.
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!