Skip to content

Commit

Permalink
Make the code not compile to match the text
Browse files Browse the repository at this point in the history
> First, in Listing 16-6, we’ll create a channel but not do anything with it.
Note that this won’t compile yet because Rust can’t tell what type of values we
want to send over the channel.

That was not true, however, since the code compiled due to hidden line.
This change makes the code not compile by removing it.

I did not add "ignore" alongside "does_not_compile" to allow readers to see the error message if they try to run the code (that's what the flag does, right? Couldn't find a documentation for it).
  • Loading branch information
aleksator authored Apr 20, 2019
1 parent db919bc commit e302de5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ch16-02-message-passing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ want to send over the channel.

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

```rust
```rust,does_not_compile
use std::sync::mpsc;
fn main() {
let (tx, rx) = mpsc::channel();
# tx.send(()).unwrap();
}
```

Expand Down

0 comments on commit e302de5

Please sign in to comment.