diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-07-25 05:58:53 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-08-06 13:34:53 +0000 |
| commit | 92f4c59e4847005752a358ccacb5ae264700fbc4 (patch) | |
| tree | 970aac1a96c706880388f8f10ba72f5421ccec74 /compiler/rustc_ast/src | |
| parent | 4f7bb9890c0402cd145556ac1929d13d7524959e (diff) | |
| download | rust-92f4c59e4847005752a358ccacb5ae264700fbc4.tar.gz rust-92f4c59e4847005752a358ccacb5ae264700fbc4.zip | |
lower impl const to bind to host effect param
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
