Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off the playground in a bunch more lib.rs inclusions #2569

Merged
merged 1 commit into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ or even see which fruit they’ll get.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-09/src/lib.rs}}
```

Expand All @@ -240,7 +240,7 @@ only need the `pub` before the `enum` keyword, as shown in Listing 7-10.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-10/src/lib.rs}}
```

Expand Down
8 changes: 4 additions & 4 deletions src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ different parent modules and how to refer to them.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-15/src/lib.rs:here}}
```

Expand All @@ -109,7 +109,7 @@ code in Listing 7-15 by renaming one of the two `Result` types using `as`.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-16/src/lib.rs:here}}
```

Expand Down Expand Up @@ -244,7 +244,7 @@ two `use` statements that share a subpath. For example, Listing 7-19 shows two

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-19/src/lib.rs}}
```

Expand All @@ -257,7 +257,7 @@ the nested path, as shown in Listing 7-20.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-20/src/lib.rs}}
```

Expand Down
10 changes: 5 additions & 5 deletions src/ch10-02-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ need a summary from each type, and we need to request that summary by calling a

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch10-generic-types-traits-and-lifetimes/listing-10-12/src/lib.rs}}
```

Expand Down Expand Up @@ -62,7 +62,7 @@ already limited to 280 characters.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch10-generic-types-traits-and-lifetimes/listing-10-13/src/lib.rs:here}}
```

Expand Down Expand Up @@ -130,7 +130,7 @@ in Listing 10-12.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch10-generic-types-traits-and-lifetimes/listing-10-14/src/lib.rs:here}}
```

Expand Down Expand Up @@ -166,7 +166,7 @@ a small part of it. For example, we could define the `Summary` trait to have a
`summarize` method that has a default implementation that calls the
`summarize_author` method:

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch10-generic-types-traits-and-lifetimes/no-listing-03-default-impl-calls-other-methods/src/lib.rs:here}}
```

Expand Down Expand Up @@ -416,7 +416,7 @@ the `Display` trait that enables printing.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/src/lib.rs}}
```

Expand Down
2 changes: 1 addition & 1 deletion src/ch11-02-running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ To demonstrate how to run a subset of tests, we’ll create three tests for our

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch11-writing-automated-tests/listing-11-11/src/lib.rs}}
```

Expand Down
2 changes: 1 addition & 1 deletion src/ch11-03-test-organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ this chapter, Cargo generated this code for us:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch11-writing-automated-tests/listing-11-01/src/lib.rs:here}}
```

Expand Down
4 changes: 2 additions & 2 deletions src/ch14-03-cargo-workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ In the *add-one/src/lib.rs* file, let’s add an `add_one` function:

<span class="filename">Filename: add-one/src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch14-more-about-cargo/no-listing-02-workspace-with-two-crates/add/add-one/src/lib.rs}}
```

Expand Down Expand Up @@ -285,7 +285,7 @@ within the `add_one` crate:

<span class="filename">Filename: add-one/src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch14-more-about-cargo/no-listing-04-workspace-with-tests/add/add-one/src/lib.rs}}
```

Expand Down
2 changes: 1 addition & 1 deletion src/ch15-05-interior-mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ called `Messenger`. Listing 15-20 shows the library code:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch15-smart-pointers/listing-15-20/src/lib.rs}}
```

Expand Down
4 changes: 2 additions & 2 deletions src/ch17-01-what-is-oo.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cache the calculated average for us. Listing 17-1 has the definition of the

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-01/src/lib.rs}}
```

Expand All @@ -62,7 +62,7 @@ on the struct, as shown in Listing 17-2:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-02/src/lib.rs:here}}
```

Expand Down
8 changes: 4 additions & 4 deletions src/ch17-02-trait-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Listing 17-3 shows how to define a trait named `Draw` with one method named

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-03/src/lib.rs}}
```

Expand All @@ -82,7 +82,7 @@ a `Box` that implements the `Draw` trait.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-04/src/lib.rs:here}}
```

Expand All @@ -95,7 +95,7 @@ On the `Screen` struct, we’ll define a method named `run` that will call the

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-05/src/lib.rs:here}}
```

Expand All @@ -111,7 +111,7 @@ as in Listing 17-6:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-06/src/lib.rs:here}}
```

Expand Down
10 changes: 5 additions & 5 deletions src/ch17-03-oo-design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ inside an `Option<T>` in a private field named `state`. You’ll see why the

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-12/src/lib.rs}}
```

Expand Down Expand Up @@ -209,7 +209,7 @@ state is approved, as shown in Listing 17-16:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-16/src/lib.rs:here}}
```

Expand Down Expand Up @@ -267,7 +267,7 @@ Listing 17-18:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-18/src/lib.rs:here}}
```

Expand Down Expand Up @@ -375,7 +375,7 @@ as well as methods on each:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-19/src/lib.rs}}
```

Expand Down Expand Up @@ -411,7 +411,7 @@ shown in Listing 17-20:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch17-oop/listing-17-20/src/lib.rs:here}}
```

Expand Down
6 changes: 3 additions & 3 deletions src/ch19-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Method”][the-iterator-trait-and-the-next-method]<!-- ignore --> section of
Chapter 13, we mentioned that the definition of the `Iterator` trait is as
shown in Listing 19-12.

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/listing-19-12/src/lib.rs}}
```

Expand Down Expand Up @@ -56,7 +56,7 @@ Listing 13-21, we specified that the `Item` type was `u32`:
This syntax seems comparable to that of generics. So why not just define the
`Iterator` trait with generics, as shown in Listing 19-13?

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/listing-19-13/src/lib.rs}}
```

Expand Down Expand Up @@ -143,7 +143,7 @@ implementation of `Add` do the conversion correctly. We can implement `Add` for

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/listing-19-15/src/lib.rs}}
```

Expand Down
2 changes: 1 addition & 1 deletion src/ch19-04-advanced-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ possible I/O errors. Many of the functions in `std::io` will be returning
`Result<T, E>` where the `E` is `std::io::Error`, such as these functions in
the `Write` trait:

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/no-listing-05-write-trait/src/lib.rs}}
```

Expand Down
2 changes: 1 addition & 1 deletion src/ch19-05-advanced-functions-and-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The error references the `Sized` trait again! Rust doesn’t know how much space
it will need to store the closure. We saw a solution to this problem earlier.
We can use a trait object:

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/no-listing-19-returns-closure-trait-object/src/lib.rs}}
```

Expand Down
4 changes: 2 additions & 2 deletions src/ch19-06-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Listing 19-28 shows a slightly simplified definition of the `vec!` macro.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/listing-19-28/src/lib.rs}}
```

Expand Down Expand Up @@ -230,7 +230,7 @@ Next, we’ll define the `HelloMacro` trait and its associated function:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch19-advanced-features/no-listing-20-impl-hellomacro-for-pancakes/hello_macro/src/lib.rs}}
```

Expand Down
4 changes: 2 additions & 2 deletions src/ch20-02-multithreaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ definition of a `ThreadPool` struct that we can have for now:

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch20-web-server/no-listing-01-define-threadpool-struct/src/lib.rs}}
```

Expand Down Expand Up @@ -559,7 +559,7 @@ shown in Listing 20-20 to `Worker::new`.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,noplayground
{{#rustdoc_include ../listings/ch20-web-server/listing-20-20/src/lib.rs:here}}
```

Expand Down