Skip to content

Incorrect whitespace check in comment parser #3970

Closed
@brson

Description

@brson

comments.rs contains this:

fn all_whitespace(s: ~str, begin: uint, end: uint) -> bool {                                                                                                                                                         
    let mut i: uint = begin;                                                                                                                                                                                         
    while i != end {                                                                                                                                                                                                 
        if !is_whitespace(s[i] as char) { return false; } i += 1u;                                                                                                                                                   
    }                                                                                                                                                                                                                
    return true;                                                                                                                                                                                                     
}    

Doing a bytewise conversion to chars is not right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions