auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwalton
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
This commit is contained in:
commit
3e0400fb86
73 changed files with 2948 additions and 309 deletions
|
@ -355,11 +355,18 @@ impl<'self> Equiv<@~str> for StringRef<'self> {
|
|||
fn equiv(&self, other: &@~str) -> bool { str::eq_slice(**self, **other) }
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
impl<'self> to_bytes::IterBytes for StringRef<'self> {
|
||||
fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) {
|
||||
(**self).iter_bytes(lsb0, f);
|
||||
}
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
impl<'self> to_bytes::IterBytes for StringRef<'self> {
|
||||
fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) -> bool {
|
||||
(**self).iter_bytes(lsb0, f)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a token to a record specifying the corresponding binary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue