Skip to content

Commit 95af41e

Browse files
committed
---
yaml --- r: 142455 b: refs/heads/try2 c: c1c7768 h: refs/heads/master i: 142453: 4b50c2a 142451: e38ce47 142447: e8e6c9e v: v3
1 parent f675982 commit 95af41e

File tree

30 files changed

+103
-135
lines changed

30 files changed

+103
-135
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: 10c7698d4b43aa9bd9b30df5e0769189d3a83110
8+
refs/heads/try2: c1c7768b32f7304e6e9fe2cb53680da9fa004d4e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# The names of crates that must be tested
1717
TEST_TARGET_CRATES = std extra
18-
TEST_HOST_CRATES = syntax rustc rustdoc rusti rust rustpkg
18+
TEST_HOST_CRATES = syntax rustc rustdoc rust rustpkg
1919
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2020

2121
# Markdown files under doc/ that should have their code extracted and run

branches/try2/mk/tools.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \
5050
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
5151
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4))
5252
@$$(call E, compile_and_link: $$@)
53-
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
53+
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) -o $$@ $$< && touch $$@
5454

5555
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X_$(4)): \
5656
$$(DRIVER_CRATE) \

branches/try2/src/compiletest/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
#[deriving(Eq)]
1412
pub enum mode {
1513
mode_compile_fail,

branches/try2/src/compiletest/compiletest.rs

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,16 @@
1111
#[crate_type = "bin"];
1212

1313
#[allow(non_camel_case_types)];
14+
#[allow(unrecognized_lint)]; // NOTE: remove after snapshot
15+
#[deny(warnings)];
1416

15-
#[no_core]; // XXX: Remove after snapshot
16-
#[no_std];
17+
extern mod extra;
1718

18-
extern mod core(name = "std", vers = "0.7");
19-
extern mod extra(name = "extra", vers = "0.7");
20-
21-
use core::prelude::*;
22-
use core::*;
19+
use std::os;
2320

2421
use extra::getopts;
2522
use extra::test;
2623

27-
use core::result::{Ok, Err};
28-
2924
use common::config;
3025
use common::mode_run_pass;
3126
use common::mode_run_fail;
@@ -42,13 +37,6 @@ pub mod runtest;
4237
pub mod common;
4338
pub mod errors;
4439

45-
mod std {
46-
pub use core::cmp;
47-
pub use core::str;
48-
pub use core::sys;
49-
pub use core::unstable;
50-
}
51-
5240
pub fn main() {
5341
let args = os::args();
5442
let config = parse_config(args);
@@ -98,8 +86,8 @@ pub fn parse_config(args: ~[~str]) -> config {
9886
run_ignored: getopts::opt_present(matches, "ignored"),
9987
filter:
10088
if !matches.free.is_empty() {
101-
option::Some(copy matches.free[0])
102-
} else { option::None },
89+
Some(copy matches.free[0])
90+
} else { None },
10391
logfile: getopts::opt_maybe_str(matches, "logfile").map(|s| Path(*s)),
10492
runtool: getopts::opt_maybe_str(matches, "runtool"),
10593
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
@@ -148,8 +136,8 @@ pub fn log_config(config: &config) {
148136

149137
pub fn opt_str<'a>(maybestr: &'a Option<~str>) -> &'a str {
150138
match *maybestr {
151-
option::None => "(none)",
152-
option::Some(ref s) => {
139+
None => "(none)",
140+
Some(ref s) => {
153141
let s: &'a str = *s;
154142
s
155143
}
@@ -161,7 +149,7 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
161149
}
162150

163151
pub fn str_opt(maybestr: ~str) -> Option<~str> {
164-
if maybestr != ~"(none)" { option::Some(maybestr) } else { option::None }
152+
if maybestr != ~"(none)" { Some(maybestr) } else { None }
165153
}
166154

167155
pub fn str_mode(s: ~str) -> mode {
@@ -199,8 +187,8 @@ pub fn test_opts(config: &config) -> test::TestOpts {
199187
logfile: copy config.logfile,
200188
run_tests: true,
201189
run_benchmarks: false,
202-
save_results: option::None,
203-
compare_results: option::None
190+
save_results: None,
191+
compare_results: None
204192
}
205193
}
206194

@@ -268,7 +256,7 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
268256
}
269257

270258
pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn {
271-
use core::cell::Cell;
259+
use std::cell::Cell;
272260
let config = Cell::new(copy *config);
273261
let testfile = Cell::new(testfile.to_str());
274262
test::DynTestFn(|| { runtest::run(config.take(), testfile.take()) })

branches/try2/src/compiletest/errors.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
13-
use core::io;
11+
use std::io;
1412

1513
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
1614

branches/try2/src/compiletest/header.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use common::config;
1412
use common;
1513

16-
use core::io;
17-
use core::os;
14+
use std::io;
15+
use std::os;
1816

1917
pub struct TestProps {
2018
// Lines that should be expected, in order, on standard out

branches/try2/src/compiletest/procsrv.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
13-
use core::os;
14-
use core::run;
15-
use core::str;
11+
use std::os;
12+
use std::run;
13+
use std::str;
1614

1715
#[cfg(target_os = "win32")]
1816
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {

branches/try2/src/compiletest/runtest.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use common::mode_run_pass;
1412
use common::mode_run_fail;
1513
use common::mode_compile_fail;
@@ -22,10 +20,10 @@ use procsrv;
2220
use util;
2321
use util::logv;
2422

25-
use core::io;
26-
use core::os;
27-
use core::uint;
28-
use core::vec;
23+
use std::io;
24+
use std::os;
25+
use std::uint;
26+
use std::vec;
2927

3028
pub fn run(config: config, testfile: ~str) {
3129
if config.verbose {

branches/try2/src/compiletest/util.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use common::config;
1412

15-
use core::io;
16-
use core::os::getenv;
13+
use std::io;
14+
use std::os::getenv;
1715

1816
pub fn make_new_path(path: &str) -> ~str {
1917

branches/try2/src/driver/driver.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[no_core];
12-
#[no_std];
13-
14-
extern mod core(name = "std", vers = "0.7");
15-
1611
#[cfg(rustpkg)]
1712
extern mod this(name = "rustpkg");
1813

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ syn region rustDeriving start="deriving(" end=")" contains=rustTrait
9595
" Number literals
9696
syn match rustNumber display "\<[0-9][0-9_]*\>"
9797
syn match rustNumber display "\<[0-9][0-9_]*\(u\|u8\|u16\|u32\|u64\)\>"
98-
syn match rustNumber display "\<[0-9][0-9_]*\(i8\|i16\|i32\|i64\)\>"
98+
syn match rustNumber display "\<[0-9][0-9_]*\(i\|i8\|i16\|i32\|i64\)\>"
9999

100100
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\>"
101101
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\(u\|u8\|u16\|u32\|u64\)\>"

branches/try2/src/librustc/front/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use front::config;
1717
use std::vec;
1818
use syntax::ast_util::*;
1919
use syntax::attr;
20-
use syntax::codemap::{dummy_sp, span, ExpandedFrom, CallInfo, NameAndSpan};
20+
use syntax::codemap::{dummy_sp, span, ExpnInfo, NameAndSpan};
2121
use syntax::codemap;
2222
use syntax::ext::base::ExtCtxt;
2323
use syntax::fold;
@@ -72,13 +72,13 @@ fn generate_test_harness(sess: session::Session,
7272
};
7373

7474
let ext_cx = cx.ext_cx;
75-
ext_cx.bt_push(ExpandedFrom(CallInfo {
75+
ext_cx.bt_push(ExpnInfo {
7676
call_site: dummy_sp(),
7777
callee: NameAndSpan {
7878
name: @"test",
7979
span: None
8080
}
81-
}));
81+
});
8282

8383
let precursor = @fold::AstFoldFns {
8484
fold_crate: fold::wrap(|a,b| fold_crate(cx, a, b) ),

branches/try2/src/librustc/middle/lint.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,6 @@ fn lint_unused_mut() -> visit::vt<@mut Context> {
966966
visit_fn_decl(cx, &tm.decl);
967967
visit::visit_ty_method(tm, (cx, vt));
968968
},
969-
visit_struct_method: |sm, (cx, vt)| {
970-
visit_fn_decl(cx, &sm.decl);
971-
visit::visit_struct_method(sm, (cx, vt));
972-
},
973969
visit_trait_method: |tm, (cx, vt)| {
974970
match *tm {
975971
ast::required(ref tm) => visit_fn_decl(cx, &tm.decl),
@@ -1049,14 +1045,6 @@ fn lint_missing_doc() -> visit::vt<@mut Context> {
10491045
}
10501046

10511047
visit::mk_vt(@visit::Visitor {
1052-
visit_struct_method: |m, (cx, vt)| {
1053-
if m.vis == ast::public {
1054-
check_attrs(cx, m.attrs, m.span,
1055-
"missing documentation for a method");
1056-
}
1057-
visit::visit_struct_method(m, (cx, vt));
1058-
},
1059-
10601048
visit_ty_method: |m, (cx, vt)| {
10611049
// All ty_method objects are linted about because they're part of a
10621050
// trait (no visibility)

branches/try2/src/librusti/rusti.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,10 @@ mod tests {
667667
fn f() {}
668668
f()
669669
");
670+
}
670671

671-
debug!("simultaneous definitions + expressions are allowed");
672+
#[test]
673+
fn simultaneous_definition_and_expression() {
672674
run_program("
673675
let a = 3; a as u8
674676
");

branches/try2/src/librustpkg/api.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ use package_id::*;
1414
use package_source::*;
1515
use version::Version;
1616

17-
use std::option::*;
1817
use std::os;
1918
use std::hashmap::*;
20-
use std::path::*;
2119

2220
/// Convenience functions intended for calling from pkg.rs
2321

branches/try2/src/librustpkg/messages.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use extra::term;
1212
use std::io;
13-
use std::result::*;
1413

1514
pub fn note(msg: &str) {
1615
pretty_message(msg, "note: ", term::color::GREEN, io::stdout())

branches/try2/src/librustpkg/package_source.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use target::*;
1212
use package_id::PkgId;
1313
use std::path::Path;
14-
use std::option::*;
1514
use std::{os, run, str};
1615
use context::*;
1716
use crate::Crate;

branches/try2/src/librustpkg/util.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::{libc, os, result, str};
11+
use std::{os, result};
1212
use rustc::driver::{driver, session};
1313
use rustc::metadata::filesearch;
1414
use extra::getopts::groups::getopts;
@@ -379,6 +379,7 @@ pub fn link_exe(_src: &Path, _dest: &Path) -> bool {
379379
#[cfg(target_os = "freebsd")]
380380
#[cfg(target_os = "macos")]
381381
pub fn link_exe(src: &Path, dest: &Path) -> bool {
382+
use std::{libc, str};
382383
unsafe {
383384
do str::as_c_str(src.to_str()) |src_buf| {
384385
do str::as_c_str(dest.to_str()) |dest_buf| {

branches/try2/src/libstd/unstable/intrinsics.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,17 @@ pub extern "rust-intrinsic" {
417417
pub fn bswap32(x: i32) -> i32;
418418
pub fn bswap64(x: i64) -> i64;
419419
}
420+
421+
#[cfg(target_endian = "little")] pub fn to_le16(x: i16) -> i16 { x }
422+
#[cfg(target_endian = "big")] pub fn to_le16(x: i16) -> i16 { unsafe { bswap16(x) } }
423+
#[cfg(target_endian = "little")] pub fn to_le32(x: i32) -> i32 { x }
424+
#[cfg(target_endian = "big")] pub fn to_le32(x: i32) -> i32 { unsafe { bswap32(x) } }
425+
#[cfg(target_endian = "little")] pub fn to_le64(x: i64) -> i64 { x }
426+
#[cfg(target_endian = "big")] pub fn to_le64(x: i64) -> i64 { unsafe { bswap64(x) } }
427+
428+
#[cfg(target_endian = "little")] pub fn to_be16(x: i16) -> i16 { unsafe { bswap16(x) } }
429+
#[cfg(target_endian = "big")] pub fn to_be16(x: i16) -> i16 { x }
430+
#[cfg(target_endian = "little")] pub fn to_be32(x: i32) -> i32 { unsafe { bswap32(x) } }
431+
#[cfg(target_endian = "big")] pub fn to_be32(x: i32) -> i32 { x }
432+
#[cfg(target_endian = "little")] pub fn to_be64(x: i64) -> i64 { unsafe { bswap64(x) } }
433+
#[cfg(target_endian = "big")] pub fn to_be64(x: i64) -> i64 { x }

branches/try2/src/libsyntax/codemap.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,13 @@ pub struct FileMapAndBytePos {fm: @FileMap, pos: BytePos}
174174
#[deriving(IterBytes)]
175175
pub struct NameAndSpan {name: @str, span: Option<span>}
176176

177+
/// Extra information for tracking macro expansion of spans
177178
#[deriving(IterBytes)]
178-
pub struct CallInfo {
179+
pub struct ExpnInfo {
179180
call_site: span,
180181
callee: NameAndSpan
181182
}
182183

183-
/// Extra information for tracking macro expansion of spans
184-
#[deriving(IterBytes)]
185-
pub enum ExpnInfo {
186-
ExpandedFrom(CallInfo)
187-
}
188-
189184
pub type FileName = @str;
190185

191186
pub struct FileLines

0 commit comments

Comments
 (0)