rust-analyzer / rowan

Apache License 2.0
697 stars 57 forks source link

Remove double indirection in NodeData #49

Open matklad opened 4 years ago

matklad commented 4 years ago

NodeData looks like this:

#[derive(Debug)]
struct NodeData {
    kind: Kind,
    green: ptr::NonNull<GreenNode>,
}

#[derive(Debug)]
struct NodeData {
    kind: Kind,
    green: ptr::NonNull<GreenNode>,
}

Note how we need to chase two pointers to get to the node data! This probably should be fixed