internal: switch some tests to minicore

This commit is contained in:
Aleksey Kladov 2021-06-15 23:11:53 +03:00
parent 0798cce9e5
commit 7cbcbccc78
2 changed files with 9 additions and 18 deletions

View file

@ -3000,29 +3000,24 @@ fn foo(ar$0g: &impl Foo + Bar<S>) {}
fn test_hover_async_block_impl_trait_has_goto_type_action() { fn test_hover_async_block_impl_trait_has_goto_type_action() {
check_actions( check_actions(
r#" r#"
//- minicore: future
struct S; struct S;
fn foo() { fn foo() {
let fo$0o = async { S }; let fo$0o = async { S };
} }
#[prelude_import] use future::*;
mod future {
#[lang = "future_trait"]
pub trait Future { type Output; }
}
"#, "#,
expect![[r#" expect![[r#"
[ [
GoToType( GoToType(
[ [
HoverGotoTypeData { HoverGotoTypeData {
mod_path: "test::future::Future", mod_path: "core::future::Future",
nav: NavigationTarget { nav: NavigationTarget {
file_id: FileId( file_id: FileId(
0, 1,
), ),
full_range: 101..163, full_range: 244..426,
focus_range: 140..146, focus_range: 283..289,
name: "Future", name: "Future",
kind: Trait, kind: Trait,
description: "pub trait Future", description: "pub trait Future",

View file

@ -1152,16 +1152,11 @@ fn main() {
fn suggest_deref() { fn suggest_deref() {
check_relevance( check_relevance(
r#" r#"
#[lang = "deref"] //- minicore: deref
trait Deref {
type Target;
fn deref(&self) -> &Self::Target;
}
struct S; struct S;
struct T(S); struct T(S);
impl Deref for T { impl core::ops::Deref for T {
type Target = S; type Target = S;
fn deref(&self) -> &Self::Target { fn deref(&self) -> &Self::Target {
@ -1185,8 +1180,9 @@ fn main() {
st T [] st T []
st S [] st S []
fn main() [] fn main() []
tt Deref []
fn foo() [] fn foo() []
md core []
tt Sized []
"#]], "#]],
) )
} }