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:
parent
7dde840dc6
commit
e7e1bab27f
3 changed files with 65 additions and 27 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue