@@ -17,8 +17,8 @@ use crate::ty::{GenericArgsRef, TyCtxt};
17
17
18
18
use rustc_data_structures:: sync:: Lrc ;
19
19
use rustc_errors:: { Applicability , Diag , EmissionGuarantee } ;
20
- use rustc_hir as hir;
21
20
use rustc_hir:: def_id:: DefId ;
21
+ use rustc_hir:: { HirId , MatchSource } ;
22
22
use rustc_span:: def_id:: { LocalDefId , CRATE_DEF_ID } ;
23
23
use rustc_span:: symbol:: Symbol ;
24
24
use rustc_span:: { Span , DUMMY_SP } ;
@@ -262,10 +262,10 @@ pub enum ObligationCauseCode<'tcx> {
262
262
/// expression that caused the obligation, and the `usize`
263
263
/// indicates exactly which predicate it is in the list of
264
264
/// instantiated predicates.
265
- ExprItemObligation ( DefId , rustc_hir :: HirId , usize ) ,
265
+ ExprItemObligation ( DefId , HirId , usize ) ,
266
266
267
267
/// Combines `ExprItemObligation` and `BindingObligation`.
268
- ExprBindingObligation ( DefId , Span , rustc_hir :: HirId , usize ) ,
268
+ ExprBindingObligation ( DefId , Span , HirId , usize ) ,
269
269
270
270
/// A type like `&'a T` is WF only if `T: 'a`.
271
271
ReferenceOutlivesReferent ( Ty < ' tcx > ) ,
@@ -287,13 +287,13 @@ pub enum ObligationCauseCode<'tcx> {
287
287
/// `S { ... }` must be `Sized`.
288
288
StructInitializerSized ,
289
289
/// Type of each variable must be `Sized`.
290
- VariableType ( hir :: HirId ) ,
290
+ VariableType ( HirId ) ,
291
291
/// Argument type must be `Sized`.
292
- SizedArgumentType ( Option < hir :: HirId > ) ,
292
+ SizedArgumentType ( Option < HirId > ) ,
293
293
/// Return type must be `Sized`.
294
294
SizedReturnType ,
295
295
/// Return type of a call expression must be `Sized`.
296
- SizedCallReturnType ( Option < hir :: HirId > ) ,
296
+ SizedCallReturnType ( Option < HirId > ) ,
297
297
/// Yield type must be `Sized`.
298
298
SizedYieldType ,
299
299
/// Inline asm operand type must be `Sized`.
@@ -335,9 +335,9 @@ pub enum ObligationCauseCode<'tcx> {
335
335
336
336
FunctionArgumentObligation {
337
337
/// The node of the relevant argument in the function call.
338
- arg_hir_id : hir :: HirId ,
338
+ arg_hir_id : HirId ,
339
339
/// The node of the function call.
340
- call_hir_id : hir :: HirId ,
340
+ call_hir_id : HirId ,
341
341
/// The obligation introduced by this argument.
342
342
parent_code : InternedObligationCauseCode < ' tcx > ,
343
343
} ,
@@ -402,18 +402,18 @@ pub enum ObligationCauseCode<'tcx> {
402
402
ReturnNoExpression ,
403
403
404
404
/// `return` with an expression
405
- ReturnValue ( hir :: HirId ) ,
405
+ ReturnValue ( HirId ) ,
406
406
407
407
/// Opaque return type of this function
408
408
OpaqueReturnType ( Option < ( Ty < ' tcx > , Span ) > ) ,
409
409
410
410
/// Block implicit return
411
- BlockTailExpression ( hir :: HirId , hir :: MatchSource ) ,
411
+ BlockTailExpression ( HirId , MatchSource ) ,
412
412
413
413
/// #[feature(trivial_bounds)] is not enabled
414
414
TrivialBound ,
415
415
416
- AwaitableExpr ( hir :: HirId ) ,
416
+ AwaitableExpr ( HirId ) ,
417
417
418
418
ForLoopIterator ,
419
419
@@ -431,8 +431,8 @@ pub enum ObligationCauseCode<'tcx> {
431
431
MatchImpl ( ObligationCause < ' tcx > , DefId ) ,
432
432
433
433
BinOp {
434
- lhs_hir_id : hir :: HirId ,
435
- rhs_hir_id : Option < hir :: HirId > ,
434
+ lhs_hir_id : HirId ,
435
+ rhs_hir_id : Option < HirId > ,
436
436
rhs_span : Option < Span > ,
437
437
rhs_is_lit : bool ,
438
438
output_ty : Option < Ty < ' tcx > > ,
@@ -562,14 +562,14 @@ pub enum StatementAsExpression {
562
562
#[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
563
563
#[ derive( TypeVisitable , TypeFoldable ) ]
564
564
pub struct MatchExpressionArmCause < ' tcx > {
565
- pub arm_block_id : Option < hir :: HirId > ,
565
+ pub arm_block_id : Option < HirId > ,
566
566
pub arm_ty : Ty < ' tcx > ,
567
567
pub arm_span : Span ,
568
- pub prior_arm_block_id : Option < hir :: HirId > ,
568
+ pub prior_arm_block_id : Option < HirId > ,
569
569
pub prior_arm_ty : Ty < ' tcx > ,
570
570
pub prior_arm_span : Span ,
571
571
pub scrut_span : Span ,
572
- pub source : hir :: MatchSource ,
572
+ pub source : MatchSource ,
573
573
pub prior_non_diverging_arms : Vec < Span > ,
574
574
// Is the expectation of this match expression an RPIT?
575
575
pub tail_defines_return_position_impl_trait : Option < LocalDefId > ,
@@ -578,8 +578,8 @@ pub struct MatchExpressionArmCause<'tcx> {
578
578
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
579
579
#[ derive( TypeFoldable , TypeVisitable , HashStable , TyEncodable , TyDecodable ) ]
580
580
pub struct IfExpressionCause < ' tcx > {
581
- pub then_id : hir :: HirId ,
582
- pub else_id : hir :: HirId ,
581
+ pub then_id : HirId ,
582
+ pub else_id : HirId ,
583
583
pub then_ty : Ty < ' tcx > ,
584
584
pub else_ty : Ty < ' tcx > ,
585
585
pub outer_span : Option < Span > ,
0 commit comments