TRPL: Add rust Marker to Some Code Block

This adds strictly more information to the source files and reduces the
need for customized tooling to render the book.

(While this should not change the output of _rustbook_, it is very
useful when rendering the sources with external tools like Pandoc.)
This commit is contained in:
Pascal Hertleif 2015-05-18 20:56:00 +02:00
parent 2dd5ad0be8
commit 6f69cd6387
21 changed files with 72 additions and 71 deletions

View file

@ -89,7 +89,7 @@ So, now we know how to call a method, such as `foo.bar()`. But what about our
original example, `foo.bar().baz()`? This is called method chaining, and we
can do it by returning `self`.
```
```rust
struct Circle {
x: f64,
y: f64,
@ -117,7 +117,7 @@ fn main() {
Check the return type:
```
```rust
# struct Circle;
# impl Circle {
fn grow(&self) -> Circle {
@ -167,7 +167,7 @@ and `y` attributes will be `0.0`, and the `radius` will be `1.0`. Rust doesnt
have method overloading, named arguments, or variable arguments. We employ
the builder pattern instead. It looks like this:
```
```rust
struct Circle {
x: f64,
y: f64,