Clippy mode
It would be useful to have a clippy mode which runs clippy on the script, ideally clippy args could be supplied (especially as -A has no alternative in a config file).
This could be used to run on purposely "imperfect" code to show the messages that rust compiler/clippy provide for the sample code.
The just released version 0.23.0 allows using -p/--package to print out the path to the generated package, without any build step.
This allows flexibility, like cargo clippy --manifest-path $(rust-script -p test.rs)/Cargo.toml.
It might still makes sense to have a parameter shortcut for clippy.
That is a very helpful addition, but using it inside a $(..) makes it unix shell specific. Also as "cargo" and "rust-script" are two commands, to reduce chance of user environment causing odd behaviour it needs to be rustup run stable cargo clippy --manifest-path $(rust-script --toolchain stable -p test.rs)/Cargo.toml.
Something like rust-script --toolchain stable test.rs --clippy -- <clippy args> would be much simpler, and more suitable to put into documentation for users to run to reproduce what the docs are explaining.