diff options
| author | Philipp Brüschweiler <blei42@gmail.com> | 2012-10-09 11:59:03 +0200 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-17 15:34:55 -0700 |
| commit | e7e1bab27fa8341467b5160506bbd580b5f6bbb7 (patch) | |
| tree | e0196fb2e0cc360308cd39be558fce7c7112d4ba /src/libcore | |
| parent | 7dde840dc6b077974d48ae7c966ea16a0e36f3f6 (diff) | |
libsyntax: refactor the parser to consider foreign items as items
parse_item_or_view_item() would drop visibility if none of the conditions
following it would hold. This was the case when parsing extern {} blocks,
where the function was only used to parse view items, but discarded the
visibility of the first not-view item.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/str.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 26f29e388cb..d59f36e0681 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -1952,7 +1952,7 @@ pub mod raw { } /// Converts a vector of bytes to a string. - pub pub unsafe fn from_bytes(v: &[const u8]) -> ~str { + pub unsafe fn from_bytes(v: &[const u8]) -> ~str { do vec::as_const_buf(v) |buf, len| { from_buf_len(buf, len) } |
