Skip to content

Commit d4ea20f

Browse files
committed
---
yaml --- r: 151167 b: refs/heads/try2 c: 6c41253 h: refs/heads/master i: 151165: 3d26ac4 151163: 885dc7e 151159: 5324772 151151: 60b8d14 151135: e54df38 151103: aa2e817 151039: 23747c4 v: v3
1 parent e0ab41f commit d4ea20f

File tree

47 files changed

+73
-462
lines changed

Some content is hidden

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

47 files changed

+73
-462
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: 1f4278d650837bf30e5461fd15c2364b2bb5ceff
8+
refs/heads/try2: 6c41253a473728451283e20bef3498fdfe797243
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/tutorial.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,11 @@ spawn(proc() {
17931793
});
17941794
~~~~
17951795
1796+
> *Note:* If you want to see the output of `debug!` statements, you will need to turn on
1797+
> `debug!` logging. To enable `debug!` logging, set the RUST_LOG environment
1798+
> variable to the name of your crate, which, for a file named `foo.rs`, will be
1799+
> `foo` (e.g., with bash, `export RUST_LOG=foo`).
1800+
17961801
## Closure compatibility
17971802
17981803
Rust closures have a convenient subtyping property: you can pass any kind of

branches/try2/src/etc/maketest.py

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,26 @@
1212
import os
1313
import sys
1414

15-
# msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
16-
# `c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
17-
# the value is list of paths.
18-
# this causes great confusion and error: shell and Makefile doesn't like
19-
# windows paths so it is really error-prone. revert it for peace.
20-
def normalize_path(v):
21-
# c:\path -> /c/path
22-
if ':\\' in v:
23-
v = '/' + v.replace(':\\', '/')
24-
v = v.replace('\\', '/')
25-
return v
26-
27-
28-
def putenv(name, value):
29-
if os.name == 'nt':
30-
value = normalize_path(value)
31-
os.putenv(name, value)
32-
15+
# FIXME #12303 these tests are broken on windows
16+
if os.name == 'nt':
17+
print 'ignoring make tests on windows'
18+
sys.exit(0)
3319

3420
make = sys.argv[2]
35-
putenv('RUSTC', os.path.abspath(sys.argv[3]))
36-
putenv('TMPDIR', os.path.abspath(sys.argv[4]))
37-
putenv('CC', sys.argv[5])
38-
putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
21+
os.putenv('RUSTC', os.path.abspath(sys.argv[3]))
22+
os.putenv('TMPDIR', os.path.abspath(sys.argv[4]))
23+
os.putenv('CC', sys.argv[5])
24+
os.putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
3925
filt = sys.argv[7]
4026
ldpath = sys.argv[8]
4127
if ldpath != '':
42-
name = ldpath.split('=')[0]
43-
value = ldpath.split('=')[1]
44-
if os.name == 'nt' and name != 'PATH':
45-
value = ":".join(normalize_path(v) for v in value.split(";"))
46-
os.putenv(name, value)
28+
os.putenv(ldpath.split('=')[0], ldpath.split('=')[1])
4729

4830
if not filt in sys.argv[1]:
4931
sys.exit(0)
5032
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))
5133

52-
path = sys.argv[1]
53-
if path[-1] == '/':
54-
# msys1 has a bug that `make` fails to include `../tools.mk` (parent dir)
55-
# if `-C path` option is given and `path` is absolute directory with
56-
# trailing slash (`c:/path/to/test/`).
57-
# the easist workaround is to remove the slash (`c:/path/to/test`).
58-
# msys2 seems to fix this problem.
59-
path = path[:-1]
60-
61-
proc = subprocess.Popen([make, '-C', path],
34+
proc = subprocess.Popen([make, '-C', sys.argv[1]],
6235
stdout = subprocess.PIPE,
6336
stderr = subprocess.PIPE)
6437
out, err = proc.communicate()

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ fn fold_mod(cx: &mut Context, m: &ast::Mod) -> ast::Mod {
7070
filter_view_item(cx, a).map(|x| cx.fold_view_item(x))
7171
}).collect();
7272
ast::Mod {
73-
inner: m.inner,
7473
view_items: filtered_view_items,
7574
items: flattened_items
7675
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
143143
}
144144

