conlang: Remove "self" keyword
This commit is contained in:
@@ -4,7 +4,6 @@ use super::*;
|
||||
impl<T: AsRef<str>> From<T> for PathPart {
|
||||
fn from(value: T) -> Self {
|
||||
match value.as_ref() {
|
||||
"self" => PathPart::SelfKw,
|
||||
"super" => PathPart::SuperKw,
|
||||
ident => PathPart::Ident(ident.into()),
|
||||
}
|
||||
|
||||
@@ -370,7 +370,6 @@ impl Display for PathPart {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
PathPart::SuperKw => "super".fmt(f),
|
||||
PathPart::SelfKw => "self".fmt(f),
|
||||
PathPart::SelfTy => "Self".fmt(f),
|
||||
PathPart::Ident(id) => id.fmt(f),
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@ impl WeightOf for PathPart {
|
||||
fn weight_of(&self) -> usize {
|
||||
match self {
|
||||
PathPart::SuperKw => size_of_val(self),
|
||||
PathPart::SelfKw => size_of_val(self),
|
||||
PathPart::SelfTy => size_of_val(self),
|
||||
PathPart::Ident(interned) => interned.weight_of(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user