Skip to content

Commit 660858f

Browse files
author
Chad Shaffer
committed
---
yaml --- r: 275109 b: refs/heads/stable c: 6e98593 h: refs/heads/master i: 275107: d95b45f
1 parent 13b63c4 commit 660858f

File tree

10 files changed

+19
-73
lines changed

10 files changed

+19
-73
lines changed

[refs]

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

branches/stable/.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
url = https://github.com/rust-lang/rust-installer.git
1717
[submodule "src/liblibc"]
1818
path = src/liblibc
19-
url = https://github.com/rust-lang/libc.git
19+
url = https://github.com/rust-lang-nursery/libc.git

branches/stable/src/doc/book/guessing-game.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ done:
258258
io::stdin().read_line(&mut guess).expect("failed to read line");
259259
```
260260

261-
But that gets hard to read. So we’ve split it up, three lines for three method
261+
But that gets hard to read. So we’ve split it up, two lines for two method
262262
calls. We already talked about `read_line()`, but what about `expect()`? Well,
263263
we already mentioned that `read_line()` puts what the user types into the `&mut
264264
String` we pass it. But it also returns a value: in this case, an
@@ -644,7 +644,7 @@ So far, that hasn’t mattered, and so Rust defaults to an `i32`. However, here,
644644
Rust doesn’t know how to compare the `guess` and the `secret_number`. They
645645
need to be the same type. Ultimately, we want to convert the `String` we
646646
read as input into a real number type, for comparison. We can do that
647-
with three more lines. Here’s our new program:
647+
with two more lines. Here’s our new program:
648648
649649
```rust,ignore
650650
extern crate rand;

branches/stable/src/libcore/ptr.rs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -161,54 +161,6 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
161161
intrinsics::move_val_init(&mut *dst, src)
162162
}
163163

