racer icon indicating copy to clipboard operation
racer copied to clipboard

racer can't find completion for array defined with [0u8; 4]

Open ville-h opened this issue 10 years ago • 4 comments

The following completion fails but is able to be completed if one switches the definition to the commented out one:

fn main() {
//    let recv_buffer = [0u8; 0, 0, 0];
    let recv_buffer = [0u8; 4];
    rec  // <-- try to complete here
}

ville-h avatar Oct 06 '15 12:10 ville-h

Racer doesn't support array definitions yet, sorry!

phildawes avatar Oct 06 '15 18:10 phildawes

Is this particularly technically hard for some reason? Or is it just not a priority? I'd love to help, but figuring out a new codebase is always a little bit daunting, so if you know of a reason why it's not even worth trying, please let me know @phildawes :)

dlukes avatar Aug 30 '17 10:08 dlukes

@dlukes I suspect this is failing due to the semicolon, which our code iterator likely interprets as the end of the outer statement. Phil isn't actively working on racer anymore, but if you submit a PR for it we'd be happy to review it.

TedDriggs avatar Aug 30 '17 17:08 TedDriggs

OK, thanks, I'll see what I can do :)

dlukes avatar Aug 31 '17 07:08 dlukes