@@ -54,9 +54,8 @@ impl std::error::Error for ChalkError {}
54
54
55
55
#[ derive( Debug ) ]
56
56
pub enum RustIrError {
57
- InvalidTypeName ( Identifier ) ,
58
- InvalidLifetimeName ( Identifier ) ,
59
- InvalidConstName ( Identifier ) ,
57
+ InvalidParameterName ( Identifier ) ,
58
+ InvalidTraitName ( Identifier ) ,
60
59
NotTrait ( Identifier ) ,
61
60
NotStruct ( Identifier ) ,
62
61
DuplicateOrShadowedParameters ,
@@ -97,9 +96,10 @@ pub enum RustIrError {
97
96
impl std:: fmt:: Display for RustIrError {
98
97
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
99
98
match self {
100
- RustIrError :: InvalidTypeName ( name) => write ! ( f, "invalid type name `{}`" , name) ,
101
- RustIrError :: InvalidLifetimeName ( name) => write ! ( f, "invalid lifetime name `{}`" , name) ,
102
- RustIrError :: InvalidConstName ( name) => write ! ( f, "invalid const name `{}`" , name) ,
99
+ RustIrError :: InvalidParameterName ( name) => {
100
+ write ! ( f, "invalid parameter name `{}`" , name)
101
+ }
102
+ RustIrError :: InvalidTraitName ( name) => write ! ( f, "invalid trait name `{}`" , name) ,
103
103
RustIrError :: NotTrait ( name) => write ! (
104
104
f,
105
105
"expected a trait, found `{}`, which is not a trait" ,
0 commit comments