@@ -29,27 +29,27 @@ pub struct MirVisitorCrateContext<'a, 'b: 'a, 'tcx: 'b, E> {
29
29
pub buffered_diagnostics : & ' a mut Vec < Diagnostic > ,
30
30
/// A call back that the test harness can use to buffer the diagnostic message.
31
31
/// By default this just calls emit on the diagnostic.
32
- pub emit_diagnostic : fn ( & mut DiagnosticBuilder , buf : & mut Vec < Diagnostic > ) -> ( ) ,
32
+ pub emit_diagnostic : fn ( & mut DiagnosticBuilder < ' _ > , buf : & mut Vec < Diagnostic > ) -> ( ) ,
33
33
pub session : & ' tcx Session ,
34
34
pub tcx : TyCtxt < ' b , ' tcx , ' tcx > ,
35
35
pub def_id : hir:: def_id:: DefId ,
36
36
pub mir : & ' a mir:: Mir < ' tcx > ,
37
37
pub constant_value_cache : & ' a mut ConstantValueCache ,
38
38
pub summary_cache : & ' a mut PersistentSummaryCache < ' b , ' tcx > ,
39
- pub smt_solver : & ' a mut SmtSolver < E > ,
39
+ pub smt_solver : & ' a mut dyn SmtSolver < E > ,
40
40
}
41
41
42
42
/// Holds the state for the MIR test visitor.
43
43
pub struct MirVisitor < ' a , ' b : ' a , ' tcx : ' b , E > {
44
44
buffered_diagnostics : & ' a mut Vec < Diagnostic > ,
45
- emit_diagnostic : fn ( & mut DiagnosticBuilder , buf : & mut Vec < Diagnostic > ) -> ( ) ,
45
+ emit_diagnostic : fn ( & mut DiagnosticBuilder < ' _ > , buf : & mut Vec < Diagnostic > ) -> ( ) ,
46
46
session : & ' tcx Session ,
47
47
tcx : TyCtxt < ' b , ' tcx , ' tcx > ,
48
48
def_id : hir:: def_id:: DefId ,
49
49
mir : & ' a mir:: Mir < ' tcx > ,
50
50
constant_value_cache : & ' a mut ConstantValueCache ,
51
51
summary_cache : & ' a mut PersistentSummaryCache < ' b , ' tcx > ,
52
- smt_solver : & ' a mut SmtSolver < E > ,
52
+ smt_solver : & ' a mut dyn SmtSolver < E > ,
53
53
54
54
check_for_errors : bool ,
55
55
current_environment : Environment ,
@@ -446,7 +446,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
446
446
& mut self ,
447
447
asm : & hir:: InlineAsm ,
448
448
outputs : & [ mir:: Place < ' tcx > ] ,
449
- inputs : & [ ( syntax_pos:: Span , mir:: Operand ) ] ,
449
+ inputs : & [ ( syntax_pos:: Span , mir:: Operand < ' tcx > ) ] ,
450
450
) {
451
451
debug ! (
452
452
"default visit_inline_asm(asm: {:?}, outputs: {:?}, inputs: {:?})" ,
@@ -544,7 +544,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
544
544
fn visit_switch_int (
545
545
& mut self ,
546
546
discr : & mir:: Operand < ' tcx > ,
547
- switch_ty : rustc:: ty:: Ty ,
547
+ switch_ty : rustc:: ty:: Ty < ' tcx > ,
548
548
values : & [ u128 ] ,
549
549
targets : & [ mir:: BasicBlock ] ,
550
550
) {
@@ -937,7 +937,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
937
937
& mut self ,
938
938
cond : & mir:: Operand < ' tcx > ,
939
939
expected : bool ,
940
- msg : & mir:: AssertMessage ,
940
+ msg : & mir:: AssertMessage < ' tcx > ,
941
941
target : mir:: BasicBlock ,
942
942
cleanup : Option < mir:: BasicBlock > ,
943
943
) {
@@ -1334,7 +1334,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
1334
1334
fn visit_ref (
1335
1335
& mut self ,
1336
1336
path : Path ,
1337
- region : rustc:: ty:: Region ,
1337
+ region : rustc:: ty:: Region < ' tcx > ,
1338
1338
borrow_kind : mir:: BorrowKind ,
1339
1339
place : & mir:: Place < ' tcx > ,
1340
1340
) {
@@ -1379,7 +1379,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
1379
1379
path : Path ,
1380
1380
cast_kind : mir:: CastKind ,
1381
1381
operand : & mir:: Operand < ' tcx > ,
1382
- ty : rustc:: ty:: Ty ,
1382
+ ty : rustc:: ty:: Ty < ' tcx > ,
1383
1383
) {
1384
1384
debug ! (
1385
1385
"default visit_cast(path: {:?}, cast_kind: {:?}, operand: {:?}, ty: {:?})" ,
@@ -1481,7 +1481,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
1481
1481
}
1482
1482
1483
1483
/// Create a value based on the given type and assign it to path.
1484
- fn visit_nullary_op ( & mut self , path : Path , null_op : mir:: NullOp , ty : rustc:: ty:: Ty ) {
1484
+ fn visit_nullary_op ( & mut self , path : Path , null_op : mir:: NullOp , ty : rustc:: ty:: Ty < ' tcx > ) {
1485
1485
debug ! (
1486
1486
"default visit_nullary_op(path: {:?}, null_op: {:?}, ty: {:?})" ,
1487
1487
path, null_op, ty
@@ -1542,7 +1542,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
1542
1542
fn visit_aggregate (
1543
1543
& mut self ,
1544
1544
path : Path ,
1545
- aggregate_kinds : & mir:: AggregateKind ,
1545
+ aggregate_kinds : & mir:: AggregateKind < ' tcx > ,
1546
1546
operands : & [ mir:: Operand < ' tcx > ] ,
1547
1547
) {
1548
1548
debug ! (
@@ -1659,9 +1659,9 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
1659
1659
/// Synthesizes a constant value.
1660
1660
fn visit_constant (
1661
1661
& mut self ,
1662
- ty : Ty ,
1662
+ ty : Ty < ' tcx > ,
1663
1663
user_ty : Option < UserTypeAnnotationIndex > ,
1664
- literal : & LazyConst ,
1664
+ literal : & LazyConst < ' tcx > ,
1665
1665
) -> AbstractValue {
1666
1666
use rustc:: mir:: interpret:: { AllocKind , ConstValue , Scalar } ;
1667
1667
debug ! (
@@ -2103,7 +2103,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
2103
2103
/// but which can be serialized.
2104
2104
fn visit_projection_elem (
2105
2105
& mut self ,
2106
- projection_elem : & mir:: ProjectionElem < mir:: Local , & rustc:: ty:: TyS > ,
2106
+ projection_elem : & mir:: ProjectionElem < ' tcx , mir:: Local , & rustc:: ty:: TyS < ' tcx > > ,
2107
2107
) -> PathSelector {
2108
2108
debug ! (
2109
2109
"visit_projection_elem(projection_elem: {:?})" ,
@@ -2143,7 +2143,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
2143
2143
}
2144
2144
2145
2145
/// Returns the rustc TyKind of the given place in memory.
2146
- fn get_rustc_place_type ( & self , place : & mir:: Place < ' tcx > ) -> & TyKind < ' a > {
2146
+ fn get_rustc_place_type ( & self , place : & mir:: Place < ' tcx > ) -> & TyKind < ' tcx > {
2147
2147
match place {
2148
2148
mir:: Place :: Base ( base_place) => match base_place {
2149
2149
mir:: PlaceBase :: Local ( local) => {
@@ -2160,7 +2160,7 @@ impl<'a, 'b: 'a, 'tcx: 'b, E> MirVisitor<'a, 'b, 'tcx, E> {
2160
2160
}
2161
2161
2162
2162
/// Returns the rustc TyKind of the element selected by projection_elem.
2163
- fn get_type_for_projection_element ( & self , place : & mir:: Place < ' tcx > ) -> & TyKind < ' a > {
2163
+ fn get_type_for_projection_element ( & self , place : & mir:: Place < ' tcx > ) -> & TyKind < ' tcx > {
2164
2164
if let mir:: Place :: Projection ( boxed_place_projection) = place {
2165
2165
let base_ty = self . get_rustc_place_type ( & boxed_place_projection. base ) ;
2166
2166
match boxed_place_projection. elem {
0 commit comments