Skip to content

Commit 1c0ddf9

Browse files
committed
---
yaml --- r: 227815 b: refs/heads/try c: 009e53d h: refs/heads/master i: 227813: 41f5e17 227811: dd88b2f 227807: 7c5a9da v: v3
1 parent 6a6c8ac commit 1c0ddf9

File tree

9 files changed

+156
-7
lines changed

9 files changed

+156
-7
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: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 239d9c2b09e3cd4ecdc1a8756cd1a389b8828baf
4+
refs/heads/try: 009e53d70f722bcd8faf474c48c43d57b51f3b29
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,18 @@ then
899899
fi
900900
fi
901901

902+
# If the clang isn't already enabled, check for GCC, and if it is missing, turn
903+
# on clang as a backup.
904+
if [ -z "$CFG_ENABLE_CLANG" ]
905+
then
906+
CFG_GCC_VERSION=$("$CFG_GCC" --version 2>&1)
907+
if [ $? -ne 0 ]
908+
then
909+
step_msg "GCC not installed, will try using Clang"
910+
CFG_ENABLE_CLANG=1
911+
fi
912+
fi
913+
902914
# Okay, at this point, we have made up our minds about whether we are
903915
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
904916
if [ ! -z "$CFG_ENABLE_CLANG" ]
@@ -920,7 +932,7 @@ then
920932
LLVM_VERSION=$($LLVM_CONFIG --version)
921933

922934
case $LLVM_VERSION in
923-
(3.[5-6]*)
935+
(3.[5-7]*)
924936
msg "found ok version of LLVM: $LLVM_VERSION"
925937
;;
926938
(*)

branches/try/src/doc/style/features/traits/generics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ explicitly implement to be used by this generic function.
2929
explicit conversions or other method calls would usually be necessary. See the
3030
[overloading/implicits use case](#use-case:-limited-overloading-and/or-implicit-conversions)
3131
below.
32-
* _Precise types_. Because generic give a _name_ to the specific type
32+
* _Precise types_. Because generics give a _name_ to the specific type
3333
implementing a trait, it is possible to be precise about places where that
3434
exact type is required or produced. For example, a function
3535

branches/try/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/try/src/liblibc/lib.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,6 +3600,11 @@ pub mod consts {
36003600
pub const SHUT_RD: c_int = 0;
36013601
pub const SHUT_WR: c_int = 1;
36023602
pub const SHUT_RDWR: c_int = 2;
3603+
3604+
pub const LOCK_SH: c_int = 1;
3605+
pub const LOCK_EX: c_int = 2;
3606+
pub const LOCK_NB: c_int = 4;
3607+
pub const LOCK_UN: c_int = 8;
36033608
}
36043609
#[cfg(any(target_arch = "mips",
36053610
target_arch = "mipsel"))]
@@ -3684,6 +3689,11 @@ pub mod consts {
36843689
pub const SHUT_RD: c_int = 0;
36853690
pub const SHUT_WR: c_int = 1;
36863691
pub const SHUT_RDWR: c_int = 2;
3692+
3693+
pub const LOCK_SH: c_int = 1;
3694+
pub const LOCK_EX: c_int = 2;
3695+
pub const LOCK_NB: c_int = 4;
3696+
pub const LOCK_UN: c_int = 8;
36873697
}
36883698
#[cfg(any(target_arch = "x86",
36893699
target_arch = "x86_64",
@@ -4227,6 +4237,11 @@ pub mod consts {
42274237
pub const SHUT_RD: c_int = 0;
42284238
pub const SHUT_WR: c_int = 1;
42294239
pub const SHUT_RDWR: c_int = 2;
4240+
4241+
pub const LOCK_SH: c_int = 1;
4242+
pub const LOCK_EX: c_int = 2;
4243+
pub const LOCK_NB: c_int = 4;
4244+
pub const LOCK_UN: c_int = 8;
42304245
}
42314246
pub mod extra {
42324247
use types::os::arch::c95::c_int;
@@ -4651,6 +4666,11 @@ pub mod consts {
46514666
pub const SHUT_RD: c_int = 0;
46524667
pub const SHUT_WR: c_int = 1;
46534668
pub const SHUT_RDWR: c_int = 2;
4669+
4670+
pub const LOCK_SH: c_int = 1;
4671+
pub const LOCK_EX: c_int = 2;
4672+
pub const LOCK_NB: c_int = 4;
4673+
pub const LOCK_UN: c_int = 8;
46544674
}
46554675
pub mod extra {
46564676
use types::os::arch::c95::c_int;
@@ -5092,6 +5112,11 @@ pub mod consts {
50925112
pub const SHUT_RD: c_int = 0;
50935113
pub const SHUT_WR: c_int = 1;
50945114
pub const SHUT_RDWR: c_int = 2;
5115+
5116+
pub const LOCK_SH: c_int = 1;
5117+
pub const LOCK_EX: c_int = 2;
5118+
pub const LOCK_NB: c_int = 4;
5119+
pub const LOCK_UN: c_int = 8;
50955120
}
50965121
pub mod extra {
50975122
use types::os::arch::c95::c_int;
@@ -6121,6 +6146,7 @@ pub mod funcs {
61216146
-> c_int;
61226147
pub fn realpath(pathname: *const c_char, resolved: *mut c_char)
61236148
-> *mut c_char;
6149+
pub fn flock(fd: c_int, operation: c_int) -> c_int;
61246150
}
61256151
}
61266152

@@ -6137,6 +6163,7 @@ pub mod funcs {
61376163
-> c_int;
61386164
pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_uchar)
61396165
-> c_int;
6166+
pub fn flock(fd: c_int, operation: c_int) -> c_int;
61406167
}
61416168
}
61426169

branches/try/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,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub trait ToNbt<T> {
12+
fn new(val: T) -> Self;
13+
}
14+
15+
impl ToNbt<Self> {} //~ ERROR use of `Self` outside of an impl or trait
16+
17+
fn main() {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
trait A<T: A<T>> {}
12+
13+
fn main() {}

branches/try/src/test/run-pass/parallel-codegen-closures.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Tests parallel codegen - this can fail if the symbol for the anonymous
1212
// closure in `sum` pollutes the second codegen unit from the first.
1313

14+
// ignore-bitrig
1415
// compile-flags: -C codegen_units=2
1516

1617
#![feature(core)]

0 commit comments

Comments
 (0)