1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Cargo subcommand to forward commands to the nightly toolchain.
//!
//! This extension enables nightly toolchain usage in cargo aliases by
//! providing a `cargo-nightly` subcommand that forwards all arguments to
//! `cargo +nightly <args>`.
//!
//! ## Why it exists
//!
//! Cargo aliases in `.cargo/config.toml` cannot directly use `+nightly`
//! syntax because cargo aliases can only invoke cargo subcommands, not
//! external commands or toolchain selectors. This plugin provides a
//! `cargo-nightly` subcommand that forwards all arguments to
//! `cargo +nightly <args>`, making it possible to use nightly toolchain
//! commands through cargo aliases.
//!
//! ## Usage
//!
//! Once installed, you can use it directly:
//!
//! ```bash
//! cargo nightly clippy
//! cargo nightly check
//! ```
//!
//! Or through aliases in `.cargo/config.toml`:
//!
//! ```toml
//! [alias]
//! clippy2 = "nightly clippy"
//! check2 = "nightly clippy"
//! ```
use env;
use ;