Skip to content

pub method preceeded by attribute can't be parsed #3753

Closed
@brson

Description

@brson
pub impl LocalImageCache {                                                                                                                         
    /// The local cache will only do a single remote request for a given                                                                           
    /// URL in each 'round'. Layout should call this each time it begins                                                                                                                                                                        
    pub fn next_round(on_image_available: ~fn(ImageResponseMsg)) {                                                                           
        self.round_number += 1;                                                                                                                    
        self.on_image_available = Some(move on_image_available);                                                                                   
    } 
/home/banderson/Dev/servo/src/servo/resource/local_image_cache.rs:41:4: 41:7 error: unexpected token: `pub`
/home/banderson/Dev/servo/src/servo/resource/local_image_cache.rs:41     pub fn next_round(on_image_available: ~fn(ImageResponseMsg)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions