rust/src/libsyntax/parse
Mazdak Farrokhzad d7e511add6
Rollup merge of #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!
2019-09-21 16:01:25 +02:00
..
lexer Apply suggestions from code review 2019-09-07 16:29:04 +01:00
parser Rollup merge of #64136 - crgl:doc-from-parser-lhs, r=Centril 2019-09-21 16:01:25 +02:00
attr.rs Stabilize param_attrs in Rust 1.39.0 2019-09-11 10:13:43 -03:00
classify.rs let_chains: Remove ast::ExprKind::{IfLet, WhileLet} from visitors and introduce ::Let. 2019-06-23 01:29:29 +02:00
diagnostics.rs Resolve attributes in several places 2019-09-09 09:27:15 -03:00
literal.rs Simplify with Symbol/Token::is_book_lit. 2019-08-27 10:21:41 +02:00
mod.rs Rollup merge of #64010 - c410-f3r:stabilize-attrs-fn, r=Centril 2019-09-21 16:01:23 +02:00
parser.rs Stabilize param_attrs in Rust 1.39.0 2019-09-11 10:13:43 -03:00
tests.rs Aggregation of cosmetic changes made during work on REPL PRs: libsyntax 2019-09-07 16:29:04 +01:00
token.rs Simplify with Symbol/Token::is_book_lit. 2019-08-27 10:21:41 +02:00
unescape_error_reporting.rs Rollup merge of #62917 - estebank:trailing-slash, r=matklad 2019-07-24 16:13:20 +02:00