Skip to content

Commit b4b6485

Browse files
committed
---
yaml --- r: 79386 b: refs/heads/snap-stage3 c: 41e7924 h: refs/heads/master v: v3
1 parent 0a464d8 commit b4b6485

File tree

16 files changed

+218
-397
lines changed

16 files changed

+218
-397
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: 124eb2119c78651cfaaa7a046a101fa2e20f83ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b161e09e03a5a0135557daa7166d290a515fbec2
4+
refs/heads/snap-stage3: 41e7924670aefe4c39dd4a060452eb623854fde9
55
refs/heads/try: ac820906c0e53eab79a98ee64f7231f57c3887b4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/rt.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ RUNTIME_CXXS_$(1)_$(2) := \
7676
rt/rust_upcall.cpp \
7777
rt/rust_uv.cpp \
7878
rt/rust_crate_map.cpp \
79+
rt/rust_log.cpp \
7980
rt/isaac/randport.cpp \
8081
rt/miniz.cpp \
8182
rt/memory_region.cpp \

branches/snap-stage3/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ impl visit::Visitor<@mut GatherLoanCtxt> for GatherLoanVisitor {
9595
fn visit_local(&mut self, l:@Local, e:@mut GatherLoanCtxt) {
9696
gather_loans_in_local(self, l, e);
9797
}
98+
99+
// #7740: Do not visit items here, not even fn items nor methods
100+
// of impl items; the outer loop in borrowck/mod will visit them
101+
// for us in turn. Thus override visit_item's walk with a no-op.
102+
fn visit_item(&mut self, _:@ast::item, _:@mut GatherLoanCtxt) { }
98103
}
99104

