File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
compiler/rustc_middle/src/middle Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ pub struct ScopeTree {
332332pub struct YieldData {
333333 /// The `Span` of the yield.
334334 pub span : Span ,
335- /// The number of expressions and patterns appearing before the `yield` in the body plus one.
335+ /// The number of expressions and patterns appearing before the `yield` in the body, plus one.
336336 pub expr_and_pat_count : usize ,
337337 pub source : hir:: YieldSource ,
338338}
@@ -449,9 +449,7 @@ impl ScopeTree {
449449 }
450450
451451 /// Checks whether the given scope contains a `yield`. If so,
452- /// returns `Some((span, expr_count))` with the span of a yield we found and
453- /// the number of expressions and patterns appearing before the `yield` in the body + 1.
454- /// If there a are multiple yields in a scope, the one with the highest number is returned.
452+ /// returns `Some(YieldData)`. If not, returns `None`.
455453 pub fn yield_in_scope ( & self , scope : Scope ) -> Option < YieldData > {
456454 self . yield_in_scope . get ( & scope) . cloned ( )
457455 }
You can’t perform that action at this time.
0 commit comments