Move trait into attr so it's greppable

This commit is contained in:
Michael Goulet
2024-02-14 17:18:56 +00:00
parent 9c25823bb4
commit a9dbf63087
31 changed files with 91 additions and 80 deletions

View File

@@ -4,8 +4,8 @@ use crate::infer::canonical::OriginalQueryValues;
use crate::infer::InferCtxt;
use crate::traits::{EvaluationResult, OverflowError, PredicateObligation, SelectionContext};
#[extension]
pub impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
#[extension(pub trait InferCtxtExt<'tcx>)]
impl<'tcx> InferCtxt<'tcx> {
/// Evaluates whether the predicate can be satisfied (by any means)
/// in the given `ParamEnv`.
fn predicate_may_hold(&self, obligation: &PredicateObligation<'tcx>) -> bool {

View File

@@ -22,8 +22,8 @@ use super::NoSolution;
pub use rustc_middle::traits::query::NormalizationResult;
#[extension]
pub impl<'cx, 'tcx> QueryNormalizeExt<'tcx> for At<'cx, 'tcx> {
#[extension(pub trait QueryNormalizeExt<'tcx>)]
impl<'cx, 'tcx> At<'cx, 'tcx> {
/// Normalize `value` in the context of the inference context,
/// yielding a resulting type, or an error if `value` cannot be
/// normalized. If you don't care about regions, you should prefer