This commit is contained in:
Deadbeef 2021-07-24 15:48:51 +08:00
parent 7e6db83b14
commit 36ace4c0ad
No known key found for this signature in database
GPG Key ID: 027DF9338862ADDD
2 changed files with 7 additions and 2 deletions

View File

@ -1015,6 +1015,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
(result, dep_node)
}
#[instrument(level = "debug", skip(self))]
fn filter_impls(
&mut self,
candidate: SelectionCandidate<'tcx>,
@ -1031,7 +1032,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// auto trait impl
AutoImplCandidate(..) => {}
// FIXME check if this is right, but this would allow Sized impls
BuiltinCandidate { .. } => {}
// BuiltinCandidate { .. } => {}
_ => {
// reject all other types of candidates
return Err(Unimplemented);

View File

@ -101,7 +101,11 @@ impl Inherited<'a, 'tcx> {
Self::with_constness(infcx, def_id, tcx.hir().get(item_id).constness())
}
pub(super) fn with_constness(infcx: InferCtxt<'a, 'tcx>, def_id: LocalDefId, constness: hir::Constness) -> Self {
pub(super) fn with_constness(
infcx: InferCtxt<'a, 'tcx>,
def_id: LocalDefId,
constness: hir::Constness,
) -> Self {
let tcx = infcx.tcx;
let item_id = tcx.hir().local_def_id_to_hir_id(def_id);
let body_id = tcx.hir().maybe_body_owned_by(item_id);