Skip to content

Commit 2defebd

Browse files
committed
---
yaml --- r: 195166 b: refs/heads/tmp c: 71386e5 h: refs/heads/master v: v3
1 parent 1bf48f8 commit 2defebd

File tree

103 files changed

+1082
-2725
lines changed

Some content is hidden

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

103 files changed

+1082
-2725
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: 4bd15522968c467d41fd843534b10a02ba44ccea
37+
refs/heads/tmp: 71386e5774244574045bdf6f837ddc31c5f6cc91
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 & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +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-
("mingw32", "windows"),
17-
("win32", "windows"),
18-
("windows", "windows"),
19-
("darwin", "macos"),
2016
("android", "android"),
21-
("linux", "linux"),
22-
("freebsd", "freebsd"),
23-
("dragonfly", "dragonfly"),
2417
("bitrig", "bitrig"),
18+
("darwin", "macos"),
19+
("dragonfly", "dragonfly"),
20+
("freebsd", "freebsd"),
21+
("linux", "linux"),
22+
("mingw32", "windows"),
2523
("openbsd", "openbsd"),
24+
("win32", "windows"),
25+
("windows", "windows"),
2626
];
2727

2828
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
29-
("i386", "x86"),
30-
("i686", "x86"),
29+
("aarch64", "aarch64"),
3130
("amd64", "x86_64"),
32-
("x86_64", "x86_64"),
33-
("sparc", "sparc"),
34-
("powerpc", "powerpc"),
35-
("arm64", "aarch64"),
3631
("arm", "arm"),
37-
("aarch64", "aarch64"),
32+
("arm64", "aarch64"),
33+
("hexagon", "hexagon"),
34+
("i386", "x86"),
35+
("i686", "x86"),
3836
("mips", "mips"),
39-
("xcore", "xcore"),
4037
("msp430", "msp430"),
41-
("hexagon", "hexagon"),
38+
("powerpc", "powerpc"),
4239
("s390x", "systemz"),
40+
("sparc", "sparc"),
41+
("x86_64", "x86_64"),
42+
("xcore", "xcore"),
4343
];
4444

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

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@ and will be able to understand most Rust code and write more complex programs.
2929

3030
In a similar fashion to "Intermediate," this section is full of individual,
3131
deep-dive chapters, which stand alone and can be read in any order. These
32-
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.
3334

34-
<h2 class="section-header"><a href="unstable.html">Unstable</a></h2>
35-
36-
In a similar fashion to "Intermediate," this section is full of individual,
37-
deep-dive chapters, which stand alone and can be read in any order.
38-
39-
This chapter contains things that are only available on the nightly channel of
40-
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/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.

branches/tmp/src/doc/trpl/lang-items.md

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

0 commit comments

Comments
 (0)