From e7529d6a3867ed1692818702b40814ee992eba2d Mon Sep 17 00:00:00 2001 From: kadmin Date: Mon, 10 Jan 2022 23:39:21 +0000 Subject: Update term for use in more places Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the future, but slightly worried it allows items which are consts which only accept types. --- compiler/rustc_interface/src/util.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_interface/src') diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 0d1081ee26b..3921187baa5 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -742,6 +742,8 @@ impl<'a, 'b> ReplaceBodyWithLoop<'a, 'b> { ast::AssocConstraintKind::Equality { ref term } => { match term { Term::Ty(ty) => involves_impl_trait(ty), + // FIXME(...): This should check if the constant + // involves a trait impl, but for now ignore. Term::Const(_) => false, } } -- cgit 1.4.1-3-g733a5