mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
internal: Resolve labels in body lowering
This commit is contained in:
parent
e9e57725aa
commit
0e7117900c
13 changed files with 420 additions and 182 deletions
|
@ -32,7 +32,6 @@ macro_rules! diagnostics {
|
|||
}
|
||||
|
||||
diagnostics![
|
||||
BreakOutsideOfLoop,
|
||||
ExpectedFunction,
|
||||
InactiveCode,
|
||||
IncorrectCase,
|
||||
|
@ -50,7 +49,9 @@ diagnostics![
|
|||
PrivateField,
|
||||
ReplaceFilterMapNextWithFindMap,
|
||||
TypeMismatch,
|
||||
UndeclaredLabel,
|
||||
UnimplementedBuiltinMacro,
|
||||
UnreachableLabel,
|
||||
UnresolvedExternCrate,
|
||||
UnresolvedField,
|
||||
UnresolvedImport,
|
||||
|
@ -84,6 +85,17 @@ pub struct UnresolvedMacroCall {
|
|||
pub path: ModPath,
|
||||
pub is_bang: bool,
|
||||
}
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct UnreachableLabel {
|
||||
pub node: InFile<AstPtr<ast::Lifetime>>,
|
||||
pub name: Name,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct UndeclaredLabel {
|
||||
pub node: InFile<AstPtr<ast::Lifetime>>,
|
||||
pub name: Name,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct InactiveCode {
|
||||
|
@ -166,13 +178,6 @@ pub struct PrivateField {
|
|||
pub field: Field,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BreakOutsideOfLoop {
|
||||
pub expr: InFile<AstPtr<ast::Expr>>,
|
||||
pub is_break: bool,
|
||||
pub bad_value_break: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MissingUnsafe {
|
||||
pub expr: InFile<AstPtr<ast::Expr>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue