mirror of
https://github.com/rust-lang/book.git
synced 2026-12-03 06:35:06 -06:00
Disable playground button on listings in ch 12 that use CLI args
You can't pass CLI args to the playground, so it doesn't make sense to run them in the browser. Also, these were marked as should_panic, because if you *do* run them in the browser or without arguments, they panic, but that's not the happy path we're writing, so "should" panic isn't really correct. Fixes #2370.
This commit is contained in:
@@ -102,7 +102,7 @@ throughout the rest of the program. We do that in Listing 12-2.
|
||||
|
||||
<span class="filename">Filename: src/main.rs</span>
|
||||
|
||||
```rust,should_panic
|
||||
```rust,noplayground
|
||||
{{#rustdoc_include ../listings/ch12-an-io-project/listing-12-02/src/main.rs}}
|
||||
```
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ shown in Listing 12-4.
|
||||
|
||||
<span class="filename">Filename: src/main.rs</span>
|
||||
|
||||
```rust,should_panic
|
||||
```rust,noplayground
|
||||
{{#rustdoc_include ../listings/ch12-an-io-project/listing-12-04/src/main.rs:here}}
|
||||
```
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ Listing 12-6 shows the improvements to the `parse_config` function.
|
||||
|
||||
<span class="filename">Filename: src/main.rs</span>
|
||||
|
||||
```rust,should_panic
|
||||
```rust,noplayground
|
||||
{{#rustdoc_include ../listings/ch12-an-io-project/listing-12-06/src/main.rs:here}}
|
||||
```
|
||||
|
||||
@@ -187,7 +187,7 @@ shows the changes we need to make.
|
||||
|
||||
<span class="filename">Filename: src/main.rs</span>
|
||||
|
||||
```rust,should_panic
|
||||
```rust,noplayground
|
||||
{{#rustdoc_include ../listings/ch12-an-io-project/listing-12-07/src/main.rs:here}}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user