164-
/// Performs a volatile read of the value from `src` without moving it. This
165-
/// leaves the memory in `src` unchanged.
166-
///
167-
/// Volatile operations are intended to act on I/O memory, and are guaranteed
168-
/// to not be elided or reordered by the compiler across other volatile
169-
/// operations. See the LLVM documentation on [[volatile]].
170-
///
171-
/// [volatile]: http://llvm.org/docs/LangRef.html#volatile-memory-accesses
172-
///
173-
/// # Safety
174-
///
175-
/// Beyond accepting a raw pointer, this is unsafe because it semantically
176-
/// moves the value out of `src` without preventing further usage of `src`.
177-
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
178-
/// `src` is not used before the data is overwritten again (e.g. with `write`,
179-
/// `zero_memory`, or `copy_memory`). Note that `*src = foo` counts as a use
180-
/// because it will attempt to drop the value previously at `*src`.
181-
#[inline]
182-
#[unstable(feature = "volatile", reason = "recently added", issue = "31756")]
183-
pub unsafe fn read_volatile<T>(src: *const T) -> T {
184-
intrinsics::volatile_load(src)
185-
}
186-
187-
/// Performs a volatile write of a memory location with the given value without
188-
/// reading or dropping the old value.
189-
///
190-
/// Volatile operations are intended to act on I/O memory, and are guaranteed
191-
/// to not be elided or reordered by the compiler across other volatile
192-
/// operations. See the LLVM documentation on [[volatile]].
193-
///
194-
/// [volatile]: http://llvm.org/docs/LangRef.html#volatile-memory-accesses
195-
///
196-
/// # Safety
197-
///
198-
/// This operation is marked unsafe because it accepts a raw pointer.
199-
///
200-
/// It does not drop the contents of `dst`. This is safe, but it could leak
201-
/// allocations or resources, so care must be taken not to overwrite an object
202-
/// that should be dropped.
203-
///
204-
/// This is appropriate for initializing uninitialized memory, or overwriting
205-
/// memory that has previously been `read` from.
206-
#[inline]
207-
#[unstable(feature = "volatile", reason = "recently added", issue = "31756")]
208-
pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
209-
intrinsics::volatile_store(dst, src);
210-
}
211-
212164
#[lang = "const_ptr"]
213165
impl<T: ?Sized> *const T {
214166
/// Returns true if the pointer is null.

branches/stable/src/librustc/lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ declare_lint! {
132132

133133
declare_lint! {
134134
pub MATCH_OF_UNIT_VARIANT_VIA_PAREN_DOTDOT,
135-
Deny,
135+
Warn,
136136
"unit struct or enum variant erroneously allowed to match via path::ident(..)"
137137
}
138138

branches/stable/src/llvm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 69ef168544e4f15b793dd35d272008fde9a6e835
1+
Subproject commit 39e8e59056bcd84bf9c44d0bcd46ae441567e0a0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2016-02-20
4+
2016-02-16

branches/stable/src/test/compile-fail/empty-struct-unit-pat.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
// aux-build:empty-struct.rs
1414

15+
#![feature(rustc_attrs)]
1516
// remove prior feature after warning cycle and promoting warnings to errors
1617
#![feature(braced_empty_structs)]
1718

@@ -25,7 +26,8 @@ enum E {
2526
}
2627

2728
// remove attribute after warning cycle and promoting warnings to errors
28-
fn main() {
29+
#[rustc_error]
30+
fn main() { //~ ERROR: compilation successful
2931
let e2 = Empty2;
3032
let e4 = E::Empty4;
3133
let xe2 = XEmpty2;
@@ -39,12 +41,12 @@ fn main() {
3941
// XEmpty2() => () // ERROR `XEmpty2` does not name a tuple variant or a tuple struct
4042
// }
4143
match e2 {
42-
Empty2(..) => () //~ ERROR `Empty2` does not name a tuple variant or a tuple struct
43-
//~^ ERROR hard error
44+
Empty2(..) => () //~ WARN `Empty2` does not name a tuple variant or a tuple struct
45+
//~^ WARN hard error
4446
}
4547
match xe2 {
46-
XEmpty2(..) => () //~ ERROR `XEmpty2` does not name a tuple variant or a tuple struct
47-
//~^ ERROR hard error
48+
XEmpty2(..) => () //~ WARN `XEmpty2` does not name a tuple variant or a tuple struct
49+
//~^ WARN hard error
4850
}
4951
// Rejected by parser as yet
5052
// match e4 {
@@ -55,12 +57,12 @@ fn main() {
5557
// _ => {},
5658
// }
5759
match e4 {
58-
E::Empty4(..) => () //~ ERROR `E::Empty4` does not name a tuple variant or a tuple struct
59-
//~^ ERROR hard error
60+
E::Empty4(..) => () //~ WARN `E::Empty4` does not name a tuple variant or a tuple struct
61+
//~^ WARN hard error
6062
}
6163
match xe4 {
62-
XE::XEmpty4(..) => (), //~ ERROR `XE::XEmpty4` does not name a tuple variant or a tuple
63-
//~^ ERROR hard error
64+
XE::XEmpty4(..) => (), //~ WARN `XE::XEmpty4` does not name a tuple variant or a tuple
65+
//~^ WARN hard error
6466
_ => {},
6567
}
6668
}

branches/stable/src/test/run-make/volatile-intrinsics/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(core_intrinsics, volatile)]
11+
#![feature(core_intrinsics)]
1212

1313
use std::intrinsics::{volatile_load, volatile_store};
14-
use std::ptr::{read_volatile, write_volatile};
1514

1615
pub fn main() {
1716
unsafe {
1817
let mut i : isize = 1;
1918
volatile_store(&mut i, 2);
2019
assert_eq!(volatile_load(&i), 2);
2120
}
22-
unsafe {
23-
let mut i : isize = 1;
24-
write_volatile(&mut i, 2);
25-
assert_eq!(read_volatile(&i), 2);
26-
}
2721
}

branches/stable/src/test/run-pass/issue-pr29383.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(match_of_unit_variant_via_paren_dotdot)]
12-
1311
enum E {
1412
A,
1513
B,

0 commit comments

Comments
 (0)