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 {
66
66
}
67
67
68
68
impl 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.
69
73
fn from ( o : Option < ThinVec < Attribute > > ) -> Self {
70
74
if let Some ( attrs) = o {
71
75
LhsExpr :: AttributesParsed ( attrs)
@@ -76,6 +80,9 @@ impl From<Option<ThinVec<Attribute>>> for LhsExpr {
76
80
}
77
81
78
82
impl From < P < Expr > > for LhsExpr {
83
+ /// Converts the `expr: P<Expr>` into `LhsExpr::AlreadyParsed(expr)`.
84
+ ///
85
+ /// This conversion does not allocate.
79
86
fn from ( expr : P < Expr > ) -> Self {
80
87
LhsExpr :: AlreadyParsed ( expr)
81
88
}
You can’t perform that action at this time.
0 commit comments