mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 19:54:34 -06:00
Fix a few more places where stdout text should be bash highlighting
Fixes #139.
This commit is contained in:
@@ -75,7 +75,7 @@ let sum = x + y;
|
||||
|
||||
This will not compile. We get an error message like this:
|
||||
|
||||
```text
|
||||
```bash
|
||||
error: the trait bound `i8: std::ops::Add<std::option::Option<i8>>` is not
|
||||
satisfied [E0277]
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ fn plus_one(x: Option<i32>) -> Option<i32> {
|
||||
A bug! We didn't handle the `None` case. Luckily, it's a bug Rust knows how to
|
||||
catch. If we try to compile this code, we'll get an error:
|
||||
|
||||
```text
|
||||
```bash
|
||||
error: non-exhaustive patterns: `None` not covered [E0004]
|
||||
match x {
|
||||
Some(i) => Some(i + 1),
|
||||
|
||||
@@ -36,7 +36,7 @@ example, a program with only this:
|
||||
|
||||
Will give a compiler error:
|
||||
|
||||
```text
|
||||
```bash
|
||||
src/main.rs:1:1: 1:27 error: expected item after doc comment
|
||||
src/main.rs:1 /// What am I documenting?
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -169,7 +169,7 @@ fn foo<T>(x: T) {
|
||||
|
||||
We'll get an error:
|
||||
|
||||
```text
|
||||
```bash
|
||||
error: the trait `core::fmt::Display` is not implemented for the type `T` [E0277]
|
||||
println!("x is: {}", x);
|
||||
^
|
||||
|
||||
Reference in New Issue
Block a user