Skip to content

Commit 5d2f7a2

Browse files
committed
---
yaml --- r: 95173 b: refs/heads/dist-snap c: cdb7701 h: refs/heads/master i: 95171: 3847f53 v: v3
1 parent da58872 commit 5d2f7a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1656
-1209
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: e44b40ca3a1e8e53b485476e7329a0d8e553d29c
9+
refs/heads/dist-snap: cdb7701434be0ee463fa1dcce7e92647c5b5828c
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libextra/time.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ pub fn now() -> Tm {
174174
at(get_time())
175175
}
176176

177+
/// Parses the time from the string according to the format string.
178+
pub fn strptime(s: &str, format: &str) -> Result<Tm, ~str> {
179+
do_strptime(s, format)
180+
}
181+
182+
/// Formats the time according to the format string.
183+
pub fn strftime(format: &str, tm: &Tm) -> ~str {
184+
do_strftime(format, tm)
185+
}
177186

178187
impl Tm {
179188
/// Convert time to the seconds from January 1, 1970
@@ -255,8 +264,7 @@ impl Tm {
255264
}
256265
}
257266

258-
/// Parses the time from the string according to the format string.
259-
pub fn strptime(s: &str, format: &str) -> Result<Tm, ~str> {
267+
fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
260268
fn match_str(s: &str, pos: uint, needle: &str) -> bool {
261269
let mut i = pos;
262270
for ch in needle.byte_iter() {
@@ -725,8 +733,7 @@ pub fn strptime(s: &str, format: &str) -> Result<Tm, ~str> {
725733
}
726734
}
727735

728-
/// Formats the time according to the format string.
729-
pub fn strftime(format: &str, tm: &Tm) -> ~str {
736+
fn do_strftime(format: &str, tm: &Tm) -> ~str {
730737
fn days_in_year(year: int) -> i32 {
731738
if ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0))) {
732739
366 /* Days in a leap year */

branches/dist-snap/src/librustc/middle/astencode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,13 +880,13 @@ fn encode_side_tables_for_ii(ecx: &e::EncodeContext,
880880
// Because the ast visitor uses @IdVisitingOperation, I can't pass in
881881
// ecx directly, but /I/ know that it'll be fine since the lifetime is
882882
// tied to the CrateContext that lives throughout this entire section.
883-
ast_util::visit_ids_for_inlined_item(ii, &SideTableEncodingIdVisitor {
883+
ast_util::visit_ids_for_inlined_item(ii, @SideTableEncodingIdVisitor {
884884
ecx_ptr: unsafe {
885885
cast::transmute(ecx)
886886
},
887887
new_ebml_w: new_ebml_w,
888888
maps: maps,
889-
});
889+
} as @ast_util::IdVisitingOperation);
890890
ebml_w.end_tag();
891891
}
892892

0 commit comments

Comments
 (0)