diff options
| author | kadmin <julianknodt@gmail.com> | 2021-04-24 21:41:57 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2021-07-25 07:28:51 +0000 |
| commit | 417b098cfc493a9b803b4ffbf6b74fc4f8e76f3d (patch) | |
| tree | 613cc0e82fa1f34794abc8c6795c8cbdac57c1c3 /compiler/rustc_ast | |
| parent | 71a6c7c80398143a67e27b01412f4b2ec12bde8b (diff) | |
| download | rust-417b098cfc493a9b803b4ffbf6b74fc4f8e76f3d.tar.gz rust-417b098cfc493a9b803b4ffbf6b74fc4f8e76f3d.zip | |
Add generic arg infer
Diffstat (limited to 'compiler/rustc_ast')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index f851725058d..5bffc94364d 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -336,6 +336,7 @@ pub enum ParamKindOrd { // is active. Specifically, if it's only `min_const_generics`, it will still require // ordering consts after types. Const { unordered: bool }, + Infer, } impl Ord for ParamKindOrd { @@ -343,7 +344,7 @@ impl Ord for ParamKindOrd { use ParamKindOrd::*; let to_int = |v| match v { Lifetime => 0, - Type | Const { unordered: true } => 1, + Infer | Type | Const { unordered: true } => 1, // technically both consts should be ordered equally, // but only one is ever encountered at a time, so this is // fine. @@ -371,6 +372,7 @@ impl fmt::Display for ParamKindOrd { ParamKindOrd::Lifetime => "lifetime".fmt(f), ParamKindOrd::Type => "type".fmt(f), ParamKindOrd::Const { .. } => "const".fmt(f), + ParamKindOrd::Infer => "infer".fmt(f), } } } |
