self.mk_const(ty::Const { val: ty::ConstKind::Error(DelaySpanBugEmitted(())), ty })
}
- pub fn consider_optimizing<T: Fn() -> String>(&self, msg: T) -> bool {
+ pub fn consider_optimizing<T: Fn() -> String>(self, msg: T) -> bool {
let cname = self.crate_name(LOCAL_CRATE).as_str();
self.sess.consider_optimizing(&cname, msg)
}
/// Given a slice of `hir::GenericBound`s, if any of them corresponds to the `trait_ref`
/// requirement, provide a strucuted suggestion to constrain it to a given type `ty`.
fn constrain_generic_bound_associated_type_structured_suggestion(
- &self,
+ self,
db: &mut DiagnosticBuilder<'_>,
trait_ref: &ty::TraitRef<'tcx>,
bounds: hir::GenericBounds<'_>,
/// Given a span corresponding to a bound, provide a structured suggestion to set an
/// associated type to a given type `ty`.
fn constrain_associated_type_structured_suggestion(
- &self,
+ self,
db: &mut DiagnosticBuilder<'_>,
span: Span,
assoc: &ty::AssocItem,