1
Fork 0

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.
This commit is contained in:
Philipp Brüschweiler 2012-10-09 11:59:03 +02:00 committed by Tim Chevalier
parent 7dde840dc6
commit e7e1bab27f
3 changed files with 65 additions and 27 deletions

View file

@ -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)
}