mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 21:31:17 -06:00
Change some lingering uses of bash syntax highlighting to text
This commit is contained in:
@@ -235,7 +235,7 @@ let p = Point { x: 5, y: 20.0 };
|
|||||||
results in a compile-time error that indicates the type of `y` must match the
|
results in a compile-time error that indicates the type of `y` must match the
|
||||||
type of `x`:
|
type of `x`:
|
||||||
|
|
||||||
```bash
|
```text
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
|
|
|
|
||||||
7 | let p = Point { x: 5, y: 20.0 };
|
7 | let p = Point { x: 5, y: 20.0 };
|
||||||
@@ -352,7 +352,7 @@ Listing 10-3: A `show_anything` function definition that does not yet compile
|
|||||||
|
|
||||||
Compiling this definition results in an error:
|
Compiling this definition results in an error:
|
||||||
|
|
||||||
```bash
|
```text
|
||||||
error[E0277]: the trait bound `T: std::fmt::Display` is not satisfied
|
error[E0277]: the trait bound `T: std::fmt::Display` is not satisfied
|
||||||
--> <anon>:3:37
|
--> <anon>:3:37
|
||||||
|
|
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ If we implement the `Printable` trait on other types, we can use them with the
|
|||||||
which does *not* implement the `Printable` trait, we get a compile-time error
|
which does *not* implement the `Printable` trait, we get a compile-time error
|
||||||
that looks like this:
|
that looks like this:
|
||||||
|
|
||||||
```bash
|
```text
|
||||||
error[E0277]: the trait bound `{integer}: Printable` is not satisfied
|
error[E0277]: the trait bound `{integer}: Printable` is not satisfied
|
||||||
|
|
|
|
||||||
29 | print_anything(3);
|
29 | print_anything(3);
|
||||||
@@ -251,7 +251,7 @@ When trait bounds start getting complicated, there is another syntax that's a
|
|||||||
bit cleaner: `where`. And in fact, the error we got when we ran the code from
|
bit cleaner: `where`. And in fact, the error we got when we ran the code from
|
||||||
Listing 10-3 referred to it:
|
Listing 10-3 referred to it:
|
||||||
|
|
||||||
```bash
|
```text
|
||||||
help: consider adding a `where T: std::fmt::Display` bound
|
help: consider adding a `where T: std::fmt::Display` bound
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user