Skip to content

Commit d9e85ac

Browse files
---
yaml --- r: 106019 b: refs/heads/auto c: 5bb9bd2 h: refs/heads/master i: 106017: ac327c1 106015: 09b3272 v: v3
1 parent b6ac884 commit d9e85ac

File tree

6 files changed

+49
-58
lines changed

6 files changed

+49
-58
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 4e1172ebbd44b826b795c05dcecdd8c5557ecff6
16+
refs/heads/auto: 5bb9bd2d346c5921d35da5e743d1f20534b2b4d7
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc/middle/typeck/check/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,13 +2317,11 @@ fn check_expr_with_unifier(fcx: @FnCtxt,
23172317
fcx.type_error_message(
23182318
expr.span,
23192319
|actual| {
2320-
format!("attempted to take value of method `{}` on type `{}`",
2320+
format!("attempted to take value of method `{}` on type `{}` \
2321+
(try writing an anonymous function)",
23212322
token::get_name(field), actual)
23222323
},
23232324
expr_t, None);
2324-
2325-
tcx.sess.span_note(expr.span,
2326-
"maybe a missing `()` to call it? If not, try an anonymous function.");
23272325
}
23282326

23292327
None => {

branches/auto/src/libstd/option.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ impl<T> Option<T> {
311311
/// Fails if the value equals `None`.
312312
#[inline]
313313
pub fn take_unwrap(&mut self) -> T {
314-
match self.take() {
315-
Some(x) => x,
316-
None => fail!("called `Option::take_unwrap()` on a `None` value")
314+
if self.is_none() {
315+
fail!("called `Option::take_unwrap()` on a `None` value")
317316
}
317+
self.take().unwrap()
318318
}
319319

320320
/// Gets an immutable reference to the value inside an option.

branches/auto/src/libtime/lib.rs

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,51 @@ pub fn tzset() {
187187
}
188188
}
189189

190+
/// Holds a calendar date and time broken down into its components (year, month, day, and so on),
191+
/// also called a broken-down time value.
190192
#[deriving(Clone, Eq, Encodable, Decodable, Show)]
191193
pub struct Tm {
192-
tm_sec: i32, // seconds after the minute ~[0-60]
193-
tm_min: i32, // minutes after the hour ~[0-59]
194-
tm_hour: i32, // hours after midnight ~[0-23]
195-
tm_mday: i32, // days of the month ~[1-31]
196-
tm_mon: i32, // months since January ~[0-11]
197-
tm_year: i32, // years since 1900
198-
tm_wday: i32, // days since Sunday ~[0-6]
199-
tm_yday: i32, // days since January 1 ~[0-365]
200-
tm_isdst: i32, // Daylight Savings Time flag
201-
tm_gmtoff: i32, // offset from UTC in seconds
202-
tm_zone: ~str, // timezone abbreviation
203-
tm_nsec: i32, // nanoseconds
194+
/// Seconds after the minute – [0, 60]
195+
tm_sec: i32,
196+
197+
/// Minutes after the hour – [0, 59]
198+
tm_min: i32,
199+
200+
/// Hours after midnight – [0, 23]
201+
tm_hour: i32,
202+
203+
/// Day of the month – [1, 31]
204+
tm_mday: i32,
205+
206+
/// Months since January – [0, 11]
207+
tm_mon: i32,
208+
209+
/// Years since 1900
210+
tm_year: i32,
211+
212+
/// Days since Sunday – [0, 6]. 0 = Sunday, 1 = Monday, …, 6 = Saturday.
213+
tm_wday: i32,
214+
215+
/// Days since January 1 – [0, 365]
216+
tm_yday: i32,
217+
218+
/// Daylight Saving Time flag.
219+
///
220+
/// This value is positive if Daylight Saving Time is in effect, zero if Daylight Saving Time
221+
/// is not in effect, and negative if this information is not available.
222+
tm_isdst: i32,
223+
224+
/// Identifies the time zone that was used to compute this broken-down time value, including any
225+
/// adjustment for Daylight Saving Time. This is the number of seconds east of UTC. For example,
226+
/// for U.S. Pacific Daylight Time, the value is -7*60*60 = -25200.
227+
tm_gmtoff: i32,
228+
229+
/// Abbreviated name for the time zone that was used to compute this broken-down time value.
230+
/// For example, U.S. Pacific Daylight Time is "PDT".
231+
tm_zone: ~str,
232+
233+
/// Nanoseconds after the second – [0, 10<sup>9</sup> - 1]
234+
tm_nsec: i32,
204235
}
205236

206237
pub fn empty_tm() -> Tm {

branches/auto/src/test/compile-fail/method-missing-call.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.

branches/auto/src/test/run-pass/tcp-stress.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
// ignore-android needs extra network permissions
1414
// exec-env:RUST_LOG=debug
1515

16-
#[feature(phase)];
17-
#[phase(syntax, link)]
18-
extern crate log;
19-
2016
use std::libc;
2117
use std::io::net::ip::{Ipv4Addr, SocketAddr};
2218
use std::io::net::tcp::{TcpListener, TcpStream};

0 commit comments

Comments
 (0)