Skip to content

Commit 742571c

Browse files
committed
---
yaml --- r: 152423 b: refs/heads/try2 c: f02b6f3 h: refs/heads/master i: 152421: 72c516a 152419: 464055b 152415: bd54db6 v: v3
1 parent c295e0c commit 742571c

Some content is hidden

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

48 files changed

+991
-801
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5bc2d03955618664377e98352d784a7f145db24a
8+
refs/heads/try2: f02b6f3a8bf82ca11ba50a285841fb372c4da459
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
292292
save_metrics: config.save_metrics.clone(),
293293
test_shard: config.test_shard.clone(),
294294
nocapture: false,
295-
color: test::AutoColor,
296295
}
297296
}
298297

branches/try2/src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use std::os;
1212
use std::str;
1313
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
14-
use std::dynamic_lib::DynamicLibrary;
14+
use std::unstable::dynamic_lib::DynamicLibrary;
1515

1616
fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
1717
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};

branches/try2/src/libcollections/bitv.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use core::prelude::*;
1414

1515
use core::cmp;
16-
use core::default::Default;
1716
use core::fmt;
1817
use core::iter::{Enumerate, Repeat, Map, Zip};
1918
use core::ops;
@@ -699,11 +698,6 @@ pub struct BitvSet {
699698
bitv: BigBitv
700699
}
701700

