overflow-error 0.4.1

Common overflow error types
Documentation
VERSIONS = nightly beta stable 1.25.0

check: $(addprefix check_, $(VERSIONS))
build: $(addprefix build_, $(VERSIONS))
test: $(addprefix test_, $(VERSIONS))

clippy: clippy_nightly
rustfmt: rustfmt_nightly

rustup_%:
	rustup update $*

check_%: rustup_%
	cargo +$* check --no-default-features
	cargo +$* check

build_%: rustup_%
	cargo +$* build --no-default-features
	cargo +$* build

test_%: rustup_%
	cargo +$* test --no-default-features
	cargo +$* test

clippy_%: rustup_% cargo_clippy_%
	cargo +$* clippy --all-features -- -Dclippy

rustfmt_%: rustup_% cargo_fmt_%
	cargo +$* fmt -- --write-mode=diff

cargo_clippy_%: rustup_%
	cargo +nightly clippy --help >/dev/null || cargo +nightly install --force clippy

cargo_fmt_%: rustup_%
	rustup component add --toolchain $* rustfmt-preview