Skip to content

Commit d5939c4

Browse files
committed
---
yaml --- r: 129500 b: refs/heads/snap-stage3 c: 03fd90b h: refs/heads/master v: v3
1 parent efded4e commit d5939c4

File tree

145 files changed

+3642
-1562
lines changed

Some content is hidden

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

145 files changed

+3642
-1562
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 566b470e138e929e8a93d613372db1ba177c494f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 9a43492f59bfc38ed819e361c3cf99aa7b972e15
4+
refs/heads/snap-stage3: 03fd90be459650160a4edefbc78588a938db2f8c
55
refs/heads/try: 80b45ddbd351f0a4a939c3a3c4e20b4defec4b35
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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
(*)

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use header;
1717
use procsrv;
1818
use util::logv;
1919
#[cfg(target_os = "windows")]
20-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
2120
use util;
2221

2322
use std::io::File;
@@ -819,7 +818,6 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
819818
}).collect::<Vec<String> >();
820819

821820
#[cfg(target_os = "windows")]
822-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
823821
fn to_lower( s : &str ) -> String {
824822
let i = s.chars();
825823
let c : Vec<char> = i.map( |c| {
@@ -833,7 +831,6 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
833831
}
834832

835833
#[cfg(target_os = "windows")]
836-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
837834
fn prefix_matches( line : &str, prefix : &str ) -> bool {
838835
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
839836
}
@@ -1251,15 +1248,13 @@ fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
12511248
}
12521249

12531250
#[cfg(target_os = "windows")]
1254-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12551251
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
12561252
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
12571253
}
12581254

12591255
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
12601256
// for diagnostic purposes
12611257
#[cfg(target_os = "windows")]
1262-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12631258
fn lib_path_cmd_prefix(path: &str) -> String {
12641259
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
12651260
}

branches/snap-stage3/src/compiletest/util.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use common::Config;
1212

1313
#[cfg(target_os = "windows")]
14-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
1514
use std::os::getenv;
1615

1716
/// Conversion table from triple OS name to Rust SYSNAME
@@ -36,7 +35,6 @@ pub fn get_os(triple: &str) -> &'static str {
3635
}
3736

3837
#[cfg(target_os = "windows")]
39-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
4038
pub fn make_new_path(path: &str) -> String {
4139

4240
// Windows just uses PATH as the library search path, so we have to
@@ -50,11 +48,9 @@ pub fn make_new_path(path: &str) -> String {
5048
}
5149

5250
#[cfg(target_os = "windows")]
53-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
5451
pub fn lib_path_env_var() -> &'static str { "PATH" }
5552

5653
#[cfg(target_os = "windows")]
57-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
5854
pub fn path_div() -> &'static str { ";" }
5955

6056
pub fn logv(config: &Config, s: String) {

branches/snap-stage3/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.

branches/snap-stage3/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

branches/snap-stage3/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
```

branches/snap-stage3/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

branches/snap-stage3/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)