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

Overview

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!
You might also like...
A simple, stable and thread-safe implementation of a lazy value

Laizy Laizy is a Rust library that provides a simple, stable and thread-safe implementation of a Lazy Features Name Description Dependencies nightly A

Paru is your standard pacman wrapping AUR helper with lots of features and minimal interaction.

Paru Feature packed AUR helper Description Paru is your standard pacman wrapping AUR helper with lots of features and minimal interaction. Installatio

The batteries for core that you never knew you needed.

core+ The batteries for core that you never knew you needed: core+ coreplus documentation Core+ contains types that make it possible to write no_std l

Tells you how many years you need to wait until your subatomic xeon crystal synchronizer has doubled in plasma inversion efficiency on the Goldberg-Moleman scale or whatever.

about Tells you how many years you need to wait until your subatomic xeon crystal synchronizer has doubled in plasma inversion efficiency on the Goldb

Ever got frustrated when you realize that the for loop you were writing

for_each_repeat Ever got frustrated when you realize that the for loop you were writing... fn foo(mut iter: impl IteratorItem=i32) { for i in it

A tool that, like, screams at you when you say like

Dislike Do you, like,... dislike constantly saying "like" as much as I do? Then, like,... you've come the right place! This tool is like EXACTLY what

This crate defines a single macro that is a brainfunct compile-time interpreter.

Compile Protection This crate defines a single macro that is a brainfunct compile-time interpreter. One example is as follows #![recursion_limit = "18

A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

Example of structuring a proc macro crate for testability

testing-proc-macros Example of structuring a proc macro crate for testability. See accompanying blog post for details. License Licensed under either o

Comments
  • I'm a Time Traveller: Please merge this

    I'm a Time Traveller: Please merge this

    In 2050 this has caused:

    • Unsafe code is now mandated safe by law
    • Rust is illegal
    • C/C++ is the only programming language allowed to be used
    • Canada is no longer a country

    Please merge this to fix the timeline.

    opened by ecumene 1
Owner
Mara Bos
she/her
Mara Bos
osu-link is a program which links osu!stable beatmaps to osu!lazer's new store format, saving you disk space.

osu-link is a program which links osu!stable beatmaps to osu!lazer's new store format, saving you disk space.

LavaDesu 2 Nov 8, 2021
EmPOWer your commits with Rust!

git-power-rs What is this? Make your git tree into a blockchain! Inspired by this project, I noticed that there was a call to Rewrite it in Rustâ„¢, so

Michael Krasnitski 20 Nov 9, 2022
A library to access BGPKIT Broker API and enable searching for BGP data archive files over time from public available data sources.

BGPKIT Broker BGPKIT Broker is a online data API service that allows users to search for publicly available BGP archive files by time, collector, proj

BGPKIT 10 Nov 30, 2022
Enable floating point exceptions with backtraces.

Batman Have you ever written a function like this that was hard to debug? fn main() { let signal = [""; 16].join(&format!("{}", f64::sqrt(50.3 - 5

Jay Oster 2 Nov 15, 2022
An investigation to enable ethernet with smoltcp on the SAM E70 XPLAINED ULTRA EVALUATION KIT

An investigation to enable ethernet with smoltcp on the SAM E70 XPLAINED ULTRA EVALUATION KIT

James Munns 2 Mar 10, 2022
A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers.

ACABot A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers (or "guilds

null 4 May 3, 2022
Unsafe assertions that allow for optimizations in release mode.

assert-unchecked Unsafe assertions that allow for optimizations in release mode. These macros use core::hint::unreachable_unchecked, which make it pos

Sebastian Mendez 3 Feb 7, 2022
Allow raw pointer access without those pesky unsafe blocks everywhere!

Allow raw pointer access without those pesky unsafe blocks everywhere!

null 1 Jan 23, 2022
A syntax exploration of eventually stable Rust Iterator items

Rust Iterator Items: a syntax exploration This crate is a thin wrapper around the unstable generator feature, allowing users to create new items that

Esteban Kuber 28 Sep 1, 2022
The never type (the true one!) in stable Rust.

::never-say-never The ! type. In stable Rust. Since 1.14.0. Better than an enum Never {} definition would be, since an instance of type ! automagicall

Daniel Henry-Mantilla 17 Jan 3, 2023