| <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Relate` trait in crate `hir`."><title>Relate in hir::next_solver::infer::relate - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="hir" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Relate</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../hir/index.html">hir</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Relate</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.relate" title="relate">relate</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In hir::<wbr>next_<wbr>solver::<wbr>infer::<wbr>relate</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">hir</a>::<wbr><a href="../../index.html">next_solver</a>::<wbr><a href="../index.html">infer</a>::<wbr><a href="index.html">relate</a></div><h1>Trait <span class="trait">Relate</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait Relate<I>: |
| TypeFoldable<I> |
| + <a class="trait" href="https://doc.rust-lang.org/1.91.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> |
| + <a class="trait" href="https://doc.rust-lang.org/1.91.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a><div class="where">where |
| I: Interner,</div>{ |
| // Required method |
| fn <a href="#tymethod.relate" class="fn">relate</a><R>( |
| relation: <a class="primitive" href="https://doc.rust-lang.org/1.91.1/std/primitive.reference.html">&mut R</a>, |
| a: Self, |
| b: Self, |
| ) -> <a class="enum" href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, TypeError<I>> |
| <span class="where">where R: <a class="trait" href="trait.TypeRelation.html" title="trait hir::next_solver::infer::relate::TypeRelation">TypeRelation</a><I></span>; |
| }</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.relate" class="method"><h4 class="code-header">fn <a href="#tymethod.relate" class="fn">relate</a><R>(relation: <a class="primitive" href="https://doc.rust-lang.org/1.91.1/std/primitive.reference.html">&mut R</a>, a: Self, b: Self) -> <a class="enum" href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, TypeError<I>><div class="where">where |
| R: <a class="trait" href="trait.TypeRelation.html" title="trait hir::next_solver::infer::relate::TypeRelation">TypeRelation</a><I>,</div></h4></section></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.91.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-FnAbi" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-FnAbi" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="enum" href="../../../enum.FnAbi.html" title="enum hir::FnAbi">FnAbi</a></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-Safety" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-Safety" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="enum" href="../../../enum.Safety.html" title="enum hir::Safety">Safety</a></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-GenericArg%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-GenericArg%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="enum" href="../../enum.GenericArg.html" title="enum hir::next_solver::GenericArg">GenericArg</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-Term%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-Term%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="enum" href="../../enum.Term.html" title="enum hir::next_solver::Term">Term</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-BoundExistentialPredicates%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-BoundExistentialPredicates%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.BoundExistentialPredicates.html" title="struct hir::next_solver::BoundExistentialPredicates">BoundExistentialPredicates</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-Const%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-Const%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.Const.html" title="struct hir::next_solver::Const">Const</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-ExprConst" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-ExprConst" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.ExprConst.html" title="struct hir::next_solver::ExprConst">ExprConst</a></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-GenericArgs%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-GenericArgs%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.GenericArgs.html" title="struct hir::next_solver::GenericArgs">GenericArgs</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-Pattern%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-Pattern%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.Pattern.html" title="struct hir::next_solver::Pattern">Pattern</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-Region%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-Region%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.Region.html" title="struct hir::next_solver::Region">Region</a><'db></h3></section><section id="impl-Relate%3CDbInterner%3C'db%3E%3E-for-Ty%3C'db%3E" class="impl"><a href="#impl-Relate%3CDbInterner%3C'db%3E%3E-for-Ty%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><<a class="struct" href="../../struct.DbInterner.html" title="struct hir::next_solver::DbInterner">DbInterner</a><'db>> for <a class="struct" href="../../struct.Ty.html" title="struct hir::next_solver::Ty">Ty</a><'db></h3></section><section id="impl-Relate%3CI%3E-for-AliasTerm%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-AliasTerm%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for AliasTerm<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-AliasTy%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-AliasTy%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for AliasTy<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-ExistentialProjection%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-ExistentialProjection%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for ExistentialProjection<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-ExistentialTraitRef%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-ExistentialTraitRef%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for ExistentialTraitRef<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-FnSig%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-FnSig%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for FnSig<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-TraitPredicate%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-TraitPredicate%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for TraitPredicate<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-TraitRef%3CI%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-TraitRef%3CI%3E" class="anchor">§</a><h3 class="code-header">impl<I> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for TraitRef<I><div class="where">where |
| I: Interner,</div></h3></section><section id="impl-Relate%3CI%3E-for-Binder%3CI,+T%3E" class="impl"><a href="#impl-Relate%3CI%3E-for-Binder%3CI,+T%3E" class="anchor">§</a><h3 class="code-header">impl<I, T> <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I> for Binder<I, T><div class="where">where |
| I: Interner, |
| T: <a class="trait" href="trait.Relate.html" title="trait hir::next_solver::infer::relate::Relate">Relate</a><I>,</div></h3></section></div><script src="../../../../trait.impl/ra_ap_rustc_type_ir/relate/trait.Relate.js" data-ignore-extern-crates="ra_ap_rustc_type_ir,hir_ty" async></script></section></div></main></body></html> |