145145
let mod_nomain = ast::Mod {
146-
inner: m.inner,
147146
view_items: m.view_items.clone(),
148147
items: m.items.iter().map(|i| nomain(&self.cx, *i)).collect(),
149148
};
@@ -336,7 +335,6 @@ fn mk_test_module(cx: &TestCtxt) -> @ast::Item {
336335
)).unwrap();
337336

338337
let testmod = ast::Mod {
339-
inner: DUMMY_SP,
340338
view_items: view_items,
341339
items: vec!(mainfn, tests),
342340
};

branches/try2/src/librustdoc/clean.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -227,27 +227,10 @@ impl Clean<Item> for doctree::Module {
227227
self.view_items.clean().move_iter().collect(),
228228
self.macros.clean().move_iter().collect()
229229
);
230-
231-
// determine if we should display the inner contents or
232-
// the outer `mod` item for the source code.
233-
let where = {
234-
let ctxt = local_data::get(super::ctxtkey, |x| *x.unwrap());
235-
let cm = ctxt.sess().codemap();
236-
let outer = cm.lookup_char_pos(self.where_outer.lo);
237-
let inner = cm.lookup_char_pos(self.where_inner.lo);
238-
if outer.file.start_pos == inner.file.start_pos {
239-
// mod foo { ... }
240-
self.where_outer
241-
} else {
242-
// mod foo; (and a separate FileMap for the contents)
243-
self.where_inner
244-
}
245-
};
246-
247230
Item {
248231
name: Some(name),
249232
attrs: self.attrs.clean(),
250-
source: where.clean(),
233+
source: self.where.clean(),
251234
visibility: self.vis.clean(),
252235
id: self.id,
253236
inner: ModuleItem(Module {

branches/try2/src/librustdoc/doctree.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use syntax::ast::{Ident, NodeId};
1919
pub struct Module {
2020
pub name: Option<Ident>,
2121
pub attrs: Vec<ast::Attribute>,
22-
pub where_outer: Span,
23-
pub where_inner: Span,
22+
pub where: Span,
2423
pub structs: Vec<Struct>,
2524
pub enums: Vec<Enum>,
2625
pub fns: Vec<Function>,
@@ -43,8 +42,7 @@ impl Module {
4342
name : name,
4443
id: 0,
4544
vis: ast::Inherited,
46-
where_outer: syntax::codemap::DUMMY_SP,
47-
where_inner: syntax::codemap::DUMMY_SP,
45+
where: syntax::codemap::DUMMY_SP,
4846
attrs : Vec::new(),
4947
structs : Vec::new(),
5048
enums : Vec::new(),

branches/try2/src/librustdoc/visit_ast.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ impl<'a> RustdocVisitor<'a> {
118118
for item in m.view_items.iter() {
119119
self.visit_view_item(item, &mut om);
120120
}
121-
om.where_outer = span;
122-
om.where_inner = m.inner;
121+
om.where = span;
123122
om.attrs = attrs;
124123
om.vis = vis;
125124
om.id = id;

branches/try2/src/librustuv/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ mod homing;
8888
mod queue;
8989
mod rc;
9090

91-
/// The implementation of `rtio` for libuv
9291
pub mod uvio;
93-
94-
/// C bindings to libuv
9592
pub mod uvll;
9693

9794
pub mod file;

branches/try2/src/librustuv/uvio.rs

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

11+
//! The implementation of `rtio` for libuv
12+
1113
use std::c_str::CString;
1214
use std::cast;
1315
use std::io::IoError;

branches/try2/src/libstd/mem.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -248,38 +248,6 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
248248
/**
249249
* Replace the value at a mutable location with a new one, returning the old
250250
* value, without deinitialising or copying either one.
251-
*
252-
* This is primarily used for transferring and swapping ownership of a value
253-
* in a mutable location. For example, this function allows consumption of
254-
* one field of a struct by replacing it with another value. The normal approach
255-
* doesn't always work:
256-
*
257-
* ```rust,ignore
258-
* struct Buffer<T> { buf: Vec<T> }
259-
*
260-
* impl<T> Buffer<T> {
261-
* fn get_and_reset(&mut self) -> Vec<T> {
262-
* // error: cannot move out of dereference of `&mut`-pointer
263-
* let buf = self.buf;
264-
* self.buf = Vec::new();
265-
* buf
266-
* }
267-
* }
268-
* ```
269-
*
270-
* Note that `T` does not necessarily implement `Clone`, so it can't even
271-
* clone and reset `self.buf`. But `replace` can be used to disassociate
272-
* the original value of `self.buf` from `self`, allowing it to be returned:
273-
*
274-
* ```rust
275-
* # struct Buffer<T> { buf: Vec<T> }
276-
* impl<T> Buffer<T> {
277-
* fn get_and_reset(&mut self) -> Vec<T> {
278-
* use std::mem::replace;
279-
* replace(&mut self.buf, Vec::new())
280-
* }
281-
* }
282-
* ```
283251
*/
284252
#[inline]
285253
pub fn replace<T>(dest: &mut T, mut src: T) -> T {

branches/try2/src/libstd/rt/backtrace.rs

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

11+
//! Simple backtrace functionality (to print on failure)
12+
1113
#![allow(non_camel_case_types)]
1214

1315
use char::Char;

branches/try2/src/libstd/rt/global_heap.rs

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

11+
12+
//! The global (exchange) heap.
13+
1114
use libc::{c_void, size_t, free, malloc, realloc};
1215
use ptr::{RawPtr, mut_null};
1316
use intrinsics::abort;

branches/try2/src/libstd/rt/mod.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,44 +85,44 @@ pub mod shouldnt_be_public {
8585
// Internal macros used by the runtime.
8686
mod macros;
8787

88-
/// The global (exchange) heap.
88+
// The global (exchange) heap.
8989
pub mod global_heap;
9090

91-
/// Implementations of language-critical runtime features like @.
91+
// Implementations of language-critical runtime features like @.
9292
pub mod task;
9393

94-
/// The EventLoop and internal synchronous I/O interface.
94+
// The EventLoop and internal synchronous I/O interface.
9595
pub mod rtio;
9696

97-
/// The Local trait for types that are accessible via thread-local
98-
/// or task-local storage.
97+
// The Local trait for types that are accessible via thread-local
98+
// or task-local storage.
9999
pub mod local;
100100

101-
/// Bindings to system threading libraries.
101+
// Bindings to system threading libraries.
102102
pub mod thread;
103103

104-
/// The runtime configuration, read from environment variables.
104+
// The runtime configuration, read from environment variables.
105105
pub mod env;
106106

107-
/// The local, managed heap
107+
// The local, managed heap
108108
pub mod local_heap;
109109

110-
/// The runtime needs to be able to put a pointer into thread-local storage.
110+
// The runtime needs to be able to put a pointer into thread-local storage.
111111
mod local_ptr;
112112

113-
/// Bindings to pthread/windows thread-local storage.
113+
// Bindings to pthread/windows thread-local storage.
114114
mod thread_local_storage;
115115

116-
/// Stack unwinding
116+
// Stack unwinding
117117
pub mod unwind;
118118

119-
/// The interface to libunwind that rust is using.
119+
// The interface to libunwind that rust is using.
120120
mod libunwind;
121121

122-
/// Simple backtrace functionality (to print on failure)
122+
// Simple backtrace functionality (to print on failure)
123123
pub mod backtrace;
124124

125-
/// Just stuff
125+
// Just stuff
126126
mod util;
127127

128128
// Global command line argument storage

branches/try2/src/libstd/rt/rtio.rs

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

11+
//! The EventLoop and internal synchronous I/O interface.
12+
1113
use c_str::CString;
1214
use cast;
1315
use comm::{Sender, Receiver};

branches/try2/src/libstd/rt/unwind.rs

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

11+
//! Stack unwinding
12+
1113
// Implementation of Rust stack unwinding
1214
//
1315
// For background on exception handling and stack unwinding please see

branches/try2/src/libstd/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ impl<T:Eq> Vec<T> {
12881288
// +---+---+---+---+---+---+
12891289
// w
12901290
//
1291-
// Comparing self[r] against self[w-1], this is not a duplicate, so
1291+
// Comparing self[r] against self[w-1], tis is not a duplicate, so
12921292
// we swap self[r] and self[w] (no effect as r==w) and then increment both
12931293
// r and w, leaving us with:
12941294
//

branches/try2/src/libsyntax/ast.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -921,12 +921,8 @@ pub struct Method {
921921

922922
#[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash)]
923923
pub struct Mod {
924-
/// A span from the first token past `{` to the last token until `}`.
925-
/// For `mod foo;`, the inner span ranges from the first token
926-
/// to the last token in the external file.
927-
pub inner: Span,
928-
pub view_items: Vec<ViewItem>,
929-
pub items: Vec<@Item>,
924+
pub view_items: Vec<ViewItem> ,
925+
pub items: Vec<@Item> ,
930926
}
931927

932928
#[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash)]
@@ -1169,15 +1165,7 @@ mod test {
11691165
fn check_asts_encodable() {
11701166
use std::io;
11711167
let e = Crate {
1172-
module: Mod {
1173-
inner: Span {
1174-
lo: BytePos(11),
1175-
hi: BytePos(19),
1176-
expn_info: None,
1177-
},
1178-
view_items: Vec::new(),
1179-
items: Vec::new(),
1180-
},
1168+
module: Mod {view_items: Vec::new(), items: Vec::new()},
11811169
attrs: Vec::new(),
11821170
config: Vec::new(),
11831171
span: Span {

branches/try2/src/libsyntax/ext/build.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub trait AstBuilder {
220220
generics: Generics) -> @ast::Item;
221221
fn item_struct(&self, span: Span, name: Ident, struct_def: ast::StructDef) -> @ast::Item;
222222

223-
fn item_mod(&self, span: Span, inner_span: Span,
223+
fn item_mod(&self, span: Span,
224224
name: Ident, attrs: Vec<ast::Attribute> ,
225225
vi: Vec<ast::ViewItem> , items: Vec<@ast::Item> ) -> @ast::Item;
226226

@@ -898,7 +898,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
898898
self.item(span, name, Vec::new(), ast::ItemStruct(@struct_def, generics))
899899
}
900900

901-
fn item_mod(&self, span: Span, inner_span: Span, name: Ident,
901+
fn item_mod(&self, span: Span, name: Ident,
902902
attrs: Vec<ast::Attribute> ,
903903
vi: Vec<ast::ViewItem> ,
904904
items: Vec<@ast::Item> ) -> @ast::Item {
@@ -907,7 +907,6 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
907907
name,
908908
attrs,
909909
ast::ItemMod(ast::Mod {
910-
inner: inner_span,
911910
view_items: vi,
912911
items: items,
913912
})

branches/try2/src/libsyntax/fold.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ pub fn noop_fold_type_method<T: Folder>(m: &TypeMethod, fld: &mut T) -> TypeMeth
652652

653653
pub fn noop_fold_mod<T: Folder>(m: &Mod, folder: &mut T) -> Mod {
654654
ast::Mod {
655-
inner: folder.new_span(m.inner),
656655
view_items: m.view_items
657656
.iter()
658657
.map(|x| folder.fold_view_item(x)).collect(),

0 commit comments

Comments
 (0)