Skip to content

Commit e302de5

Browse files
authored
Make the code not compile to match the text
> 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).
1 parent db919bc commit e302de5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ch16-02-message-passing.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ want to send over the channel.
3535

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

38-
```rust
38+
```rust,does_not_compile
3939
use std::sync::mpsc;
4040
4141
fn main() {
4242
let (tx, rx) = mpsc::channel();
43-
# tx.send(()).unwrap();
4443
}
4544
```
4645

0 commit comments

Comments
 (0)