diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide_assists/src/handlers/extract_function.rs | 12 | ||||
-rw-r--r-- | crates/ide_completion/src/completions/dot.rs | 5 | ||||
-rw-r--r-- | crates/ide_completion/src/context.rs | 3 |
3 files changed, 3 insertions, 17 deletions
diff --git a/crates/ide_assists/src/handlers/extract_function.rs b/crates/ide_assists/src/handlers/extract_function.rs index 43e83d683..ac7f0959b 100644 --- a/crates/ide_assists/src/handlers/extract_function.rs +++ b/crates/ide_assists/src/handlers/extract_function.rs | |||
@@ -831,7 +831,6 @@ fn path_element_of_reference( | |||
831 | })?; | 831 | })?; |
832 | stdx::always!( | 832 | stdx::always!( |
833 | matches!(path, ast::Expr::PathExpr(_) | ast::Expr::MacroCall(_)), | 833 | matches!(path, ast::Expr::PathExpr(_) | ast::Expr::MacroCall(_)), |
834 | |||
835 | "unexpected expression type for variable usage: {:?}", | 834 | "unexpected expression type for variable usage: {:?}", |
836 | path | 835 | path |
837 | ); | 836 | ); |
@@ -2991,11 +2990,7 @@ mod bar { | |||
2991 | check_assist( | 2990 | check_assist( |
2992 | extract_function, | 2991 | extract_function, |
2993 | r#" | 2992 | r#" |
2994 | enum Option<T> { | 2993 | //- minicore: option |
2995 | #[lang = "None"] None, | ||
2996 | #[lang = "Some"] Some(T), | ||
2997 | } | ||
2998 | use Option::*; | ||
2999 | fn foo() { | 2994 | fn foo() { |
3000 | loop { | 2995 | loop { |
3001 | let n = 1; | 2996 | let n = 1; |
@@ -3007,11 +3002,6 @@ fn foo() { | |||
3007 | } | 3002 | } |
3008 | "#, | 3003 | "#, |
3009 | r#" | 3004 | r#" |
3010 | enum Option<T> { | ||
3011 | #[lang = "None"] None, | ||
3012 | #[lang = "Some"] Some(T), | ||
3013 | } | ||
3014 | use Option::*; | ||
3015 | fn foo() { | 3005 | fn foo() { |
3016 | loop { | 3006 | loop { |
3017 | let n = 1; | 3007 | let n = 1; |
diff --git a/crates/ide_completion/src/completions/dot.rs b/crates/ide_completion/src/completions/dot.rs index 7f75d4298..286d7cb67 100644 --- a/crates/ide_completion/src/completions/dot.rs +++ b/crates/ide_completion/src/completions/dot.rs | |||
@@ -498,10 +498,7 @@ mod foo { | |||
498 | fn issue_8931() { | 498 | fn issue_8931() { |
499 | check( | 499 | check( |
500 | r#" | 500 | r#" |
501 | #[lang = "fn_once"] | 501 | //- minicore: fn |
502 | trait FnOnce<Args> { | ||
503 | type Output; | ||
504 | } | ||
505 | struct S; | 502 | struct S; |
506 | 503 | ||
507 | struct Foo; | 504 | struct Foo; |
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs index 98fb36042..e49e434fa 100644 --- a/crates/ide_completion/src/context.rs +++ b/crates/ide_completion/src/context.rs | |||
@@ -942,13 +942,12 @@ fn foo() -> u32 { | |||
942 | // FIXME: make this work with `|| $0` | 942 | // FIXME: make this work with `|| $0` |
943 | check_expected_type_and_name( | 943 | check_expected_type_and_name( |
944 | r#" | 944 | r#" |
945 | //- minicore: fn | ||
945 | fn foo() { | 946 | fn foo() { |
946 | bar(|| a$0); | 947 | bar(|| a$0); |
947 | } | 948 | } |
948 | 949 | ||
949 | fn bar(f: impl FnOnce() -> u32) {} | 950 | fn bar(f: impl FnOnce() -> u32) {} |
950 | #[lang = "fn_once"] | ||
951 | trait FnOnce { type Output; } | ||
952 | "#, | 951 | "#, |
953 | expect![[r#"ty: u32, name: ?"#]], | 952 | expect![[r#"ty: u32, name: ?"#]], |
954 | ); | 953 | ); |