]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/traits/coherence.rs
use slicing sugar
[rust.git] / src / librustc / middle / traits / coherence.rs
index 49c7d6aafaa5e4583057a7a5cad507d3f2a593c9..489731e755489227b8b260cb451c3ebf0b319752 100644 (file)
@@ -136,8 +136,8 @@ fn ty_is_local_constructor<'tcx>(tcx: &ty::ctxt<'tcx>, ty: Ty<'tcx>) -> bool {
         ty::ty_open(..) |
         ty::ty_err => {
             tcx.sess.bug(
-                format!("ty_is_local invoked on unexpected type: {}",
-                        ty.repr(tcx)).index(&FullRange))
+                &format!("ty_is_local invoked on unexpected type: {}",
+                        ty.repr(tcx))[])
         }
     }
 }