take TyCtxt
by value
This commit is contained in:
parent
a219ad64a6
commit
67f319c30b
@ -1179,7 +1179,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
self.mk_const(ty::Const { val: ty::ConstKind::Error(DelaySpanBugEmitted(())), ty })
|
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();
|
let cname = self.crate_name(LOCAL_CRATE).as_str();
|
||||||
self.sess.consider_optimizing(&cname, msg)
|
self.sess.consider_optimizing(&cname, msg)
|
||||||
}
|
}
|
||||||
|
@ -851,7 +851,7 @@ fn foo(&self) -> Self::T { String::new() }
|
|||||||
/// Given a slice of `hir::GenericBound`s, if any of them corresponds to the `trait_ref`
|
/// 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`.
|
/// requirement, provide a strucuted suggestion to constrain it to a given type `ty`.
|
||||||
fn constrain_generic_bound_associated_type_structured_suggestion(
|
fn constrain_generic_bound_associated_type_structured_suggestion(
|
||||||
&self,
|
self,
|
||||||
db: &mut DiagnosticBuilder<'_>,
|
db: &mut DiagnosticBuilder<'_>,
|
||||||
trait_ref: &ty::TraitRef<'tcx>,
|
trait_ref: &ty::TraitRef<'tcx>,
|
||||||
bounds: hir::GenericBounds<'_>,
|
bounds: hir::GenericBounds<'_>,
|
||||||
@ -875,7 +875,7 @@ fn foo(&self) -> Self::T { String::new() }
|
|||||||
/// Given a span corresponding to a bound, provide a structured suggestion to set an
|
/// Given a span corresponding to a bound, provide a structured suggestion to set an
|
||||||
/// associated type to a given type `ty`.
|
/// associated type to a given type `ty`.
|
||||||
fn constrain_associated_type_structured_suggestion(
|
fn constrain_associated_type_structured_suggestion(
|
||||||
&self,
|
self,
|
||||||
db: &mut DiagnosticBuilder<'_>,
|
db: &mut DiagnosticBuilder<'_>,
|
||||||
span: Span,
|
span: Span,
|
||||||
assoc: &ty::AssocItem,
|
assoc: &ty::AssocItem,
|
||||||
|
Loading…
Reference in New Issue
Block a user