-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
In principle, it is possible to have nodes of length zero: this would be an internal node without children.
However such nodes are annoying to work with. For example, with empty nodes there maybe arbitrary number of nodes at a given offset (as opposed to at most two for non-empty nodes). So it seems a great idea to forbid this node.
That means that care must be taken to parse stuff like use foo::92;
without empty nodes: we know that there should be a path segment after ::
, but we shouldn't create a node for it unconditionally.
A funny edge case here is an empty file: We'll have to create a file node for it, and it will be empty.
Activity
matklad commentedon Dec 29, 2018
For the time being, only the file node can be empty, and this works out OK
Merge pull request rust-lang#10 from Dushistov/master
Auto merge of #118488 - andjo403:remove_deadlock, r=SparrowLii
Auto merge of #118488 - andjo403:remove_deadlock, r=SparrowLii
Auto merge of #131460 - jwong101:default-placement-new, r=ibraheemdev