Auto merge of #105070 - matthiaskrgr:rollup-9b25khj, r=matthiaskrgr
Rollup of 14 pull requests Successful merges: - #103876 (type alias impl trait: add tests showing that hidden type only outlives lifetimes that occur in bounds) - #104427 (Explain why `rematch_impl` fails to be infallible) - #104436 (Add slice to the stack allocated string comment) - #104523 (Don't use periods in target names) - #104627 (Print all features with --print target-features) - #104911 (Make inferred_outlives_crate return Clause) - #105002 (Add `PathBuf::as_mut_os_string` and `Path::as_mut_os_str`) - #105023 (Statics used in reachable function's inline asm are reachable) - #105045 (`rustc_ast_{passes,pretty}`: remove `ref` patterns) - #105049 (Hermit: Minor build fixes) - #105051 (Replace a macro with a function) - #105062 (rustdoc: use shorthand background for rustdoc toggle CSS) - #105066 (move `candidate_from_obligation` out of assembly) - #105068 (Run patchelf also on rust-analyzer-proc-macro-srv.) Failed merges: - #105050 (Remove useless borrows and derefs) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
@@ -734,7 +734,7 @@ pub struct CratePredicatesMap<'tcx> {
|
||||
/// For each struct with outlive bounds, maps to a vector of the
|
||||
/// predicate of its outlive bounds. If an item has no outlives
|
||||
/// bounds, it will have no entry.
|
||||
pub predicates: FxHashMap<DefId, &'tcx [(Predicate<'tcx>, Span)]>,
|
||||
pub predicates: FxHashMap<DefId, &'tcx [(Clause<'tcx>, Span)]>,
|
||||
}
|
||||
|
||||
impl<'tcx> Predicate<'tcx> {
|
||||
@@ -1167,6 +1167,13 @@ impl<'tcx> ToPredicate<'tcx, Predicate<'tcx>> for Binder<'tcx, PredicateKind<'tc
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> ToPredicate<'tcx, Predicate<'tcx>> for Clause<'tcx> {
|
||||
#[inline(always)]
|
||||
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
|
||||
tcx.mk_predicate(ty::Binder::dummy(ty::PredicateKind::Clause(self)))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> ToPredicate<'tcx, Predicate<'tcx>> for Binder<'tcx, TraitRef<'tcx>> {
|
||||
#[inline(always)]
|
||||
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
|
||||
|
||||
Reference in New Issue
Block a user