summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_middle/src/middle/stability.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_middle/src/middle/stability.rs')
-rw-r--r--compiler/rustc_middle/src/middle/stability.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs
index b61f7806b..6354c0aab 100644
--- a/compiler/rustc_middle/src/middle/stability.rs
+++ b/compiler/rustc_middle/src/middle/stability.rs
@@ -115,8 +115,8 @@ pub fn report_unstable(
soft_handler(SOFT_UNSTABLE, span, &msg)
} else {
let mut err =
- feature_err_issue(&sess.parse_sess, feature, span, GateIssue::Library(issue), &msg);
- if let Some((inner_types, ref msg, sugg, applicability)) = suggestion {
+ feature_err_issue(&sess.parse_sess, feature, span, GateIssue::Library(issue), msg);
+ if let Some((inner_types, msg, sugg, applicability)) = suggestion {
err.span_suggestion(inner_types, msg, sugg, applicability);
}
err.emit();
@@ -170,7 +170,7 @@ pub fn deprecation_suggestion(
if let Some(suggestion) = suggestion {
diag.span_suggestion_verbose(
span,
- &format!("replace the use of the deprecated {}", kind),
+ format!("replace the use of the deprecated {}", kind),
suggestion,
Applicability::MachineApplicable,
);
@@ -375,7 +375,7 @@ impl<'tcx> TyCtxt<'tcx> {
let parent_def_id = self.hir().get_parent_item(id);
let skip = self
.lookup_deprecation_entry(parent_def_id.to_def_id())
- .map_or(false, |parent_depr| parent_depr.same_origin(&depr_entry));
+ .is_some_and(|parent_depr| parent_depr.same_origin(&depr_entry));
// #[deprecated] doesn't emit a notice if we're not on the
// topmost deprecation. For example, if a struct is deprecated,
@@ -599,7 +599,7 @@ impl<'tcx> TyCtxt<'tcx> {
|span, def_id| {
// The API could be uncallable for other reasons, for example when a private module
// was referenced.
- self.sess.delay_span_bug(span, &format!("encountered unmarked API: {:?}", def_id));
+ self.sess.delay_span_bug(span, format!("encountered unmarked API: {:?}", def_id));
},
)
}