Skip to content

Commit 3b66feb

Browse files
committed
---
yaml --- r: 195191 b: refs/heads/tmp c: ce668a8 h: refs/heads/master i: 195189: 636fec5 195187: 3a7b04e 195183: 6bccf7e v: v3
1 parent 598f3f5 commit 3b66feb

File tree

125 files changed

+1252
-2212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1252
-2212
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: d8be84eb4499e21bd98a3500c8760540996df23b
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: fbbf02db1cf457b0d9bde88510297bc4a39f6501
37+
refs/heads/tmp: ce668a873ef8a27e3536f6c981aee364edfe5116
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: 53a183f0274316596bf9405944d4f0468d8c93e4
4040
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/compiletest/util.rs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,33 @@ use common::Config;
1313

1414
/// Conversion table from triple OS name to Rust SYSNAME
1515
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
16-
("android", "android"),
17-
("bitrig", "bitrig"),
18-
("darwin", "macos"),
19-
("dragonfly", "dragonfly"),
20-
("freebsd", "freebsd"),
21-
("ios", "ios"),
22-
("linux", "linux"),
2316
("mingw32", "windows"),
24-
("openbsd", "openbsd"),
2517
("win32", "windows"),
2618
("windows", "windows"),
19+
("darwin", "macos"),
20+
("android", "android"),
21+
("linux", "linux"),
22+
("freebsd", "freebsd"),
23+
("dragonfly", "dragonfly"),
24+
("bitrig", "bitrig"),
25+
("openbsd", "openbsd"),
2726
];
2827

2928
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
30-
("aarch64", "aarch64"),
31-
("amd64", "x86_64"),
32-
("arm", "arm"),
33-
("arm64", "aarch64"),
34-
("hexagon", "hexagon"),
3529
("i386", "x86"),
3630
("i686", "x86"),
31+
("amd64", "x86_64"),
32+
("x86_64", "x86_64"),
33+
("sparc", "sparc"),
34+
("powerpc", "powerpc"),
35+
("arm64", "aarch64"),
36+
("arm", "arm"),
37+
("aarch64", "aarch64"),
3738
("mips", "mips"),
39+
("xcore", "xcore"),
3840
("msp430", "msp430"),
39-
("powerpc", "powerpc"),
41+
("hexagon", "hexagon"),
4042
("s390x", "systemz"),
41-
("sparc", "sparc"),
42-
("x86_64", "x86_64"),
43-
("xcore", "xcore"),
4443
];
4544

4645
pub fn get_os(triple: &str) -> &'static str {

branches/tmp/src/doc/trpl/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ navigate through the menu on the left.
1111
<h2 class="section-header"><a href="basic.html">Basics</a></h2>
1212

1313
This section is a linear introduction to the basic syntax and semantics of
14-
Rust. It has individual sections on each part of Rust's syntax.
14+
Rust. It has individual sections on each part of Rust's syntax, and culminates
15+
in a small project: a guessing game.
1516

1617
After reading "Basics," you will have a good foundation to learn more about
1718
Rust, and can write very simple programs.
@@ -28,12 +29,7 @@ and will be able to understand most Rust code and write more complex programs.
2829

2930
In a similar fashion to "Intermediate," this section is full of individual,
3031
deep-dive chapters, which stand alone and can be read in any order. These
31-
chapters focus on the most complex features,
32+
chapters focus on the most complex features, as well as some things that
33+
are only available in upcoming versions of Rust.
3234

33-
<h2 class="section-header"><a href="unstable.html">Unstable</a></h2>
34-
35-
In a similar fashion to "Intermediate," this section is full of individual,
36-
deep-dive chapters, which stand alone and can be read in any order.
37-
38-
This chapter contains things that are only available on the nightly channel of
39-
Rust.
35+
After reading "Advanced," you'll be a Rust expert!

branches/tmp/src/doc/trpl/SUMMARY.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
* [FFI](ffi.md)
3737
* [Unsafe Code](unsafe.md)
3838
* [Advanced Macros](advanced-macros.md)
39-
* [Unstable Rust](unstable.md)
4039
* [Compiler Plugins](plugins.md)
41-
* [Inline Assembly](inline-assembly.md)
42-
* [No stdlib](no-stdlib.md)
43-
* [Intrinsics](intrinsics.md)
44-
* [Lang items](lang-items.md)
45-
* [Link args](link-args.md)
4640
* [Conclusion](conclusion.md)
4741
* [Glossary](glossary.md)

