Allow hooks in the expression of a match statement and if statement (#2902)

* Allow hooks in the expression of a match statement and if statement

* Don't allow hooks in spawn and detect hooks in initialization closures

* Point to DX check when hooks are called conditionally
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-09-07 13:35:15 -05:00
1 parent 7bb53fe835
commit c11f2ed3cd
4 files changed
+232 -7

No files matched your search

+12
View File
@@ -111,6 +111,18 @@ impl ClosureInfo {
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
/// Information about an async block.
pub struct AsyncInfo {
pub span: Span,
}
impl AsyncInfo {
pub const fn new(span: Span) -> Self {
Self { span }
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
/// Information about a component function.
pub struct ComponentInfo {