File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/libsyntax/parse/parser Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ pub(super) enum LhsExpr {
6666}
6767
6868impl From < Option < ThinVec < Attribute > > > for LhsExpr {
69+ /// Converts `Some(attrs)` into `LhsExpr::AttributesParsed(attrs)`
70+ /// and `None` into `LhsExpr::NotYetParsed`.
71+ ///
72+ /// This conversion does not allocate.
6973 fn from ( o : Option < ThinVec < Attribute > > ) -> Self {
7074 if let Some ( attrs) = o {
7175 LhsExpr :: AttributesParsed ( attrs)
@@ -76,6 +80,9 @@ impl From<Option<ThinVec<Attribute>>> for LhsExpr {
7680}
7781
7882impl From < P < Expr > > for LhsExpr {
83+ /// Converts the `expr: P<Expr>` into `LhsExpr::AlreadyParsed(expr)`.
84+ ///
85+ /// This conversion does not allocate.
7986 fn from ( expr : P < Expr > ) -> Self {
8087 LhsExpr :: AlreadyParsed ( expr)
8188 }
You can’t perform that action at this time.
0 commit comments