|
15 | 15 | //! used between functions, and they operate in a purely top-down
|
16 | 16 | //! way. Therefore we break lifetime name resolution into a separate pass.
|
17 | 17 |
|
18 |
| -use hir::map::Map; |
19 | 18 | use hir::def::Def;
|
20 | 19 | use hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
|
| 20 | +use hir::map::Map; |
21 | 21 | use hir::ItemLocalId;
|
22 | 22 | use hir::LifetimeName;
|
23 | 23 | use ty::{self, TyCtxt};
|
24 | 24 |
|
| 25 | +use errors::DiagnosticBuilder; |
| 26 | +use rustc::lint; |
| 27 | +use rustc_data_structures::sync::Lrc; |
| 28 | +use session::Session; |
25 | 29 | use std::cell::Cell;
|
26 | 30 | use std::mem::replace;
|
27 |
| -use rustc_data_structures::sync::Lrc; |
| 31 | +use std::slice; |
28 | 32 | use syntax::ast;
|
29 | 33 | use syntax::attr;
|
30 | 34 | use syntax::ptr::P;
|
31 | 35 | use syntax_pos::Span;
|
32 |
| -use errors::DiagnosticBuilder; |
33 | 36 | use util::nodemap::{DefIdMap, FxHashMap, FxHashSet, NodeMap, NodeSet};
|
34 |
| -use session::Session; |
35 |
| -use std::slice; |
36 |
| -use rustc::lint; |
37 | 37 |
|
38 |
| -use hir::{self, GenericParamsExt}; |
39 | 38 | use hir::intravisit::{self, NestedVisitorMap, Visitor};
|
| 39 | +use hir::{self, GenericParamsExt}; |
40 | 40 |
|
41 | 41 | /// The origin of a named lifetime definition.
|
42 | 42 | ///
|
@@ -2087,8 +2087,9 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
2087 | 2087 | );
|
2088 | 2088 | err.emit();
|
2089 | 2089 | }
|
2090 |
| - hir::LifetimeName::Fresh(_) | hir::LifetimeName::Implicit | |
2091 |
| - hir::LifetimeName::Name(_) => {} |
| 2090 | + hir::LifetimeName::Fresh(_) |
| 2091 | + | hir::LifetimeName::Implicit |
| 2092 | + | hir::LifetimeName::Name(_) => {} |
2092 | 2093 | }
|
2093 | 2094 | }
|
2094 | 2095 |
|
@@ -2140,8 +2141,9 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
2140 | 2141 | ))
|
2141 | 2142 | .emit();
|
2142 | 2143 | }
|
2143 |
| - hir::LifetimeName::Fresh(_) | hir::LifetimeName::Implicit | |
2144 |
| - hir::LifetimeName::Name(_) => { |
| 2144 | + hir::LifetimeName::Fresh(_) |
| 2145 | + | hir::LifetimeName::Implicit |
| 2146 | + | hir::LifetimeName::Name(_) => { |
2145 | 2147 | self.resolve_lifetime_ref(bound);
|
2146 | 2148 | }
|
2147 | 2149 | }
|
|
0 commit comments