702-
impl Default for BitvSet {
703-
#[inline]
704-
fn default() -> BitvSet { BitvSet::new() }
705-
}
706-
707701
impl BitvSet {
708702
/// Creates a new bit vector set with initially no contents
709703
pub fn new() -> BitvSet {

branches/try2/src/libcollections/dlist.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use core::prelude::*;
2525

2626
use alloc::owned::Box;
27-
use core::default::Default;
2827
use core::fmt;
2928
use core::iter;
3029
use core::mem;
@@ -263,11 +262,6 @@ impl<T> Deque<T> for DList<T> {
263262
}
264263
}
265264

266-
impl<T> Default for DList<T> {
267-
#[inline]
268-
fn default() -> DList<T> { DList::new() }
269-
}
270-
271265
impl<T> DList<T> {
272266
/// Create an empty DList
273267
#[inline]

branches/try2/src/libcollections/priority_queue.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
use core::prelude::*;
1616

17-
use core::default::Default;
1817
use core::mem::{zeroed, replace, swap};
1918
use core::ptr;
2019

@@ -38,11 +37,6 @@ impl<T: Ord> Mutable for PriorityQueue<T> {
3837
fn clear(&mut self) { self.data.truncate(0) }
3938
}
4039

41-
impl<T: Ord> Default for PriorityQueue<T> {
42-
#[inline]
43-
fn default() -> PriorityQueue<T> { PriorityQueue::new() }
44-
}
45-
4640
impl<T: Ord> PriorityQueue<T> {
4741
/// An iterator visiting all values in underlying vector, in
4842
/// arbitrary order.

branches/try2/src/libcollections/ringbuf.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use core::prelude::*;
1717

1818
use core::cmp;
19-
use core::default::Default;
2019
use core::fmt;
2120
use core::iter::RandomAccessIterator;
2221

@@ -113,11 +112,6 @@ impl<T> Deque<T> for RingBuf<T> {
113112
}
114113
}
115114

116-
impl<T> Default for RingBuf<T> {
117-
#[inline]
118-
fn default() -> RingBuf<T> { RingBuf::new() }
119-
}
120-
121115
impl<T> RingBuf<T> {
122116
/// Create an empty RingBuf
123117
pub fn new() -> RingBuf<T> {

branches/try2/src/libcollections/smallintmap.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
use core::prelude::*;
1919

20-
use core::default::Default;
2120
use core::fmt;
2221
use core::iter::{Enumerate, FilterMap};
2322
use core::mem::replace;
@@ -115,11 +114,6 @@ impl<V> MutableMap<uint, V> for SmallIntMap<V> {
115114
}
116115
}
117116

118-
impl<V> Default for SmallIntMap<V> {
119-
#[inline]
120-
fn default() -> SmallIntMap<V> { SmallIntMap::new() }
121-
}
122-
123117
impl<V> SmallIntMap<V> {
124118
/// Create an empty SmallIntMap
125119
pub fn new() -> SmallIntMap<V> { SmallIntMap{v: vec!()} }

branches/try2/src/libcollections/treemap.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use core::prelude::*;
1616

1717
use alloc::owned::Box;
18-
use core::default::Default;
1918
use core::fmt;
2019
use core::fmt::Show;
2120
use core::iter::Peekable;
@@ -136,11 +135,6 @@ impl<K: Ord, V> MutableMap<K, V> for TreeMap<K, V> {
136135
}
137136
}
138137

139-
impl<K: Ord, V> Default for TreeMap<K,V> {
140-
#[inline]
141-
fn default() -> TreeMap<K, V> { TreeMap::new() }
142-
}
143-
144138
impl<K: Ord, V> TreeMap<K, V> {
145139
/// Create an empty TreeMap
146140
pub fn new() -> TreeMap<K, V> { TreeMap{root: None, length: 0} }
@@ -639,11 +633,6 @@ impl<T: Ord> MutableSet<T> for TreeSet<T> {
639633
fn remove(&mut self, value: &T) -> bool { self.map.remove(value) }
640634
}
641635

642-
impl<T: Ord> Default for TreeSet<T> {
643-
#[inline]
644-
fn default() -> TreeSet<T> { TreeSet::new() }
645-
}
646-
647636
impl<T: Ord> TreeSet<T> {
648637
/// Create an empty TreeSet
649638
#[inline]

branches/try2/src/libcollections/trie.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use core::prelude::*;
1414

1515
use alloc::owned::Box;
16-
use core::default::Default;
1716
use core::mem::zeroed;
1817
use core::mem;
1918
use core::uint;
@@ -106,11 +105,6 @@ impl<T> MutableMap<uint, T> for TrieMap<T> {
106105
}
107106
}
108107

109-
impl<T> Default for TrieMap<T> {
110-
#[inline]
111-
fn default() -> TrieMap<T> { TrieMap::new() }
112-
}
113-
114108
impl<T> TrieMap<T> {
115109
/// Create an empty TrieMap
116110
#[inline]
@@ -338,11 +332,6 @@ impl MutableSet<uint> for TrieSet {
338332
}
339333
}
340334

341-
impl Default for TrieSet {
342-
#[inline]
343-
fn default() -> TrieSet { TrieSet::new() }
344-
}
345-
346335
impl TrieSet {
347336
/// Create an empty TrieSet
348337
#[inline]

branches/try2/src/libnative/io/c_win32.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ extern "system" {
6969
pub mod compat {
7070
use std::intrinsics::{atomic_store_relaxed, transmute};
7171
use libc::types::os::arch::extra::{LPCWSTR, HMODULE, LPCSTR, LPVOID};
72+
use std::os::win32::as_utf16_p;
7273

7374
extern "system" {
7475
fn GetModuleHandleW(lpModuleName: LPCWSTR) -> HMODULE;
@@ -79,11 +80,12 @@ pub mod compat {
7980
// This way, calling a function in this compatibility layer (after it's loaded) shouldn't
8081
// be any slower than a regular DLL call.
8182
unsafe fn store_func<T: Copy>(ptr: *mut T, module: &str, symbol: &str, fallback: T) {
82-
let module = module.to_utf16().append_one(0);
83-
symbol.with_c_str(|symbol| {
84-
let handle = GetModuleHandleW(module.as_ptr());
85-
let func: Option<T> = transmute(GetProcAddress(handle, symbol));
86-
atomic_store_relaxed(ptr, func.unwrap_or(fallback))
83+
as_utf16_p(module, |module| {
84+
symbol.with_c_str(|symbol| {
85+
let handle = GetModuleHandleW(module);
86+
let func: Option<T> = transmute(GetProcAddress(handle, symbol));
87+
atomic_store_relaxed(ptr, func.unwrap_or(fallback))
88+
})
8789
})
8890
}
8991

0 commit comments

Comments
 (0)