Isn't it time to be a bit nicer to rustc?

Overview

politeness-macro

crates.io

Aren't we all too rude to computers? Isn't it time to bring a bit more politeness into our programming? Shouldn't we be a bit nicer to rustc?

Well, now we can be! Introducing polite!, the macro that makes you say please.

Using polite! is simple, simply put valid Rust code into a polite block and watch it not compile because it's too rude. To get your code to compile again, just say please! Inserting please into your code will get rustc to compile it again, but don't do it too much or it's gonna think you're too polite!

Why?

I'm the same person that did this. What do you mean why.

Code example

use politeness_macro::polite;

fn main() {
    polite! {
        // println!("hello, world"); // DOES NOT COMPILE

        please println!("hello, world"); // does compile!
    }
}
You might also like...
Time to dive into Rust!

Lets-Learn-Rust Time to dive into Rust! Day 1 Installation Running a Simple Rust Program Managing Projects with Cargo Basic Programming - Comments and

A perfect smoother; A discrete time version of spline smoothing for equally spaced data
A perfect smoother; A discrete time version of spline smoothing for equally spaced data

Whittaker Smoother Aka Whittaker-Henderson, Whittaker-Eilers Smoother is known as the perfect smoother. Its a discrete-time version of spline smoothin

πŸ¦€ A Rust CLI to find the optimal time to meet given a when2meet URL

when3meet πŸ¦€ The Rust when2meet CLI Install | Usage | Contributing & Issues | Docs Built with ❀️ and πŸ¦€ by Garrett Ladley Install cargo install when3m

Construct complex structures within single call + simple compile-time meta-inheritance model with mixins.

Introduction constructivism is a Rust sample-library designed to simplify the construction of structured data by defining and manipulating sequences o

Mindful Time Tracking: Simplify Your Focus and Boost Productivity Effortlessly.
Mindful Time Tracking: Simplify Your Focus and Boost Productivity Effortlessly.

Mindful Time Tracking: Simplify Your Focus and Boost Productivity Effortlessly. About pace is a mindful productivity tool designed to help you keep tr

Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

Stockbook embeds 1-bit raster images in your code at compile time

stockbook Stockbook embeds 1-bit raster images in your code at compile time. Designed primarily for #![no_std] usage, in embedded or other program-mem

Automatically apply the suggestions made by rustc

rustfix The goal of this tool is to read and apply the suggestions made by rustc. Current status Currently, rustfix is split into two crates: rustfix,

Bloat-Free Browser Game in Rust (rustc-only challenge)
Bloat-Free Browser Game in Rust (rustc-only challenge)

Bloat-Free Browser Game in Rust (rustc-only challenge) Don't blame me if this code breaks in 1 year The idea is to make a simple game in Rust as bloat

Shows only the first page of rustc output

cargo-first-page Shows only the first page of rustc output. Installation cargo install cargo-firstpage Usage Prefix the cargo command by firstpage: T

custom rustc/clippy lint framwork

custom rustc lints How to run first need to install binary form source code: cargo install --path . and then in rust project directory you want to ana

fail CI on rustc and clippy warnings without breakage

A crate + github actions template that fails CI on rustc and clippy warnings without breakage.

A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.

salsa A generic framework for on-demand, incrementalized computation. Obligatory warning Very much a WORK IN PROGRESS at this point. Ready for experim

cargo-check This is a wrapper around cargo rustc

cargo-check This is a wrapper around cargo rustc -- -Zno-trans. It can be helpful for running a faster compile if you only need correctness checks. In

Linting your Rust-files in Atom, using rustc and cargo.

linter-rust Linting your Rust-files in Atom, using rustc and cargo. Files will be checked when you open or save them. Installation Install Rust and/or

A rustc plugin to check for numerical instability

Herbie lint for Rust What This plugin can add warnings or errors to your crate when using a numerically unstable floating point expression. Quick exam

Provide expansion of proc-macros, in a way that rustc directs you directly to the issues at hand

expander Expands a proc-macro into a file, and uses a include! directive in place. Advantages Only expands a particular proc-macro, not all of them. I

Easy-to-use grammar-based black-box fuzzer. Has found dozens of bugs in important targets like Clang, Deno, and rustc.

tree-crasher tree-crasher is an easy-to-use grammar-based black-box fuzzer. It parses a number of input files using tree-sitter grammars, and produces

Owner
Rin
Dragon with an internet connection. .NET dev.
Rin
Bitpack a boolean into a pointer using bit magic.

ptr-bool tl;dr: a pointer and boolean with the same size as a pointer. A convenience crate used to bitpack a boolean and pointer into the same eight b

Zack 2 Oct 24, 2022
Safe, comp time generated queries in rust

query_builder For each struct field following methods will be generated. All fields where_FIELDNAME_eq Numeric fields where_FIELDNAME_le where_FIELDNA

Amirreza Askarpour 2 Oct 31, 2021
A real-time mixer

Pagana Pagana is a real-time mixer. This project is still in early stages of development and is not ready for any kind of production use or testing. D

null 1 Nov 26, 2021
Compile time static maps for Rust

Rust-PHF Documentation Rust-PHF is a library to generate efficient lookup tables at compile time using perfect hash functions. It currently uses the C

null 1.3k Jan 1, 2023
Simple time handling in Rust

time Documentation: latest release main branch book Minimum Rust version policy The time crate is guaranteed to compile with any release of rustc from

Time 680 Dec 31, 2022
Fast and simple datetime, date, time and duration parsing for rust.

speedate Fast and simple datetime, date, time and duration parsing for rust. speedate is a lax† RFC 3339 date and time parser, in other words, it pars

Samuel Colvin 43 Nov 25, 2022
Compile-time stuff and other goodies for rustaceans πŸ¦€

?? bagel: Always baked, never fried bagel is a collection of macros and other things that we frequently use at Skytable, primarily to get work done at

Skytable 3 Jul 4, 2022
A real-time data backend for browser-based applications.

DriftDB DriftDB is a real-time data backend for browser-based applications. For more information, see driftdb.com. Structure of this repo docs/: main

drifting in space 453 Feb 6, 2023
Rust crate: Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation.

overloaded_literals   Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation. Features Compile-time vali

Qqwy / Marten 6 Apr 14, 2023
Parses a relative time string and returns a `Duration`

humantime_to_duration A Rust crate for parsing human-readable relative time strings and converting them to a Duration. Features Parses a variety of hu

null 5 Apr 25, 2023