Addresses #52049
This commit is contained in:
parent
a178cba9f1
commit
d5f443d81d
@ -1009,7 +1009,10 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
|
||||
let node_id = scope.node_id(self.tcx, &self.region_scope_tree);
|
||||
match self.tcx.hir.find(node_id) {
|
||||
Some(hir_map::NodeStmt(_)) => {
|
||||
db.note("consider using a `let` binding to increase its lifetime");
|
||||
if *sub_scope != ty::ReStatic {
|
||||
db.note("consider using a `let` binding to increase its lifetime");
|
||||
}
|
||||
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user