diff options
| author | kadmin <julianknodt@gmail.com> | 2022-01-07 03:58:32 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2022-01-17 17:20:57 +0000 |
| commit | fb57b7518d207caa99bdd99f4dab2a7d3902a83a (patch) | |
| tree | 3e34269c3e145261eba9288f049b06c9a6c6b183 /compiler/rustc_interface/src | |
| parent | 07659996221446273065651ff9c0fcb00935eb03 (diff) | |
| download | rust-fb57b7518d207caa99bdd99f4dab2a7d3902a83a.tar.gz rust-fb57b7518d207caa99bdd99f4dab2a7d3902a83a.zip | |
Add term
Instead of having a separate enum variant for types and consts have one but have either a const or type.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index abecc8d1a8b..0d1081ee26b 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -1,7 +1,7 @@ use libloading::Library; use rustc_ast::mut_visit::{visit_clobber, MutVisitor, *}; use rustc_ast::ptr::P; -use rustc_ast::{self as ast, AttrVec, BlockCheckMode}; +use rustc_ast::{self as ast, AttrVec, BlockCheckMode, Term}; use rustc_codegen_ssa::traits::CodegenBackend; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; #[cfg(parallel_compiler)] @@ -739,9 +739,11 @@ impl<'a, 'b> ReplaceBodyWithLoop<'a, 'b> { }, ast::AngleBracketedArg::Constraint(c) => match c.kind { ast::AssocConstraintKind::Bound { .. } => true, - ast::AssocConstraintKind::ConstEquality { .. } => false, - ast::AssocConstraintKind::Equality { ref ty } => { - involves_impl_trait(ty) + ast::AssocConstraintKind::Equality { ref term } => { + match term { + Term::Ty(ty) => involves_impl_trait(ty), + Term::Const(_) => false, + } } }, }) |
