File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,16 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
117117 write ! ( f, "lifetimes do not intersect" )
118118 }
119119 RegionsInsufficientlyPolymorphic ( br, _, _) => {
120- write ! ( f, "expected bound lifetime parameter {}, \
121- found concrete lifetime", br)
120+ write ! ( f,
121+ "expected bound lifetime parameter{}{}, found concrete lifetime" ,
122+ if br. is_named( ) { " " } else { "" } ,
123+ br)
122124 }
123125 RegionsOverlyPolymorphic ( br, _, _) => {
124- write ! ( f, "expected concrete lifetime, \
125- found bound lifetime parameter {}", br)
126+ write ! ( f,
127+ "expected concrete lifetime, found bound lifetime parameter{}{}" ,
128+ if br. is_named( ) { " " } else { "" } ,
129+ br)
126130 }
127131 Sorts ( values) => ty:: tls:: with ( |tcx| {
128132 report_maybe_different ( f, values. expected . sort_string ( tcx) ,
You can’t perform that action at this time.
0 commit comments