We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6633a8 commit 8d5f59eCopy full SHA for 8d5f59e
crates/ide_db/src/ty_filter.rs
@@ -4,7 +4,7 @@
4
5
use std::iter;
6
7
-use hir::{Adt, Semantics, Type};
+use hir::Semantics;
8
use syntax::ast::{self, make};
9
10
use crate::RootDatabase;
@@ -20,9 +20,9 @@ impl TryEnum {
20
const ALL: [TryEnum; 2] = [TryEnum::Option, TryEnum::Result];
21
22
/// Returns `Some(..)` if the provided type is an enum that implements `std::ops::Try`.
23
- pub fn from_ty(sema: &Semantics<RootDatabase>, ty: &Type) -> Option<TryEnum> {
+ pub fn from_ty(sema: &Semantics<RootDatabase>, ty: &hir::Type) -> Option<TryEnum> {
24
let enum_ = match ty.as_adt() {
25
- Some(Adt::Enum(it)) => it,
+ Some(hir::Adt::Enum(it)) => it,
26
_ => return None,
27
};
28
TryEnum::ALL.iter().find_map(|&var| {
0 commit comments