branches/tmp/src/doc/trpl/advanced-macros.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ the [Bitwise Cyclic Tag](http://esolangs.org/wiki/Bitwise_Cyclic_Tag) automaton
206206
within Rust's macro system.
207207

208208
```rust
209+
#![feature(trace_macros)]
210+
209211
macro_rules! bct {
210212
// cmd 0: d ... => ...
211213
(0, $($ps:tt),* ; $_d:tt)
@@ -227,6 +229,13 @@ macro_rules! bct {
227229
( $($ps:tt),* ; )
228230
=> (());
229231
}
232+
233+
fn main() {
234+
trace_macros!(true);
235+
# /* just check the definition
236+
bct!(0, 0, 1, 1, 1 ; 1, 0, 1);
237+
# */
238+
}
230239
```
231240

232241
Exercise: use macros to reduce duplication in the above definition of the

branches/tmp/src/doc/trpl/arrays-vectors-and-slices.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,7 @@ You can also take a slice of a vector, `String`, or `&str`, because they are
9999
backed by arrays. Slices have type `&[T]`, which we'll talk about when we cover
100100
generics.
101101

102-
We have now learned all of the most basic Rust concepts. Next, we learn how to
103-
get input from the keyboard.
102+
We have now learned all of the most basic Rust concepts. We're ready to start
103+
building ourselves a guessing game, we just need to know one last thing: how to
104+
get input from the keyboard. You can't have a guessing game without the ability
105+
to guess!

branches/tmp/src/doc/trpl/basic.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
% Basics
22

33
This section is a linear introduction to the basic syntax and semantics of
4-
Rust. It has individual sections on each part of Rust's syntax.
4+
Rust. It has individual sections on each part of Rust's syntax, and cumulates
5+
in a small project: a guessing game.
56

67
After reading "Basics," you will have a good foundation to learn more about
78
Rust, and can write very simple programs.

branches/tmp/src/doc/trpl/compound-data-types.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,5 @@ and brittle `if`/`else`s.
361361

362362
[arity]: ./glossary.html#arity
363363
[match]: ./match.html
364+
[game]: ./guessing-game.html#comparing-guesses
364365
[generics]: ./generics.html

branches/tmp/src/doc/trpl/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ Here’s an example of documenting a macro:
352352
/// # }
353353
/// ```
354354
///
355-
/// ```should_panic
355+
/// ```should_fail
356356
/// # #[macro_use] extern crate foo;
357357
/// # fn main() {
358358
/// panic_unless!(true == false, “I’m broken.”);

branches/tmp/src/doc/trpl/ffi.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,31 @@ A few examples of how this model can be used are:
366366
367367
On OSX, frameworks behave with the same semantics as a dynamic library.
368368
369+
## The `link_args` attribute
370+
371+
There is one other way to tell rustc how to customize linking, and that is via
372+
the `link_args` attribute. This attribute is applied to `extern` blocks and
373+
specifies raw flags which need to get passed to the linker when producing an
374+
artifact. An example usage would be:
375+
376+
``` no_run
377+
#![feature(link_args)]
378+
379+
#[link_args = "-foo -bar -baz"]
380+
extern {}
381+
# fn main() {}
382+
```
383+
384+
Note that this feature is currently hidden behind the `feature(link_args)` gate
385+
because this is not a sanctioned way of performing linking. Right now rustc
386+
shells out to the system linker, so it makes sense to provide extra command line
387+
arguments, but this will not always be the case. In the future rustc may use
388+
LLVM directly to link native libraries in which case `link_args` will have no
389+
meaning.
390+
391+
It is highly recommended to *not* use this attribute, and rather use the more
392+
formal `#[link(...)]` attribute on `extern` blocks instead.
393+
369394
# Unsafe blocks
370395

371396
Some operations, like dereferencing unsafe pointers or calling functions that have been marked

branches/tmp/src/doc/trpl/inline-assembly.md

Lines changed: 0 additions & 141 deletions
This file was deleted.

branches/tmp/src/doc/trpl/intrinsics.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)