Skip to content

Commit a56914f

Browse files
committed
---
yaml --- r: 227835 b: refs/heads/try c: ad39fcc h: refs/heads/master i: 227833: 67b867c 227831: fc1254e v: v3
1 parent 6304349 commit a56914f

File tree

6 files changed

+13
-98
lines changed

6 files changed

+13
-98
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: 8cf22b5eaf2b442fb2461a69c89d6c6011350f49
4+
refs/heads/try: ad39fcc535c0a825185c25de69309fcf7f94cc39
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/RELEASES.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ Highlights
1313
* A `symlink_metadata` function has been added.
1414
* The `fs::Metadata` structure now lowers to its OS counterpart, providing
1515
access to all underlying information.
16-
* The compiler now contains extended explanations of many errors. When an error
17-
with an explanation occurs the compiler suggests using the `--explain` flag
18-
to read the explanation. Error explanations are also [available online][err-index].
16+
* The compiler contains extended explanations of many errors. When it
17+
emits such an error it also suggests using the `--explain` flag to
18+
read the extended explanations, which are also [cataloged on the web
19+
site][err].
1920
* Thanks to multiple [improvements][sk] to [type checking][pre], as
2021
well as other work, the time to bootstrap the compiler decreased by
2122
32%.
@@ -87,7 +88,7 @@ Misc
8788
[`IntoIterator`]: http://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
8889
[`From`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html
8990
[rf]: https://github.com/rust-lang/rust/pull/24491
90-
[err-index]: http://doc.rust-lang.org/error-index.html
91+
[err]: http://doc.rust-lang.org/error-index.html
9192
[sk]: https://github.com/rust-lang/rust/pull/24615
9293
[pre]: https://github.com/rust-lang/rust/pull/25323
9394
[file]: https://github.com/rust-lang/rust/pull/24598

branches/try/src/doc/trpl/ffi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ and invokes callbacks from there.
309309
In these cases access to Rust data structures inside the callbacks is
310310
especially unsafe and proper synchronization mechanisms must be used.
311311
Besides classical synchronization mechanisms like mutexes, one possibility in
312-
Rust is to use channels (in `std::sync::mpsc`) to forward data from the C
313-
thread that invoked the callback into a Rust thread.
312+
Rust is to use channels (in `std::comm`) to forward data from the C thread
313+
that invoked the callback into a Rust thread.
314314
315315
If an asynchronous callback targets a special object in the Rust address space
316316
it is also absolutely necessary that no more callbacks are performed by the

branches/try/src/librustc/diagnostics.rs

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -984,57 +984,6 @@ From [RFC 246]:
984984
[RFC 246]: https://github.com/rust-lang/rfcs/pull/246
985985
"##,
986986

987-
E0395: r##"
988-
The value assigned to a constant expression must be known at compile time,
989-
which is not the case when comparing raw pointers. Erroneous code example:
990-
991-
```
992-
static foo: i32 = 42;
993-
static bar: i32 = 43;
994-
995-
static baz: bool = { (&foo as *const i32) == (&bar as *const i32) };
996-
// error: raw pointers cannot be compared in statics!
997-
```
998-
999-
Please check that the result of the comparison can be determined at compile time
1000-
or isn't assigned to a constant expression. Example:
1001-
1002-
```
1003-
static foo: i32 = 42;
1004-
static bar: i32 = 43;
1005-
1006-
let baz: bool = { (&foo as *const i32) == (&bar as *const i32) };
1007-
// baz isn't a constant expression so it's ok
1008-
```
1009-
"##,
1010-
1011-
E0396: r##"
1012-
The value assigned to a constant expression must be known at compile time,
1013-
which is not the case when dereferencing raw pointers. Erroneous code
1014-
example:
1015-
1016-
```
1017-
const foo: i32 = 42;
1018-
const baz: *const i32 = (&foo as *const i32);
1019-
1020-
const deref: i32 = *baz;
1021-
// error: raw pointers cannot be dereferenced in constants
1022-
```
1023-
1024-
To fix this error, please do not assign this value to a constant expression.
1025-
Example:
1026-
1027-
```
1028-
const foo: i32 = 42;
1029-
const baz: *const i32 = (&foo as *const i32);
1030-
1031-
unsafe { let deref: i32 = *baz; }
1032-
// baz isn't a constant expression so it's ok
1033-
```
1034-
1035-
You'll also note that this assignment must be done in an unsafe block!
1036-
"##,
1037-
1038987
E0397: r##"
1039988
It is not allowed for a mutable static to allocate or have destructors. For
1040989
example:
@@ -1090,5 +1039,7 @@ register_diagnostics! {
10901039
E0314, // closure outlives stack frame
10911040
E0315, // cannot invoke closure outside of its lifetime
10921041
E0316, // nested quantification of lifetimes
1093-
E0370 // discriminant overflow
1042+
E0370, // discriminant overflow
1043+
E0395, // pointer comparison in const-expr
1044+
E0396 // pointer dereference in const-expr
10941045
}

branches/try/src/librustc_typeck/diagnostics.rs

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,42 +1458,6 @@ impl Foo for Bar {
14581458
```
14591459
"##,
14601460

1461-
E0327: r##"
1462-
You cannot use associated items other than constant items as patterns. This
1463-
includes method items. Example of erroneous code:
1464-
1465-
```
1466-
enum B {}
1467-
1468-
impl B {
1469-
fn bb() -> i32 { 0 }
1470-
}
1471-
1472-
fn main() {
1473-
match 0 {
1474-
B::bb => {} // error: associated items in match patterns must
1475-
// be constants
1476-
}
1477-
}
1478-
```
1479-
1480-
Please check that you're not using a method as a pattern. Example:
1481-
1482-
```
1483-
enum B {
1484-
ba,
1485-
bb
1486-
}
1487-
1488-
fn main() {
1489-
match B::ba {
1490-
B::bb => {} // ok!
1491-
_ => {}
1492-
}
1493-
}
1494-
```
1495-
"##,
1496-
14971461
E0368: r##"
14981462
This error indicates that a binary assignment operator like `+=` or `^=` was
14991463
applied to the wrong types. For example:
@@ -1676,6 +1640,7 @@ register_diagnostics! {
16761640
E0323, // implemented an associated const when another trait item expected
16771641
E0324, // implemented a method when another trait item expected
16781642
E0325, // implemented an associated type when another trait item expected
1643+
E0327, // referred to method instead of constant in match pattern
16791644
E0328, // cannot implement Unsize explicitly
16801645
E0329, // associated const depends on type parameter or Self.
16811646
E0366, // dropck forbid specialization to concrete type or region

branches/try/src/libstd/rand/os.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ mod imp {
4141
const NR_GETRANDOM: libc::c_long = 318;
4242
#[cfg(target_arch = "x86")]
4343
const NR_GETRANDOM: libc::c_long = 355;
44-
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
45-
const NR_GETRANDOM: libc::c_long = 384;
46-
#[cfg(target_arch = "powerpc")]
44+
#[cfg(any(target_arch = "arm", target_arch = "aarch64", target_arch = "powerpc"))]
4745
const NR_GETRANDOM: libc::c_long = 384;
4846

4947
unsafe {

0 commit comments

Comments
 (0)