emit less info when we warn

Actually, I meant to make this use `delay_span_bug`
This commit is contained in:
Niko Matsakis 2017-10-31 17:11:54 -04:00
parent fdcd2256f0
commit 7b4282e02b
2 changed files with 3 additions and 4 deletions

View file

@ -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");
}
}
}

View file

@ -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