diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index 3fbc7d903541..5d0a6ae98d7a 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -269,14 +269,13 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { RegionResolutionError::GenericBoundFailure(ref origin, ..) => { self.tcx.sess.span_warn( origin.span(), - &format!("not reporting region error due to -Znll: {:?}", - error)); + "not reporting region error due to -Znll"); } RegionResolutionError::SubSupConflict(ref rvo, ..) => { self.tcx.sess.span_warn( rvo.span(), - &format!("not reporting region error due to -Znll: {:?}", error)); + "not reporting region error due to -Znll"); } } } diff --git a/src/test/ui/nll/named-region-basic.stderr b/src/test/ui/nll/named-region-basic.stderr index 6b789465670b..42b2aea01f0d 100644 --- a/src/test/ui/nll/named-region-basic.stderr +++ b/src/test/ui/nll/named-region-basic.stderr @@ -1,4 +1,4 @@ -warning: not reporting region error due to -Znll: SubSupConflict(AddrOfRegion($DIR/named-region-basic.rs:19:5: 19:8), Reborrow($DIR/named-region-basic.rs:19:5: 19:8), ReFree(DefId { krate: CrateNum(0), index: DefIndex(0:3) => named_region_basic[317d]::foo[0] }, BrNamed(CrateNum(0):DefIndex(1:10), 'b(88))), Reborrow($DIR/named-region-basic.rs:19:5: 19:8), ReFree(DefId { krate: CrateNum(0), index: DefIndex(0:3) => named_region_basic[317d]::foo[0] }, BrNamed(CrateNum(0):DefIndex(1:9), 'a(86)))) +warning: not reporting region error due to -Znll --> $DIR/named-region-basic.rs:19:5 | 19 | &*x