Skip to content

Commit ec8fd4b

Browse files
committed
---
yaml --- r: 129017 b: refs/heads/master c: 75396b2 h: refs/heads/master i: 129015: 81a8c22 v: v3
1 parent e289d65 commit ec8fd4b

File tree

200 files changed

+4275
-1795
lines changed

Some content is hidden

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

200 files changed

+4275
-1795
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: b8dc103a950d1dec441e1936b2d7b18457571e1b
2+
refs/heads/master: 75396b2a06a9372ed4ddcc3e5bcf56d18f1973ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a86d9ad15e339ab343a12513f9c90556f677b9ca
55
refs/heads/try: 961753763fb87ddcbbccaec4ea87648608d19a58

trunk/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ then
635635
LLVM_VERSION=$($LLVM_CONFIG --version)
636636

637637
case $LLVM_VERSION in
638-
(3.[2-5]*)
638+
(3.[2-6]*)
639639
msg "found ok version of LLVM: $LLVM_VERSION"
640640
;;
641641
(*)

trunk/src/doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for the 'std' and 'extra' libraries.
1919
To generate HTML documentation from one source file/crate, do something like:
2020

2121
~~~~
22-
rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
22+
rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
2323
~~~~
2424

2525
(This, of course, requires a working build of the `rustdoc` tool.)

trunk/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% The Rust Design FAQ
22

3-
This document describes decisions were arrived at after lengthy discussion and
3+
This document describes decisions that were arrived at after lengthy discussion and
44
experimenting with alternatives. Please do not propose reversing them unless
55
you have a new, extremely compelling argument. Note that this document
66
specifically talks about the *language* and not any library or implementation.

trunk/src/doc/guide-ffi.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,13 @@ Rust code:
263263
264264
~~~~no_run
265265
266+
#[repr(C)]
266267
struct RustObject {
267268
a: i32,
268269
// other members
269270
}
270271
271-
extern fn callback(target: *mut RustObject, a:i32) {
272+
extern "C" fn callback(target: *mut RustObject, a:i32) {
272273
println!("I'm called from C with value {0}", a);
273274
unsafe {
274275
// Update the value in RustObject with the value received from the callback
@@ -506,16 +507,16 @@ to define a block for all windows systems, not just x86 ones.
506507
507508
# Interoperability with foreign code
508509
509-
Rust guarantees that the layout of a `struct` is compatible with the platform's representation in C.
510-
A `#[packed]` attribute is available, which will lay out the struct members without padding.
511-
However, there are currently no guarantees about the layout of an `enum`.
510+
Rust guarantees that the layout of a `struct` is compatible with the platform's representation in C
511+
only if the `#[repr(C)]` attribute is applied to it. `#[repr(C, packed)]` can be used to lay out
512+
struct members without padding. `#[repr(C)]` can also be applied to an enum.
512513
513-
Rust's owned and managed boxes use non-nullable pointers as handles which point to the contained
514+
Rust's owned boxes (`Box<T>`) use non-nullable pointers as handles which point to the contained
514515
object. However, they should not be manually created because they are managed by internal
515-
allocators. References can safely be assumed to be non-nullable pointers directly to the
516-
type. However, breaking the borrow checking or mutability rules is not guaranteed to be safe, so
517-
prefer using raw pointers (`*`) if that's needed because the compiler can't make as many assumptions
518-
about them.
516+
allocators. References can safely be assumed to be non-nullable pointers directly to the type.
517+
However, breaking the borrow checking or mutability rules is not guaranteed to be safe, so prefer
518+
using raw pointers (`*`) if that's needed because the compiler can't make as many assumptions about
519+
them.
519520
520521
Vectors and strings share the same basic memory layout, and utilities are available in the `vec` and
521522
`str` modules for working with C APIs. However, strings are not terminated with `\0`. If you need a

trunk/src/doc/guide-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ let z = &x;
332332
Mutable ones, however, are not:
333333

334334
```{rust,ignore}
335-
let x = 5i;
335+
let mut x = 5i;
336336
let y = &mut x;
337337
let z = &mut x; // error: cannot borrow `x` as mutable more than once at a time
338338
```

trunk/src/doc/guide-tasks.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ closure in the new task.
8989
fn print_message() { println!("I am running in a different task!"); }
9090
spawn(print_message);
9191
92-
// Print something profound in a different task using a `proc` expression
92+
// Alternatively, use a `proc` expression instead of a named function.
9393
// The `proc` expression evaluates to an (unnamed) owned closure.
9494
// That closure will call `println!(...)` when the spawned task runs.
95-
9695
spawn(proc() println!("I am also running in a different task!") );
9796
~~~~
9897

@@ -352,14 +351,14 @@ fn main() {
352351

353352
The function `pnorm` performs a simple computation on the vector (it computes the sum of its items
354353
at the power given as argument and takes the inverse power of this value). The Arc on the vector is
355-
created by the line
354+
created by the line:
356355

357356
~~~
358357
# use std::rand;
359358
# use std::sync::Arc;
360359
# fn main() {
361360
# let numbers = Vec::from_fn(1000000, |_| rand::random::<f64>());
362-
let numbers_arc=Arc::new(numbers);
361+
let numbers_arc = Arc::new(numbers);
363362
# }
364363
~~~
365364

trunk/src/doc/guide-unsafe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ possible in two ways: the `#[start]` attribute, or overriding the
446446
default shim for the C `main` function with your own.
447447

448448
The function marked `#[start]` is passed the command line parameters
449-
in the same format as a C:
449+
in the same format as C:
450450

451451
```
452452
#![no_std]
@@ -593,7 +593,7 @@ standard library itself.
593593
# Interacting with the compiler internals
594594

595595
> **Note**: this section is specific to the `rustc` compiler; these
596-
> parts of the language may never be full specified and so details may
596+
> parts of the language may never be fully specified and so details may
597597
> differ wildly between implementations (and even versions of `rustc`
598598
> itself).
599599
>

0 commit comments

Comments
 (0)