@@ -39,12 +39,13 @@ enum ConstraintCategory {
39
39
40
40
impl fmt:: Display for ConstraintCategory {
41
41
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
42
+ // Must end with a space. Allows for empty names to be provided.
42
43
match self {
43
- ConstraintCategory :: Assignment => write ! ( f, "assignment" ) ,
44
- ConstraintCategory :: Return => write ! ( f, "return" ) ,
45
- ConstraintCategory :: Cast => write ! ( f, "cast" ) ,
46
- ConstraintCategory :: CallArgument => write ! ( f, "argument" ) ,
47
- _ => write ! ( f, "free region " ) ,
44
+ ConstraintCategory :: Assignment => write ! ( f, "assignment " ) ,
45
+ ConstraintCategory :: Return => write ! ( f, "return " ) ,
46
+ ConstraintCategory :: Cast => write ! ( f, "cast " ) ,
47
+ ConstraintCategory :: CallArgument => write ! ( f, "argument " ) ,
48
+ _ => write ! ( f, "" ) ,
48
49
}
49
50
}
50
51
}
@@ -421,7 +422,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
421
422
} ,
422
423
_ => {
423
424
diag. span_label ( span, format ! (
424
- "{} requires that `{}` must outlive `{}`" ,
425
+ "{}requires that `{}` must outlive `{}`" ,
425
426
category, fr_name, outlived_fr_name,
426
427
) ) ;
427
428
} ,
0 commit comments