Skip to content

docs: Stop using norust #14601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/complement-cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.

You might see things like this in C APIs:

~~~ {.notrust}
~~~c
typedef struct Window Window;
Window* createWindow(int width, int height);
~~~
Expand Down
2 changes: 1 addition & 1 deletion src/doc/complement-lang-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ For simplicity, we do not plan to do so. Implementing automatic semicolon insert

**Short answer** set the RUST_LOG environment variable to the name of your source file, sans extension.

```notrust,sh
```sh
rustc hello.rs
export RUST_LOG=hello
./hello
Expand Down
4 changes: 2 additions & 2 deletions src/doc/guide-ffi.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ fn main() {

C code:

~~~~ {.notrust}
~~~~c
typedef void (*rust_callback)(int32_t);
rust_callback cb;

Expand Down Expand Up @@ -296,7 +296,7 @@ fn main() {

C code:

~~~~ {.notrust}
~~~~c
typedef void (*rust_callback)(int32_t);
void* cb_target;
rust_callback cb;
Expand Down
8 changes: 4 additions & 4 deletions src/doc/guide-lifetimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ fn example3() -> int {
To make this clearer, consider this diagram showing the state of
memory immediately before the re-assignment of `x`:

~~~ {.notrust}
~~~ {.text}
Stack Exchange Heap

x +-------------+
Expand All @@ -232,7 +232,7 @@ memory immediately before the re-assignment of `x`:

Once the reassignment occurs, the memory will look like this:

~~~ {.notrust}
~~~ {.text}
Stack Exchange Heap

x +-------------+ +---------+
Expand Down Expand Up @@ -329,7 +329,7 @@ to a pointer of type `&size` into the _interior of the enum_.
To make this more clear, let's look at a diagram of memory layout in
the case where `shape` points at a rectangle:

~~~ {.notrust}
~~~ {.text}
Stack Memory

+-------+ +---------------+
Expand All @@ -354,7 +354,7 @@ to store that shape value would still be valid, _it would have a
different type_! The following diagram shows what memory would look
like if code overwrote `shape` with a circle:

~~~ {.notrust}
~~~ {.text}
Stack Memory

+-------+ +---------------+
Expand Down
6 changes: 3 additions & 3 deletions src/doc/guide-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() {

And now I get an error:

~~~ {.notrust}
~~~text
error: mismatched types: expected `&int` but found `<generic integer #0>` (expected &-ptr but found integral variable)
~~~

Expand Down Expand Up @@ -201,7 +201,7 @@ fn main() {

This prints:

~~~ {.notrust}
~~~text
Cons(1, box Cons(2, box Cons(3, box Nil)))
~~~

Expand Down Expand Up @@ -347,7 +347,7 @@ fn main() {

It gives this error:

~~~ {.notrust}
~~~text
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
test.rs:5 *x -= 1;
^~
Expand Down
18 changes: 9 additions & 9 deletions src/doc/guide-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn return_two_test() {
To run these tests, compile with `rustc --test` and run the resulting
binary:

~~~ {.notrust}
~~~console
$ rustc --test foo.rs
$ ./foo
running 1 test
Expand Down Expand Up @@ -111,7 +111,7 @@ sequentially.

### Typical test run

~~~ {.notrust}
~~~console
$ mytests

running 30 tests
Expand All @@ -125,7 +125,7 @@ result: ok. 28 passed; 0 failed; 2 ignored

### Test run with failures

~~~ {.notrust}
~~~console
$ mytests

running 30 tests
Expand All @@ -139,7 +139,7 @@ result: FAILED. 27 passed; 1 failed; 2 ignored

### Running ignored tests

~~~ {.notrust}
~~~console
$ mytests --ignored

running 2 tests
Expand All @@ -153,7 +153,7 @@ result: FAILED. 1 passed; 1 failed; 0 ignored

Using a plain string:

~~~ {.notrust}
~~~console
$ mytests mytest23

running 1 tests
Expand All @@ -164,7 +164,7 @@ result: ok. 1 passed; 0 failed; 0 ignored

Using some regular expression features:

~~~ {.notrust}
~~~console
$ mytests 'mytest[145]'

running 13 tests
Expand Down Expand Up @@ -247,7 +247,7 @@ Advice on writing benchmarks:
To run benchmarks, pass the `--bench` flag to the compiled
test-runner. Benchmarks are compiled-in but not executed by default.

~~~ {.notrust}
~~~console
$ rustc mytests.rs -O --test
$ mytests --bench

Expand Down Expand Up @@ -283,7 +283,7 @@ fn bench_xor_1000_ints(b: &mut Bencher) {

gives the following results

~~~ {.notrust}
~~~console
running 1 test
test bench_xor_1000_ints ... bench: 0 ns/iter (+/- 0)

Expand Down Expand Up @@ -323,7 +323,7 @@ overhead (e.g. `black_box(&huge_struct)`).
Performing either of the above changes gives the following
benchmarking results

~~~ {.notrust}
~~~console
running 1 test
test bench_xor_1000_ints ... bench: 375 ns/iter (+/- 148)

Expand Down
8 changes: 4 additions & 4 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and is the feature from which many of Rust's powerful capabilities are derived.
write, and ultimately release, memory.
Let's start by looking at some C++ code:

```notrust
```cpp
int* dangling(void)
{
int i = 1234;
Expand Down Expand Up @@ -74,7 +74,7 @@ fn main() {

Save this program as `dangling.rs`. When you try to compile this program with `rustc dangling.rs`, you'll get an interesting (and long) error message:

```notrust
```text
dangling.rs:3:12: 3:14 error: `i` does not live long enough
dangling.rs:3 return &i;
^~
Expand Down Expand Up @@ -155,7 +155,7 @@ You can roughly compare these two lines:
let i = box 1234;
```

```notrust
```cpp
// C++
int *i = new int;
*i = 1234;
Expand Down Expand Up @@ -254,7 +254,7 @@ fn main() {

This will result an error indicating that the value is no longer in scope:

```notrust
```text
concurrency.rs:12:20: 12:27 error: use of moved value: 'numbers'
concurrency.rs:12 println!("{}", numbers.get(0));
^~~~~~~
Expand Down
32 changes: 16 additions & 16 deletions src/doc/po/ja/tutorial.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,15 @@ msgstr "上記条件を満たしていれば、以下のような手順でビル
#: src/doc/tutorial.md:112
#, fuzzy
#| msgid ""
#| "~~~~ {.notrust} $ curl -O http://static.rust-lang.org/dist/rust-nightly.tar."
#| "~~~~console $ curl -O http://static.rust-lang.org/dist/rust-nightly.tar."
#| "gz $ tar -xzf rust-nightly.tar.gz $ cd rust-nightly $ ./configure $ make && make "
#| "install ~~~~"
msgid ""
"~~~~ {.notrust} $ curl -O http://static.rust-lang.org/dist/rust-nightly.tar.gz $ "
"~~~~console $ curl -O http://static.rust-lang.org/dist/rust-nightly.tar.gz $ "
"tar -xzf rust-nightly.tar.gz $ cd rust-nightly $ ./configure $ make && make install "
"~~~~"
msgstr ""
"~~~~ {.notrust}\n"
"~~~~console\n"
"$ curl -O http://static.rust-lang.org/dist/rust-nightly.tar.gz\n"
"$ tar -xzf rust-nightly.tar.gz $ cd rust-nightly $ ./configure\n"
"$ make && make install\n"
Expand Down Expand Up @@ -4610,7 +4610,7 @@ msgstr ""
#: src/doc/tutorial.md:2761 src/doc/tutorial.md:2793
#, fuzzy
#| msgid "~~~~ {.ignore} let foo = 10;"
msgid "~~~ {.notrust} src/plants.rs src/plants/mod.rs"
msgid "~~~text src/plants.rs src/plants/mod.rs"
msgstr ""
"~~~~ {.ignore}\n"
"let foo = 10;"
Expand Down Expand Up @@ -4927,24 +4927,24 @@ msgstr ""
#: src/doc/tutorial.md:3168
#, fuzzy, no-wrap
#| msgid ""
#| "~~~~ {.notrust}\n"
#| "> rustc --lib world.rs # compiles libworld-94839cbfe144198-1.0.so\n"
#| "> rustc main.rs -L . # compiles main\n"
#| "> ./main\n"
#| "~~~~console\n"
#| "$ rustc --lib world.rs # compiles libworld-94839cbfe144198-1.0.so\n"
#| "$ rustc main.rs -L . # compiles main\n"
#| "$ ./main\n"
#| "\"hello world\"\n"
#| "~~~~\n"
msgid ""
"~~~~ {.notrust}\n"
"> rustc --lib world.rs # compiles libworld-<HASH>-0.42.so\n"
"> rustc main.rs -L . # compiles main\n"
"> ./main\n"
"~~~~console\n"
"$ rustc --crate-type=lib world.rs # compiles libworld-<HASH>-0.42.so\n"
"$ rustc main.rs -L . # compiles main\n"
"$ ./main\n"
"\"hello world\"\n"
"~~~~\n"
msgstr ""
"~~~~ {.notrust}\n"
"> rustc --lib world.rs # libworld-94839cbfe144198-1.0.so が生成される\n"
"> rustc main.rs -L . # main が生成される\n"
"> ./main\n"
"~~~~console\n"
"$ rustc --lib world.rs # libworld-94839cbfe144198-1.0.so が生成される\n"
"$ rustc main.rs -L . # main が生成される\n"
"$ ./main\n"
"\"hello world\"\n"
"~~~~\n"

Expand Down
Loading