@@ -106,7 +106,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
106106 cx. span_lint (
107107 OVERFLOWING_LITERALS ,
108108 e. span ,
109- & format ! ( "literal out of range for {:?}" , t) ,
109+ & format ! ( "literal out of range for ` {:?}` " , t) ,
110110 ) ;
111111 return ;
112112 }
@@ -136,11 +136,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
136136 let mut err = cx. struct_span_lint (
137137 OVERFLOWING_LITERALS ,
138138 parent_expr. span ,
139- "only u8 can be cast into char" ,
139+ "only `u8` can be cast into ` char` " ,
140140 ) ;
141141 err. span_suggestion (
142142 parent_expr. span ,
143- & "use a char literal instead" ,
143+ & "use a ` char` literal instead" ,
144144 format ! ( "'\\ u{{{:X}}}'" , lit_val) ,
145145 Applicability :: MachineApplicable ,
146146 ) ;
@@ -165,7 +165,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
165165 parent_expr. span ,
166166 & format ! (
167167 "range endpoint is out of range \
168- for {:?}",
168+ for ` {:?}` ",
169169 t,
170170 ) ,
171171 ) ;
@@ -206,7 +206,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
206206 cx. span_lint (
207207 OVERFLOWING_LITERALS ,
208208 e. span ,
209- & format ! ( "literal out of range for {:?}" , t) ,
209+ & format ! ( "literal out of range for ` {:?}` " , t) ,
210210 ) ;
211211 }
212212 }
@@ -224,7 +224,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
224224 if is_infinite == Ok ( true ) {
225225 cx. span_lint ( OVERFLOWING_LITERALS ,
226226 e. span ,
227- & format ! ( "literal out of range for {:?}" , t) ) ;
227+ & format ! ( "literal out of range for ` {:?}` " , t) ) ;
228228 }
229229 }
230230 _ => ( ) ,
0 commit comments