Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#64136 - crgl:doc-from-parser-lhs, r=Centril
Document From trait for LhsExpr in parser Add doc for From trait for converting P<Expr> and Option<ThinVec<Attribute>> to LhsExpr As part of issue rust-lang#51430 (cc @skade). Both of these should just be moving an address and setting a discriminant in an enum. The main thing I'm not sure about is whether it's worth documenting the branch in the From<Option<ThinVec<Attribute>>. As far as I can tell it doesn't seem like it is optimized away (although if the discriminant happened to work out you could just copy the pointer and the discriminant which might be cheaper, but that's not guaranteed). So it seems like if it's being called often, it's doubling the number of possible branch mispredictions on this Option, which could be a significant cost. Let me know if there's anything that needs fixing and I'll get to it as soon as possible!
- Loading branch information