Skip to content

Commit 264716e

Browse files
bors[bot]Veykril
andauthored
Merge #9375
9375: feat: Highlight exit and yield points r=Veykril a=Veykril ![Code_YBHOCF3DbU](https://user-images.githubusercontent.com/3757771/123128986-e1270a80-d44b-11eb-9854-065459a2dd50.png) ![Code_YyMhqES0LX](https://user-images.githubusercontent.com/3757771/123128988-e1bfa100-d44b-11eb-9c81-6a6031aad740.png) Fixes #4691 Fixes #9365 Co-authored-by: Lukas Wirth <[email protected]>
2 parents b656751 + d77655e commit 264716e

File tree

5 files changed

+672
-44
lines changed

5 files changed

+672
-44
lines changed

crates/hir/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,10 +2075,15 @@ impl Type {
20752075
pub fn is_unit(&self) -> bool {
20762076
matches!(self.ty.kind(&Interner), TyKind::Tuple(0, ..))
20772077
}
2078+
20782079
pub fn is_bool(&self) -> bool {
20792080
matches!(self.ty.kind(&Interner), TyKind::Scalar(Scalar::Bool))
20802081
}
20812082

2083+
pub fn is_never(&self) -> bool {
2084+
matches!(self.ty.kind(&Interner), TyKind::Never)
2085+
}
2086+
20822087
pub fn is_mutable_reference(&self) -> bool {
20832088
matches!(self.ty.kind(&Interner), TyKind::Ref(hir_ty::Mutability::Mut, ..))
20842089
}

0 commit comments

Comments
 (0)