diff --git a/crates/ide_assists/src/handlers/extract_function.rs b/crates/ide_assists/src/handlers/extract_function.rs index 43e83d683d8..ac7f0959b08 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( })?; stdx::always!( matches!(path, ast::Expr::PathExpr(_) | ast::Expr::MacroCall(_)), - "unexpected expression type for variable usage: {:?}", path ); @@ -2991,11 +2990,7 @@ mod bar { check_assist( extract_function, r#" -enum Option { - #[lang = "None"] None, - #[lang = "Some"] Some(T), -} -use Option::*; +//- minicore: option fn foo() { loop { let n = 1; @@ -3007,11 +3002,6 @@ fn foo() { } "#, r#" -enum Option { - #[lang = "None"] None, - #[lang = "Some"] Some(T), -} -use Option::*; fn foo() { loop { let n = 1; diff --git a/crates/ide_completion/src/completions/dot.rs b/crates/ide_completion/src/completions/dot.rs index 7f75d42988c..286d7cb67ca 100644 --- a/crates/ide_completion/src/completions/dot.rs +++ b/crates/ide_completion/src/completions/dot.rs @@ -498,10 +498,7 @@ mod foo { fn issue_8931() { check( r#" -#[lang = "fn_once"] -trait FnOnce { - type Output; -} +//- minicore: fn struct S; struct Foo; diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs index 98fb3604285..e49e434fa39 100644 --- a/crates/ide_completion/src/context.rs +++ b/crates/ide_completion/src/context.rs @@ -942,13 +942,12 @@ fn foo() -> u32 { // FIXME: make this work with `|| $0` check_expected_type_and_name( r#" +//- minicore: fn fn foo() { bar(|| a$0); } fn bar(f: impl FnOnce() -> u32) {} -#[lang = "fn_once"] -trait FnOnce { type Output; } "#, expect![[r#"ty: u32, name: ?"#]], );