From 92f4c59e4847005752a358ccacb5ae264700fbc4 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Tue, 25 Jul 2023 05:58:53 +0000 Subject: lower impl const to bind to host effect param --- compiler/rustc_ast/src/ast.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/rustc_ast/src') diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 2a268c2da85..f0434b0294f 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -313,6 +313,16 @@ pub enum TraitBoundModifier { MaybeConstMaybe, } +impl TraitBoundModifier { + pub fn to_constness(self) -> Const { + match self { + // FIXME(effects) span + Self::MaybeConst => Const::Yes(DUMMY_SP), + _ => Const::No, + } + } +} + /// The AST represents all type param bounds as types. /// `typeck::collect::compute_bounds` matches these against /// the "special" built-in traits (see `middle::lang_items`) and -- cgit 1.4.1-3-g733a5