Skip to content

Commit

Permalink
Auto merge of #12287 - yerke:yerke/fix-cargo-script-example, r=epage
Browse files Browse the repository at this point in the history
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 #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!`
  • Loading branch information
bors committed Jun 23, 2023
2 parents 2035d0d + 4fb22dd commit ac78f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ac78f60

Please sign in to comment.