100105
pub fn gather_loans(bccx: @BorrowckCtxt,
@@ -135,10 +140,8 @@ fn gather_loans_in_fn(v: &mut GatherLoanVisitor,
135140
id: ast::NodeId,
136141
this: @mut GatherLoanCtxt) {
137142
match fk {
138-
// Do not visit items here, the outer loop in borrowck/mod
139-
// will visit them for us in turn.
140143
&visit::fk_item_fn(*) | &visit::fk_method(*) => {
141-
return;
144+
fail!("cannot occur, due to visit_item override");
142145
}
143146

144147
// Visit closures as part of the containing item.

branches/snap-stage3/src/librustpkg/conditions.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,33 @@ pub use std::path::Path;
1414
pub use package_id::PkgId;
1515

1616
condition! {
17-
pub bad_path: (Path, ~str) -> Path;
17+
bad_path: (Path, ~str) -> Path;
1818
}
1919

2020
condition! {
21-
pub nonexistent_package: (PkgId, ~str) -> Path;
21+
nonexistent_package: (PkgId, ~str) -> Path;
2222
}
2323

2424
condition! {
25-
pub copy_failed: (Path, Path) -> ();
25+
copy_failed: (Path, Path) -> ();
2626
}
2727

2828
condition! {
29-
pub missing_pkg_files: (PkgId) -> ();
29+
missing_pkg_files: (PkgId) -> ();
3030
}
3131

3232
condition! {
33-
pub bad_pkg_id: (Path, ~str) -> PkgId;
33+
bad_pkg_id: (Path, ~str) -> PkgId;
3434
}
3535

3636
condition! {
37-
pub no_rust_path: (~str) -> Path;
37+
no_rust_path: (~str) -> Path;
3838
}
3939

4040
condition! {
41-
pub not_a_workspace: (~str) -> Path;
41+
not_a_workspace: (~str) -> Path;
4242
}
4343

4444
condition! {
45-
pub failed_to_create_temp_dir: (~str) -> Path;
45+
failed_to_create_temp_dir: (~str) -> Path;
4646
}

branches/snap-stage3/src/librustpkg/package_source.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pub struct PkgSrc {
3434
}
3535

3636
condition! {
37-
// #6009: should this be pub or not, when #8215 is fixed?
3837
build_err: (~str) -> ();
3938
}
4039

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ pub enum NullByteResolution {
2828
}
2929

3030
condition! {
31-
// This should be &[u8] but there's a lifetime issue (#5370).
31+
// this should be &[u8] but there's a lifetime issue
3232
// NOTE: this super::NullByteResolution should be NullByteResolution
33-
// Change this next time the snapshot is updated.
34-
pub null_byte: (~[u8]) -> super::NullByteResolution;
33+
// Change this next time the snapshot it updated.
34+
null_byte: (~[u8]) -> super::NullByteResolution;
3535
}
3636

3737
/// The representation of a C String.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ mod test {
193193
// Issue #6009
194194
mod m {
195195
condition! {
196-
// #6009, #8215: should this truly need a `pub` for access from n?
197-
pub sadness: int -> int;
196+
sadness: int -> int;
198197
}
199198

200199
mod n {

branches/snap-stage3/src/libstd/rt/io/extensions.rs

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616
use uint;
1717
use int;
18-
use iterator::Iterator;
1918
use vec;
20-
use rt::io::{Reader, Writer, Decorator};
19+
use rt::io::{Reader, Writer};
2120
use rt::io::{read_error, standard_error, EndOfFile, DEFAULT_BUF_SIZE};
2221
use option::{Option, Some, None};
2322
use unstable::finally::Finally;
@@ -63,16 +62,6 @@ pub trait ReaderUtil {
6362
/// Raises the same conditions as the `read` method.
6463
fn read_to_end(&mut self) -> ~[u8];
6564

66-
/// Create an iterator that reads a single byte on
67-
/// each iteration, until EOF.
68-
///
69-
/// # Failure
70-
///
71-
/// Raises the same conditions as the `read` method, for
72-
/// each call to its `.next()` method.
73-
/// Ends the iteration if the condition is handled.
74-
fn bytes(self) -> ByteIterator<Self>;
75-
7665
}
7766

7867
pub trait ReaderByteConversions {
@@ -348,41 +337,6 @@ impl<T: Reader> ReaderUtil for T {
348337
}
349338
return buf;
350339
}
351-
352-
fn bytes(self) -> ByteIterator<T> {
353-
ByteIterator{reader: self}
354-
}
355-
}
356-
357-
/// An iterator that reads a single byte on each iteration,
358-
/// until `.read_byte()` returns `None`.
359-
///
360-
/// # Notes about the Iteration Protocol
361-
///
362-
/// The `ByteIterator` may yield `None` and thus terminate
363-
/// an iteration, but continue to yield elements if iteration
364-
/// is attempted again.
365-
///
366-
/// # Failure
367-
///
368-
/// Raises the same conditions as the `read` method, for
369-
/// each call to its `.next()` method.
370-
/// Yields `None` if the condition is handled.
371-
pub struct ByteIterator<T> {
372-
priv reader: T,
373-
}
374-
375-
impl<R> Decorator<R> for ByteIterator<R> {
376-
fn inner(self) -> R { self.reader }
377-
fn inner_ref<'a>(&'a self) -> &'a R { &self.reader }
378-
fn inner_mut_ref<'a>(&'a mut self) -> &'a mut R { &mut self.reader }
379-
}
380-
381-
impl<'self, R: Reader> Iterator<u8> for ByteIterator<R> {
382-
#[inline]
383-
fn next(&mut self) -> Option<u8> {
384-
self.reader.read_byte()
385-
}
386340
}
387341

388342
impl<T: Reader> ReaderByteConversions for T {
@@ -692,48 +646,6 @@ mod test {
692646
}
693647
}
694648

695-
#[test]
696-
fn bytes_0_bytes() {
697-
let mut reader = MockReader::new();
698-
let count = Cell::new(0);
699-
reader.read = |buf| {
700-
do count.with_mut_ref |count| {
701-
if *count == 0 {
702-
*count = 1;
703-
Some(0)
704-
} else {
705-
buf[0] = 10;
706-
Some(1)
707-
}
708-
}
709-
};
710-
let byte = reader.bytes().next();
711-
assert!(byte == Some(10));
712-
}
713-
714-
#[test]
715-
fn bytes_eof() {
716-
let mut reader = MockReader::new();
717-
reader.read = |_| None;
718-
let byte = reader.bytes().next();
719-
assert!(byte == None);
720-
}
721-
722-
#[test]
723-
fn bytes_error() {
724-
let mut reader = MockReader::new();
725-
reader.read = |_| {
726-
read_error::cond.raise(placeholder_error());
727-
None
728-
};
729-
let mut it = reader.bytes();
730-
do read_error::cond.trap(|_| ()).inside {
731-
let byte = it.next();
732-
assert!(byte == None);
733-
}
734-
}
735-
736-
737649
#[test]
738650
fn read_bytes() {
739651
let mut reader = MemReader::new(~[10, 11, 12, 13]);

branches/snap-stage3/src/libstd/rt/io/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,19 @@ impl ToStr for IoErrorKind {
384384
// XXX: Can't put doc comments on macros
385385
// Raised by `I/O` operations on error.
386386
condition! {
387+
// FIXME (#6009): uncomment `pub` after expansion support lands.
387388
// NOTE: this super::IoError should be IoError
388-
// Change this next time the snapshot is updated.
389-
pub io_error: super::IoError -> ();
389+
// Change this next time the snapshot it updated.
390+
/*pub*/ io_error: super::IoError -> ();
390391
}
391392

392393
// XXX: Can't put doc comments on macros
393394
// Raised by `read` on error
394395
condition! {
396+
// FIXME (#6009): uncomment `pub` after expansion support lands.
395397
// NOTE: this super::IoError should be IoError
396398
// Change this next time the snapshot it updated.
397-
pub read_error: super::IoError -> ();
399+
/*pub*/ read_error: super::IoError -> ();
398400
}
399401

400402
pub trait Reader {

0 commit comments

Comments
 (0)