Skip to content

Commit 705e341

Browse files
committed
---
yaml --- r: 63689 b: refs/heads/snap-stage3 c: 7f61b31 h: refs/heads/master i: 63687: d472828 v: v3
1 parent 7580241 commit 705e341

File tree

11 files changed

+35
-39
lines changed

11 files changed

+35
-39
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c109bed15b79c81fed4277abd0f4a71a221224c1
4+
refs/heads/snap-stage3: 7f61b31f5f7aed3e6a4582a8a792df8378e1c6f0
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,9 +834,7 @@ do
834834
LLVM_TARGET="--target=$t"
835835

836836
# Disable unused LLVM features
837-
LLVM_OPTS="$LLVM_DBG_OPTS --disable-docs \
838-
--enable-bindings=none --disable-threads \
839-
--disable-pthreads"
837+
LLVM_OPTS="$LLVM_DBG_OPTS --disable-docs --enable-bindings=none"
840838

841839
case "$CFG_C_COMPILER" in
842840
("ccache clang")

branches/snap-stage3/mk/target.mk

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@
1313
# this exists can be found on issue #2400
1414
export CFG_COMPILER_TRIPLE
1515

16-
# The standard libraries should be held up to a higher standard than any old
17-
# code, make sure that these common warnings are denied by default. These can
18-
# be overridden during development temporarily. For stage0, we allow all these
19-
# to suppress warnings which may be bugs in stage0 (should be fixed in stage1+)
20-
# NOTE: add "-A warnings" after snapshot to WFLAGS_ST0
21-
WFLAGS_ST0 = -A unrecognized-lint
22-
WFLAGS_ST1 = -D warnings
23-
WFLAGS_ST2 = -D warnings
24-
2516
# TARGET_STAGE_N template: This defines how target artifacts are built
2617
# for all stage/target architecture combinations. The arguments:
2718
# $(1) is the stage
@@ -48,15 +39,15 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)): \
4839
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
4940
| $$(TLIB$(1)_T_$(2)_H_$(3))/
5041
@$$(call E, compile_and_link: $$@)
51-
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) -o $$@ $$< && touch $$@
42+
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
5243

5344
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)): \
5445
$$(EXTRALIB_CRATE) $$(EXTRALIB_INPUTS) \
5546
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
5647
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
5748
| $$(TLIB$(1)_T_$(2)_H_$(3))/
5849
@$$(call E, compile_and_link: $$@)
59-
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) -o $$@ $$< && touch $$@
50+
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
6051

6152
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)): \
6253
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \

branches/snap-stage3/src/libextra/term.rs

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

1717
use core::io;
18+
use core::os;
1819

19-
#[cfg(not(target_os = "win32"))] use core::os;
20-
#[cfg(not(target_os = "win32"))] use terminfo::*;
21-
#[cfg(not(target_os = "win32"))] use terminfo::searcher::open;
22-
#[cfg(not(target_os = "win32"))] use terminfo::parser::compiled::parse;
23-
#[cfg(not(target_os = "win32"))] use terminfo::parm::{expand, Number, Variables};
20+
use terminfo::*;
21+
use terminfo::searcher::open;
22+
use terminfo::parser::compiled::parse;
23+
use terminfo::parm::{expand, Number, Variables};
2424

2525
// FIXME (#2807): Windows support.
2626

@@ -122,10 +122,10 @@ impl Terminal {
122122
return Ok(Terminal {out: out, color_supported: false});
123123
}
124124

