提交 7b30e8d6 编写于 作者: N Niko Matsakis

convert (lexical) region errors to warn when NLL is enabled

上级 87c0c327
......@@ -265,17 +265,18 @@ pub fn report_region_errors(&self,
if self.tcx.sess.opts.debugging_opts.nll {
for error in errors {
match *error {
RegionResolutionError::ConcreteFailure(origin, ..) |
RegionResolutionError::GenericBoundFailure(origin, ..) => {
self.tcx.sess.delay_span_bug(origin.span(),
&format!("unreported region error {:?}",
RegionResolutionError::ConcreteFailure(ref origin, ..) |
RegionResolutionError::GenericBoundFailure(ref origin, ..) => {
self.tcx.sess.span_warn(
origin.span(),
&format!("not reporting region error due to -Znll: {:?}",
error));
}
RegionResolutionError::SubSupConflict(rvo, ..) => {
self.tcx.sess.delay_span_bug(rvo.span(),
&format!("unreported region error {:?}",
error));
RegionResolutionError::SubSupConflict(ref rvo, ..) => {
self.tcx.sess.span_warn(
rvo.span(),
&format!("not reporting region error due to -Znll: {:?}", error));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册