Skip to content

Commit 054b257

Browse files
committed
---
yaml --- r: 234870 b: refs/heads/stable c: 4c7d53a h: refs/heads/master v: v3
1 parent f3b0faa commit 054b257

File tree

10 files changed

+121
-16
lines changed

10 files changed

+121
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 56fd31f9a4a816e82a22787dab20cf785761f3f8
32+
refs/heads/stable: 4c7d53a202b390c0f631668618b1cc55b2fcdf67
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,14 @@ for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
10371037
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
10381038
done
10391039

1040+
# copy build-triples to host-triples so that builds are a subset of hosts
1041+
V_TEMP=""
1042+
for i in $CFG_BUILD $CFG_HOST;
1043+
do
1044+
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
1045+
done
1046+
CFG_HOST=$V_TEMP
1047+
10401048
# copy host-triples to target-triples so that hosts are a subset of targets
10411049
V_TEMP=""
10421050
for i in $CFG_HOST $CFG_TARGET;

branches/stable/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.2.0
16+
CFG_RELEASE_NUM=1.3.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/stable/src/doc/trpl/academic-research.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,32 @@ Recommended for inspiration and a better understanding of Rust's background.
4242

4343
### Papers *about* Rust
4444

45-
* [GPU programming in Rust](http://www.cs.indiana.edu/~eholk/papers/hips2013.pdf)
46-
* [Parallel closures: a new twist on an old idea](https://www.usenix.org/conference/hotpar12/parallel-closures-new-twist-old-idea) - not exactly about rust, but by nmatsakis
45+
* [GPU Programming in Rust: Implementing High Level Abstractions in a
46+
Systems Level
47+
Language](http://www.cs.indiana.edu/~eholk/papers/hips2013.pdf). Early GPU work by Eric Holk.
48+
* [Parallel closures: a new twist on an old
49+
idea](https://www.usenix.org/conference/hotpar12/parallel-closures-new-twist-old-idea)
50+
- not exactly about rust, but by nmatsakis
51+
* [Patina: A Formalization of the Rust Programming
52+
Language](ftp://ftp.cs.washington.edu/tr/2015/03/UW-CSE-15-03-02.pdf). Early
53+
formalization of a subset of the type system, by Eric Reed.
54+
* [Experience Report: Developing the Servo Web Browser Engine using
55+
Rust](http://arxiv.org/abs/1505.07383). By Lars Bergstrom.
56+
* [Implementing a Generic Radix Trie in
57+
Rust](https://michaelsproul.github.io/rust_radix_paper/rust-radix-sproul.pdf). Undergrad
58+
paper by Michael Sproul.
59+
* [Reenix: Implementing a Unix-Like Operating System in
60+
Rust](http://scialex.github.io/reenix.pdf). Undergrad paper by Alex
61+
Light.
62+
* [Evaluation of performance and productivity metrics of potential
63+
programming languages in the HPC environment](). Bachelor's thesis by
64+
Florian Wilkens. Compares C, Go and Rust.
65+
* [Nom, a byte oriented, streaming, zero copy, parser combinators library
66+
in Rust](http://spw15.langsec.org/papers/couprie-nom.pdf). By
67+
Geoffroy Couprie, research for VLC.
68+
* [Graph-Based Higher-Order Intermediate
69+
Representation](http://compilers.cs.uni-saarland.de/papers/lkh15_cgo.pdf). An
70+
experimental IR implemented in Impala, a Rust-like language.
71+
* [Code Refinement of Stencil
72+
Codes](http://compilers.cs.uni-saarland.de/papers/ppl14_web.pdf). Another
73+
paper using Impala.

branches/stable/src/doc/trpl/documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ we could have added more explanation in a new paragraph.
102102
#### Special sections
103103

104104
Next, are special sections. These are indicated with a header, `#`. There
105-
are three kinds of headers that are commonly used. They aren't special syntax,
105+
are four kinds of headers that are commonly used. They aren't special syntax,
106106
just convention, for now.
107107

108108
```rust
@@ -144,7 +144,7 @@ responsible for upholding.
144144
# fn foo() {}
145145
```
146146

147-
Third, `Examples`. Include one or more examples of using your function or
147+
Fourth, `Examples`. Include one or more examples of using your function or
148148
method, and your users will love you for it. These examples go inside of
149149
code block annotations, which we'll talk about in a moment, and can have
150150
more than one section:

branches/stable/src/doc/trpl/installing-rust.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ $ sudo /usr/local/lib/rustlib/uninstall.sh
4141
If you used the Windows installer, just re-run the `.msi` and it will give you
4242
an uninstall option.
4343

44+
## That disclaimer we promised
45+
4446
Some people, and somewhat rightfully so, get very upset when we tell you to
4547
`curl | sh`. Basically, when you do this, you are trusting that the good
4648
people who maintain Rust aren't going to hack your computer and do bad things.
@@ -50,6 +52,8 @@ binary downloads][install-page].
5052

5153
[from-source]: https://github.com/rust-lang/rust#building-from-source
5254

55+
## Platform support
56+
5357
Oh, we should also mention the officially supported platforms:
5458

5559
* Windows (7, 8, Server 2008 R2)
@@ -66,6 +70,8 @@ integrated as the Linux/OS X experience is. We're working on it! If anything
6670
does not work, it is a bug. Please let us know if that happens. Each and every
6771
commit is tested against Windows just like any other platform.
6872

73+
## After installation
74+
6975
If you've got Rust installed, you can open up a shell, and type this:
7076

7177
```bash

branches/stable/src/liblibc/lib.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,12 @@ pub mod types {
441441
pub type intmax_t = i64;
442442
pub type uintmax_t = u64;
443443
}
444-
#[cfg(any(target_arch = "x86",
445-
target_arch = "mips",
444+
#[cfg(any(target_arch = "mips",
446445
target_arch = "mipsel",
447446
target_arch = "powerpc",
448447
target_arch = "le32",
449-
all(target_arch = "arm", not(target_os = "android"))))]
448+
all(any(target_arch = "arm", target_arch = "x86"),
449+
not(target_os = "android"))))]
450450
pub mod posix88 {
451451
pub type off_t = i32;
452452
pub type dev_t = u64;
@@ -458,7 +458,8 @@ pub mod types {
458458
pub type mode_t = u32;
459459
pub type ssize_t = i32;
460460
}
461-
#[cfg(all(target_arch = "arm", target_os = "android"))]
461+
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
462+
target_os = "android"))]
462463
pub mod posix88 {
463464
pub type off_t = i32;
464465
pub type dev_t = u32;
@@ -473,7 +474,8 @@ pub mod types {
473474
#[cfg(any(target_arch = "x86",
474475
target_arch = "le32",
475476
target_arch = "powerpc",
476-
all(target_arch = "arm", not(target_os = "android"))))]
477+
all(any(target_arch = "arm", target_arch = "x86"),
478+
not(target_os = "android"))))]
477479
pub mod posix01 {
478480
use types::os::arch::c95::{c_short, c_long, time_t};
479481
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -519,7 +521,8 @@ pub mod types {
519521
pub __size: [u32; 9]
520522
}
521523
}
522-
#[cfg(all(target_arch = "arm", target_os = "android"))]
524+
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
525+
target_os = "android"))]
523526
pub mod posix01 {
524527
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
525528
use types::os::arch::c99::{c_longlong, c_ulonglong};
@@ -5916,13 +5919,15 @@ pub mod funcs {
59165919
use types::os::arch::c95::c_int;
59175920
use types::os::common::posix01::sighandler_t;
59185921

5919-
#[cfg(not(all(target_os = "android", target_arch = "arm")))]
5922+
#[cfg(not(all(target_os = "android", any(target_arch = "arm",
5923+
target_arch = "x86"))))]
59205924
extern {
59215925
pub fn signal(signum: c_int,
59225926
handler: sighandler_t) -> sighandler_t;
59235927
}
59245928

5925-
#[cfg(all(target_os = "android", target_arch = "arm"))]
5929+
#[cfg(all(target_os = "android", any(target_arch = "arm",
5930+
target_arch = "x86")))]
59265931
extern {
59275932
#[link_name = "bsd_signal"]
59285933
pub fn signal(signum: c_int,

branches/stable/src/librustc_typeck/diagnostics.rs

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,22 @@ fn main() {
380380
```
381381
"##,
382382

383+
E0044: r##"
384+
You can't use type parameters on foreign items. Example of erroneous code:
385+
386+
```
387+
extern { fn some_func<T>(x: T); }
388+
```
389+
390+
To fix this, replace the type parameter with the specializations that you
391+
need:
392+
393+
```
394+
extern { fn some_func_i32(x: i32); }
395+
extern { fn some_func_i64(x: i64); }
396+
```
397+
"##,
398+
383399
E0045: r##"
384400
Rust only supports variadic parameters for interoperability with C code in its
385401
FFI. As such, variadic parameters can only be used with functions which are
@@ -733,6 +749,44 @@ fn some_func(x: &mut i32) {
733749
```
734750
"##,
735751

752+
E0071: r##"
753+
You tried to use a structure initialization with a non-structure type.
754+
Example of erroneous code:
755+
756+
```
757+
enum Foo { FirstValue };
758+
759+
let u = Foo::FirstValue { value: 0i32 }; // error: Foo::FirstValue
760+
// isn't a structure!
761+
// or even simpler, if the structure wasn't defined at all:
762+
let u = RandomName { random_field: 0i32 }; // error: RandomName
763+
// isn't a structure!
764+
```
765+
766+
To fix this, please check:
767+
* Did you spell it right?
768+
* Did you accidentaly used an enum as a struct?
769+
* Did you accidentaly make an enum when you intended to use a struct?
770+
771+
Here is the previous code with all missing information:
772+
773+
```
774+
struct Inner {
775+
value: i32
776+
}
777+
778+
enum Foo {
779+
FirstValue(Inner)
780+
}
781+
782+
fn main() {
783+
let u = Foo::FirstValue(Inner { value: 0i32 });
784+
785+
let t = Inner { value: 0i32 };
786+
}
787+
```
788+
"##,
789+
736790
E0072: r##"
737791
When defining a recursive struct or enum, any use of the type being defined
738792
from inside the definition must occur behind a pointer (like `Box` or `&`).
@@ -1488,9 +1542,7 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
14881542
}
14891543

14901544
register_diagnostics! {
1491-
E0044, // foreign items may not have type parameters
14921545
E0068,
1493-
E0071,
14941546
E0074,
14951547
E0075,
14961548
E0076,

branches/stable/src/libstd/sys/windows/os.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ impl ExactSizeIterator for Args {
311311

312312
impl Drop for Args {
313313
fn drop(&mut self) {
314+
// self.cur can be null if CommandLineToArgvW previously failed,
315+
// but LocalFree ignores NULL pointers
314316
unsafe { c::LocalFree(self.cur as *mut c_void); }
315317
}
316318
}
@@ -321,6 +323,9 @@ pub fn args() -> Args {
321323
let lpCmdLine = c::GetCommandLineW();
322324
let szArgList = c::CommandLineToArgvW(lpCmdLine, &mut nArgs);
323325

326+
// szArcList can be NULL if CommandLinToArgvW failed,
327+
// but in that case nArgs is 0 so we won't actually
328+
// try to read a null pointer
324329
Args { cur: szArgList, range: 0..(nArgs as isize) }
325330
}
326331
}

branches/stable/src/libstd/tuple.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
//! * `Eq`
2626
//! * `PartialOrd`
2727
//! * `Ord`
28+
//! * `Debug`
2829
//! * `Default`
30+
//! * `Hash`
2931
//!
3032
//! # Examples
3133
//!

0 commit comments

Comments
 (0)