Skip to content

Commit 3f4b0a9

Browse files
committed
implement name resolution in parser
1 parent 86d7bca commit 3f4b0a9

File tree

11 files changed

+186
-224
lines changed

11 files changed

+186
-224
lines changed

chalk-integration/src/error.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ impl std::error::Error for ChalkError {}
5454

5555
#[derive(Debug)]
5656
pub enum RustIrError {
57-
InvalidTypeName(Identifier),
58-
InvalidLifetimeName(Identifier),
59-
InvalidConstName(Identifier),
57+
InvalidParameterName(Identifier),
58+
InvalidTraitName(Identifier),
6059
NotTrait(Identifier),
6160
NotStruct(Identifier),
6261
DuplicateOrShadowedParameters,
@@ -97,9 +96,10 @@ pub enum RustIrError {
9796
impl std::fmt::Display for RustIrError {
9897
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9998
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),
103103
RustIrError::NotTrait(name) => write!(
104104
f,
105105
"expected a trait, found `{}`, which is not a trait",

0 commit comments

Comments
 (0)