mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Wrap inner tail expressions in MissingOkOrSomeInTailExpr
This commit is contained in:
parent
eb513c22f7
commit
1edbaa29f9
8 changed files with 69 additions and 11 deletions
|
@ -9,6 +9,8 @@ use hir_def::path::ModPath;
|
|||
use hir_expand::{name::Name, HirFileId, InFile};
|
||||
use syntax::{ast, AstPtr, SyntaxNodePtr, TextRange};
|
||||
|
||||
use crate::Type;
|
||||
|
||||
macro_rules! diagnostics {
|
||||
($($diag:ident,)*) => {
|
||||
pub enum AnyDiagnostic {$(
|
||||
|
@ -142,6 +144,7 @@ pub struct MissingOkOrSomeInTailExpr {
|
|||
pub expr: InFile<AstPtr<ast::Expr>>,
|
||||
// `Some` or `Ok` depending on whether the return type is Result or Option
|
||||
pub required: String,
|
||||
pub expected: Type,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue