Skip to content

Commit 3a255b4

Browse files
committed
---
yaml --- r: 129527 b: refs/heads/snap-stage3 c: fde41a3 h: refs/heads/master i: 129525: e90d02c 129523: 12d6d96 129519: 3794d88 v: v3
1 parent 2c05330 commit 3a255b4

File tree

159 files changed

+1697
-4147
lines changed

Some content is hidden

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

159 files changed

+1697
-4147
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: 9e8c30c5530eb73ced57426a357e5456bfa38fcb
4+
refs/heads/snap-stage3: fde41a3f7026023ef968a41bcb256dc96a384e09
55
refs/heads/try: 80b45ddbd351f0a4a939c3a3c4e20b4defec4b35
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/ms
7171
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
7272
4. From there just navigate to where you have Rust's source code, configure and build it:
7373

74-
$ ./configure
74+
$ ./configure --build=i686-pc-mingw32
7575
$ make && make install
7676

7777
[repo]: https://github.com/rust-lang/rust

branches/snap-stage3/configure

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,13 @@ case $CFG_OSTYPE in
299299
CFG_OSTYPE=apple-darwin
300300
;;
301301

302-
MINGW*)
303-
# msys' `uname` does not print gcc configuration, but prints msys
304-
# configuration. so we cannot believe `uname -m`:
305-
# msys1 is always i686 and msys2 is always x86_64.
306-
# instead, msys defines $MSYSTEM which is MINGW32 on i686 and
307-
# MINGW64 on x86_64.
308-
CFG_CPUTYPE=i686
302+
MINGW32*)
309303
CFG_OSTYPE=pc-mingw32
310-
if [ "$MSYSTEM" = MINGW64 ]
311-
then
312-
CFG_CPUTYPE=x86_64
313-
CFG_OSTYPE=w64-mingw32
314-
fi
304+
;;
305+
306+
MINGW64*)
307+
# msys2, MSYSTEM=MINGW64
308+
CFG_OSTYPE=w64-mingw32
315309
;;
316310

317311
# Thad's Cygwin identifers below
@@ -641,7 +635,7 @@ then
641635
LLVM_VERSION=$($LLVM_CONFIG --version)
642636

643637
case $LLVM_VERSION in
644-
(3.[2-6]*)
638+
(3.[2-5]*)
645639
msg "found ok version of LLVM: $LLVM_VERSION"
646640
;;
647641
(*)

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

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

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

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

833835
#[cfg(target_os = "windows")]
836+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
834837
fn prefix_matches( line : &str, prefix : &str ) -> bool {
835838
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
836839
}
@@ -1248,13 +1251,15 @@ fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
12481251
}
12491252

12501253
#[cfg(target_os = "windows")]
1254+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12511255
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
12521256
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
12531257
}
12541258

12551259
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
12561260
// for diagnostic purposes
12571261
#[cfg(target_os = "windows")]
1262+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12581263
fn lib_path_cmd_prefix(path: &str) -> String {
12591264
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
12601265
}

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

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

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

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

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

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

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

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

5660
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 that were arrived at after lengthy discussion and
3+
This document describes decisions 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: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,12 @@ Rust code:
263263
264264
~~~~no_run
265265
266-
#[repr(C)]
267266
struct RustObject {
268267
a: i32,
269268
// other members
270269
}
271270
272-
extern "C" fn callback(target: *mut RustObject, a:i32) {
271+
extern fn callback(target: *mut RustObject, a:i32) {
273272
println!("I'm called from C with value {0}", a);
274273
unsafe {
275274
// Update the value in RustObject with the value received from the callback
@@ -507,16 +506,16 @@ to define a block for all windows systems, not just x86 ones.
507506
508507
# Interoperability with foreign code
509508
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.
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`.
513512
514-
Rust's owned boxes (`Box<T>`) use non-nullable pointers as handles which point to the contained
513+
Rust's owned and managed boxes use non-nullable pointers as handles which point to the contained
515514
object. However, they should not be manually created because they are managed by internal
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.
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.
520519
521520
Vectors and strings share the same basic memory layout, and utilities are available in the `vec` and
522521
`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 mut x = 5i;
335+
let 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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ closure in the new task.
8989
fn print_message() { println!("I am running in a different task!"); }
9090
spawn(print_message);
9191
92-
// Alternatively, use a `proc` expression instead of a named function.
92+
// Print something profound in a different task using a `proc` expression
9393
// The `proc` expression evaluates to an (unnamed) owned closure.
9494
// That closure will call `println!(...)` when the spawned task runs.
95+
9596
spawn(proc() println!("I am also running in a different task!") );
9697
~~~~
9798

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

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

356357
~~~
357358
# use std::rand;
358359
# use std::sync::Arc;
359360
# fn main() {
360361
# let numbers = Vec::from_fn(1000000, |_| rand::random::<f64>());
361-
let numbers_arc = Arc::new(numbers);
362+
let numbers_arc=Arc::new(numbers);
362363
# }
363364
~~~
364365

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 C:
449+
in the same format as a 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 fully specified and so details may
596+
> parts of the language may never be full specified and so details may
597597
> differ wildly between implementations (and even versions of `rustc`
598598
> itself).
599599
>

0 commit comments

Comments
 (0)