mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Revise TypeInfo::ty usage
This commit is contained in:
parent
25ff7171c4
commit
8afa2722b2
18 changed files with 30 additions and 29 deletions
|
@ -100,11 +100,11 @@ impl TypeInfo {
|
|||
self.ty
|
||||
}
|
||||
|
||||
pub fn coerced(self) -> Option<Type> {
|
||||
self.coerced
|
||||
pub fn has_coercion(&self) -> bool {
|
||||
self.coerced.is_some()
|
||||
}
|
||||
|
||||
pub fn coerced_or_original(self) -> Type {
|
||||
pub fn coerced(self) -> Type {
|
||||
self.coerced.unwrap_or(self.ty)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue