Auto merge of #12287 - yerke:yerke/fix-cargo-script-example, r=epage

cargo script example needs nightly -Zscript feature

### What does this PR try to resolve?
Update cargo script example. Cargo script currently needs nightly `-Zscript` feature.
Without this change users will see:
```
error: running `./cargo_script.rs` requires `-Zscript`
```

cc https://github.com/rust-lang/cargo/issues/12207

### How should we test and review this PR?
I don't think any additional tests are needed. All existing tests for cargo script already use `-Zscript`.

### Additional information
Thanks for designing and implementing cargo script `@epage!`
This commit is contained in:
bors 2023-06-23 00:08:33 +00:00
commit ac78f60231

View File

@ -1394,7 +1394,7 @@ fn main() {}
A user may optionally specify a manifest in a `cargo` code fence in a module-level comment, like:
```rust
#!/usr/bin/env cargo
#!/usr/bin/env -S cargo +nightly -Zscript
//! ```cargo
//! [dependencies]