Skip to content

Commit acfd1b6

Browse files
committed
---
yaml --- r: 275115 b: refs/heads/stable c: 028106c h: refs/heads/master i: 275113: 93a507f 275111: aaec072
1 parent dbff0fd commit acfd1b6

File tree

9 files changed

+42
-24
lines changed

9 files changed

+42
-24
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: f93a62b68def853ee86dec4e27fbc4068c25dd32
32+
refs/heads/stable: 028106c434dfe428d111c3c532f6995e16e26198
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/mk/dist.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ PKG_FILES := \
4848
$(S)configure $(S)Makefile.in \
4949
$(S)man \
5050
$(addprefix $(S)src/, \
51-
bootstrap \
52-
build_helper \
5351
compiletest \
5452
doc \
5553
driver \
@@ -62,7 +60,6 @@ PKG_FILES := \
6260
rt \
6361
rtstartup \
6462
rustllvm \
65-
rustc \
6663
snapshots.txt \
6764
rust-installer \
6865
rustbook \

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, two lines for two method
261+
But that gets hard to read. So we’ve split it up, three lines for three 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 two more lines. Here’s our new program:
647+
with three more lines. Here’s our new program:
648648
649649
```rust,ignore
650650
extern crate rand;

branches/stable/src/liballoc/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ test = false
1010

1111
[dependencies]
1212
core = { path = "../libcore" }
13+
libc = { path = "../rustc/libc_shim" }
14+
alloc_system = { path = "../liballoc_system" }

branches/stable/src/liballoc/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,16 @@
9292
#![feature(unsafe_no_drop_flag, filling_drop)]
9393
#![feature(unsize)]
9494

95+
// Issue# 30592: Systematically use alloc_system during stage0 since jemalloc
96+
// might be unavailable or disabled
97+
#![cfg_attr(stage0, feature(alloc_system))]
98+
9599
#![cfg_attr(not(test), feature(raw, fn_traits, placement_new_protocol))]
96100
#![cfg_attr(test, feature(test, rustc_private, box_heap))]
97101

102+
#[cfg(stage0)]
103+
extern crate alloc_system;
104+
98105
// Allow testing this library
99106

100107
#[cfg(test)]

branches/stable/src/libstd/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,6 @@
269269
#![feature(vec_push_all)]
270270
#![feature(zero_one)]
271271

272-
// Issue# 30592: Systematically use alloc_system during stage0 since jemalloc
273-
// might be unavailable or disabled
274-
#![cfg_attr(stage0, feature(alloc_system))]
275-
276272
// Don't link to std. We are std.
277273
#![no_std]
278274

@@ -299,9 +295,6 @@ extern crate alloc;
299295
extern crate rustc_unicode;
300296
extern crate libc;
301297

302-
#[cfg(stage0)]
303-
extern crate alloc_system;
304-
305298
// Make std testable by not duplicating lang items and other globals. See #2912
306299
#[cfg(test)] extern crate std as realstd;
307300

branches/stable/src/libstd/os/netbsd/fs.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ pub trait MetadataExt {
7474
fn st_flags(&self) -> u32;
7575
#[stable(feature = "metadata_ext2", since = "1.8.0")]
7676
fn st_gen(&self) -> u32;
77-
#[stable(feature = "metadata_ext2", since = "1.8.0")]
78-
fn st_spare(&self) -> u32;
7977
}
8078

8179
#[stable(feature = "metadata_ext", since = "1.1.0")]
@@ -115,25 +113,25 @@ impl MetadataExt for Metadata {
115113
self.as_inner().as_inner().st_atime as i64
116114
}
117115
fn st_atime_nsec(&self) -> i64 {
118-
self.as_inner().as_inner().st_atime_nsec as i64
116+
self.as_inner().as_inner().st_atimensec as i64
119117
}
120118
fn st_mtime(&self) -> i64 {
121119
self.as_inner().as_inner().st_mtime as i64
122120
}
123121
fn st_mtime_nsec(&self) -> i64 {
124-
self.as_inner().as_inner().st_mtime_nsec as i64
122+
self.as_inner().as_inner().st_mtimensec as i64
125123
}
126124
fn st_ctime(&self) -> i64 {
127125
self.as_inner().as_inner().st_ctime as i64
128126
}
129127
fn st_ctime_nsec(&self) -> i64 {
130-
self.as_inner().as_inner().st_ctime_nsec as i64
128+
self.as_inner().as_inner().st_ctimensec as i64
131129
}
132130
fn st_birthtime(&self) -> i64 {
133131
self.as_inner().as_inner().st_birthtime as i64
134132
}
135133
fn st_birthtime_nsec(&self) -> i64 {
136-
self.as_inner().as_inner().st_birthtime_nsec as i64
134+
self.as_inner().as_inner().st_birthtimensec as i64
137135
}
138136
fn st_blksize(&self) -> u64 {
139137
self.as_inner().as_inner().st_blksize as u64
@@ -147,8 +145,5 @@ impl MetadataExt for Metadata {
147145
fn st_flags(&self) -> u32 {
148146
self.as_inner().as_inner().st_flags as u32
149147
}
150-
fn st_spare(&self) -> u32 {
151-
self.as_inner().as_inner().st_spare as u32
152-
}
153148
}
154149

branches/stable/src/libstd/sys/unix/fs.rs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,31 @@ impl FileAttr {
119119
}
120120
}
121121

122-
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
122+
#[cfg(target_os = "netbsd")]
123+
impl FileAttr {
124+
pub fn modified(&self) -> io::Result<SystemTime> {
125+
Ok(SystemTime::from(libc::timespec {
126+
tv_sec: self.stat.st_mtime as libc::time_t,
127+
tv_nsec: self.stat.st_mtimensec as libc::c_long,
128+
}))
129+
}
130+
131+
pub fn accessed(&self) -> io::Result<SystemTime> {
132+
Ok(SystemTime::from(libc::timespec {
133+
tv_sec: self.stat.st_atime as libc::time_t,
134+
tv_nsec: self.stat.st_atimensec as libc::c_long,
135+
}))
136+
}
137+
138+
pub fn created(&self) -> io::Result<SystemTime> {
139+
Ok(SystemTime::from(libc::timespec {
140+
tv_sec: self.stat.st_birthtime as libc::time_t,
141+
tv_nsec: self.stat.st_birthtimensec as libc::c_long,
142+
}))
143+
}
144+
}
145+
146+
#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "netbsd")))]
123147
impl FileAttr {
124148
pub fn modified(&self) -> io::Result<SystemTime> {
125149
Ok(SystemTime::from(libc::timespec {

0 commit comments

Comments
 (0)