Skip to content

Commit 7476a90

Browse files
committed
---
yaml --- r: 194671 b: refs/heads/master c: c5b8763 h: refs/heads/master i: 194669: 2044e8f 194667: 8b9e772 194663: 47edbc5 194655: 17f16fb v: v3
1 parent e3e2718 commit 7476a90

File tree

97 files changed

+1007
-2602
lines changed

Some content is hidden

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

97 files changed

+1007
-2602
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 8eb918e9701f927fde42d0f2ea0ab4438bbd6c79
2+
refs/heads/master: c5b876375312410c6e0df6e72155c8d0fac62c2c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 552080181c58beef03493a110b4a38b20b6b5da5
55
refs/heads/try: 961e0358e1a5c0faaef606e31e9965742c1643bf

trunk/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!

trunk/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)

trunk/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

trunk/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

trunk/src/doc/trpl/inline-assembly.md

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

trunk/src/doc/trpl/intrinsics.md

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

trunk/src/doc/trpl/lang-items.md

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

trunk/src/doc/trpl/link-args.md

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

0 commit comments

Comments
 (0)