125-
pub fn fg(&self, _color: u8) {
125+
pub fn fg(&self, color: u8) {
126126
}
127127

128-
pub fn bg(&self, _color: u8) {
128+
pub fn bg(&self, color: u8) {
129129
}
130130

131131
pub fn reset(&self) {

branches/snap-stage3/src/libstd/libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ pub mod types {
568568
pub mod os {
569569
pub mod common {
570570
pub mod posix01 {
571-
use libc::types::os::arch::c95::c_short;
571+
use libc::types::os::arch::c95::{c_int, c_short};
572572
use libc::types::os::arch::extra::{int64, time64_t};
573573
use libc::types::os::arch::posix88::{dev_t, ino_t};
574574
use libc::types::os::arch::posix88::mode_t;

branches/snap-stage3/src/libstd/os.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ use io;
3333
use iterator::IteratorUtil;
3434
use libc;
3535
use libc::{c_char, c_void, c_int, size_t};
36-
use libc::FILE;
36+
use libc::{mode_t, FILE};
3737
use local_data;
38+
use option;
3839
use option::{Some, None};
3940
use os;
4041
use prelude::*;
@@ -180,6 +181,7 @@ pub fn env() -> ~[(~str,~str)] {
180181
unsafe {
181182
#[cfg(windows)]
182183
unsafe fn get_env_pairs() -> ~[~str] {
184+
use libc::types::os::arch::extra::LPTCH;
183185
use libc::funcs::extra::kernel32::{
184186
GetEnvironmentStringsA,
185187
FreeEnvironmentStringsA
@@ -246,10 +248,10 @@ pub fn getenv(n: &str) -> Option<~str> {
246248
do with_env_lock {
247249
let s = str::as_c_str(n, |s| libc::getenv(s));
248250
if ptr::null::<u8>() == cast::transmute(s) {
249-
None::<~str>
251+
option::None::<~str>
250252
} else {
251253
let s = cast::transmute(s);
252-
Some::<~str>(str::raw::from_buf(s))
254+
option::Some::<~str>(str::raw::from_buf(s))
253255
}
254256
}
255257
}
@@ -538,7 +540,7 @@ pub fn homedir() -> Option<Path> {
538540

539541
#[cfg(windows)]
540542
fn secondary() -> Option<Path> {
541-
do getenv("USERPROFILE").chain |p| {
543+
do getenv(~"USERPROFILE").chain |p| {
542544
if !p.is_empty() {
543545
Some(Path(p))
544546
} else {
@@ -645,7 +647,9 @@ pub fn make_dir(p: &Path, mode: c_int) -> bool {
645647
use os::win32::as_utf16_p;
646648
// FIXME: turn mode into something useful? #2623
647649
do as_utf16_p(p.to_str()) |buf| {
648-
libc::CreateDirectoryW(buf, cast::transmute(0))
650+
libc::CreateDirectoryW(buf, unsafe {
651+
cast::transmute(0)
652+
})
649653
!= (0 as libc::BOOL)
650654
}
651655
}
@@ -655,7 +659,7 @@ pub fn make_dir(p: &Path, mode: c_int) -> bool {
655659
fn mkdir(p: &Path, mode: c_int) -> bool {
656660
unsafe {
657661
do as_c_charp(p.to_str()) |c| {
658-
libc::mkdir(c, mode as libc::mode_t) == (0 as c_int)
662+
libc::mkdir(c, mode as mode_t) == (0 as c_int)
659663
}
660664
}
661665
}
@@ -728,6 +732,7 @@ pub fn list_dir(p: &Path) -> ~[~str] {
728732
}
729733
#[cfg(windows)]
730734
unsafe fn get_list(p: &Path) -> ~[~str] {
735+
use libc::types::os::arch::extra::{LPCTSTR, HANDLE, BOOL};
731736
use libc::consts::os::extra::INVALID_HANDLE_VALUE;
732737
use libc::wcslen;
733738
use libc::funcs::extra::kernel32::{
@@ -956,7 +961,7 @@ pub fn copy_file(from: &Path, to: &Path) -> bool {
956961

957962
// Give the new file the old file's permissions
958963
if do str::as_c_str(to.to_str()) |to_buf| {
959-
libc::chmod(to_buf, from_mode as libc::mode_t)
964+
libc::chmod(to_buf, from_mode as mode_t)
960965
} != 0 {
961966
return false; // should be a condition...
962967
}
@@ -1324,7 +1329,7 @@ pub fn glob(pattern: &str) -> ~[Path] {
13241329

13251330
/// Returns a vector of Path objects that match the given glob pattern
13261331
#[cfg(target_os = "win32")]
1327-
pub fn glob(_pattern: &str) -> ~[Path] {
1332+
pub fn glob(pattern: &str) -> ~[Path] {
13281333
fail!("glob() is unimplemented on Windows")
13291334
}
13301335

branches/snap-stage3/src/libstd/rt/thread_local_storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ pub type Key = DWORD;
6060
#[cfg(windows)]
6161
pub unsafe fn create(key: &mut Key) {
6262
static TLS_OUT_OF_INDEXES: DWORD = 0xFFFFFFFF;
63-
*key = TlsAlloc();
63+
*key = unsafe { TlsAlloc() };
6464
assert!(*key != TLS_OUT_OF_INDEXES);
6565
}
6666

6767
#[cfg(windows)]
6868
pub unsafe fn set(key: Key, value: *mut c_void) {
69-
assert!(0 != TlsSetValue(key, value))
69+
unsafe { assert!(0 != TlsSetValue(key, value)) }
7070
}
7171

7272
#[cfg(windows)]

branches/snap-stage3/src/libstd/run.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
1313
#[allow(missing_doc)];
1414

15+
use iterator::IteratorUtil;
1516
use cast;
1617
use comm::{stream, SharedChan, GenericChan, GenericPort};
18+
use int;
1719
use io;
18-
use iterator::IteratorUtil;
1920
use libc::{pid_t, c_void, c_int};
2021
use libc;
2122
use option::{Some, None};
@@ -464,6 +465,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
464465
use libc::funcs::extra::msvcrt::get_osfhandle;
465466

466467
use sys;
468+
use uint;
467469

468470
unsafe {
469471

@@ -636,7 +638,6 @@ fn spawn_process_os(prog: &str, args: &[~str],
636638

637639
use libc::funcs::posix88::unistd::{fork, dup2, close, chdir, execvp};
638640
use libc::funcs::bsd44::getdtablesize;
639-
use int;
640641

641642
mod rustrt {
642643
use libc::c_void;

branches/snap-stage3/src/libstd/task/spawn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ use uint;
9191
use util;
9292
use unstable::sync::{Exclusive, exclusive};
9393
use rt::local::Local;
94-
use iterator::IteratorUtil;
94+
use iterator::{IteratorUtil};
9595

9696
#[cfg(test)] use task::default_task_opts;
9797
#[cfg(test)] use comm;

branches/snap-stage3/src/libstd/to_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The `ToStr` trait for converting to strings
1717
use str::OwnedStr;
1818
use hashmap::HashMap;
1919
use hashmap::HashSet;
20-
use hash::Hash;
2120
use iterator::IteratorUtil;
21+
use hash::Hash;
2222
use cmp::Eq;
2323
use vec::ImmutableVector;
2424

@@ -177,7 +177,7 @@ impl<A:ToStr> ToStr for @[A] {
177177
mod tests {
178178
use hashmap::HashMap;
179179
use hashmap::HashSet;
180-
use container::{Set, Map};
180+
use container::{Set,Map};
181181
#[test]
182182
fn test_simple_types() {
183183
assert_eq!(1i.to_str(), ~"1");

branches/snap-stage3/src/libstd/unstable/dynamic_lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ mod dl {
164164
use libc;
165165
use path;
166166
use ptr;
167+
use str;
167168
use task;
168169
use result::*;
169170

@@ -174,7 +175,7 @@ mod dl {
174175
}
175176

176177
pub unsafe fn open_internal() -> *libc::c_void {
177-
let handle = ptr::null();
178+
let mut handle = ptr::null();
178179
GetModuleHandleExW(0 as libc::DWORD, ptr::null(), &handle as **libc::c_void);
179180
handle
180181
}

0 commit comments

Comments
 (0)