Add new method to Semantics, method_receiver_kind, which returns the kind of self

The options are Shared, Mutable, Consuming, and Copied. Use this to add proper
highlighting to methods based on usage.
This commit is contained in:
Paul Daniel Faria 2020-07-30 22:31:53 -04:00
parent a044ff0138
commit 3456e2eec7
5 changed files with 181 additions and 70 deletions

View file

@ -38,7 +38,7 @@ pub use crate::{
Static, Struct, Trait, Type, TypeAlias, TypeParam, Union, VariantDef, Visibility,
},
has_source::HasSource,
semantics::{original_range, PathResolution, Semantics, SemanticsScope},
semantics::{original_range, PathResolution, SelfKind, Semantics, SemanticsScope},
};
pub use hir_def::{