diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-01-25 16:03:27 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-01-26 23:07:55 -0500 |
| commit | 0897ffc28f68fab862e970599c95bb65b280b48b (patch) | |
| tree | 7a1b107f558b9fc90815eadae7b004129b509f8f /src/librustc/infer | |
| parent | 8eaa84c79f5491735dc616d8591318e954e57a68 (diff) | |
| download | rust-0897ffc28f68fab862e970599c95bb65b280b48b.tar.gz rust-0897ffc28f68fab862e970599c95bb65b280b48b.zip | |
remove `_with_applicability` from suggestion fns
Diffstat (limited to 'src/librustc/infer')
3 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index 35f6e6aa610..66e4cd49c80 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -499,7 +499,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { if let Some(ty::error::ExpectedFound { found, .. }) = exp_found { if ty.is_box() && ty.boxed_ty() == found { if let Ok(snippet) = self.tcx.sess.source_map().span_to_snippet(span) { - err.span_suggestion_with_applicability( + err.span_suggestion( span, "consider dereferencing the boxed value", format!("*{}", snippet), @@ -532,7 +532,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { err.span_label(then, "expected because of this"); outer.map(|sp| err.span_label(sp, "if and else have incompatible types")); if let Some(sp) = semicolon { - err.span_suggestion_short_with_applicability( + err.span_suggestion_short( sp, "consider removing this semicolon", String::new(), @@ -1084,7 +1084,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { self.tcx.sess.source_map().span_to_snippet(span), show_suggestion, ) { - diag.span_suggestion_with_applicability( + diag.span_suggestion( span, msg, format!("{}.as_ref()", snippet), @@ -1273,7 +1273,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { let tail = if has_lifetimes { " + " } else { "" }; format!("{}: {}{}", bound_kind, sub, tail) }; - err.span_suggestion_short_with_applicability( + err.span_suggestion_short( sp, &consider, suggestion, diff --git a/src/librustc/infer/error_reporting/nice_region_error/named_anon_conflict.rs b/src/librustc/infer/error_reporting/nice_region_error/named_anon_conflict.rs index daab0a8e962..918a46aacd0 100644 --- a/src/librustc/infer/error_reporting/nice_region_error/named_anon_conflict.rs +++ b/src/librustc/infer/error_reporting/nice_region_error/named_anon_conflict.rs @@ -102,7 +102,7 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> { E0621, "explicit lifetime required in {}", error_var - ).span_suggestion_with_applicability( + ).span_suggestion( new_ty_span, &format!("add explicit lifetime `{}` to {}", named, span_label_var), new_ty.to_string(), diff --git a/src/librustc/infer/error_reporting/nice_region_error/static_impl_trait.rs b/src/librustc/infer/error_reporting/nice_region_error/static_impl_trait.rs index 9fc3bb05cda..7501e2f2108 100644 --- a/src/librustc/infer/error_reporting/nice_region_error/static_impl_trait.rs +++ b/src/librustc/infer/error_reporting/nice_region_error/static_impl_trait.rs @@ -53,7 +53,7 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> { _ => "'_".to_owned(), }; if let Ok(snippet) = self.tcx.sess.source_map().span_to_snippet(return_sp) { - err.span_suggestion_with_applicability( + err.span_suggestion( return_sp, &format!( "you can add a constraint to the return type to make it last \ |
