mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-16 23:36:13 +00:00
Fix tests
This commit is contained in:
parent
f34b2469bd
commit
2c364f6e5a
5 changed files with 11 additions and 10 deletions
|
@ -415,7 +415,6 @@ fn foo(a: lib::A) { a.$0 }
|
||||||
fn test_local_impls() {
|
fn test_local_impls() {
|
||||||
check(
|
check(
|
||||||
r#"
|
r#"
|
||||||
//- /lib.rs crate:lib
|
|
||||||
pub struct A {}
|
pub struct A {}
|
||||||
mod m {
|
mod m {
|
||||||
impl super::A {
|
impl super::A {
|
||||||
|
@ -427,9 +426,8 @@ mod m {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//- /main.rs crate:main deps:lib
|
fn foo(a: A) {
|
||||||
fn foo(a: lib::A) {
|
impl A {
|
||||||
impl lib::A {
|
|
||||||
fn local_method(&self) {}
|
fn local_method(&self) {}
|
||||||
}
|
}
|
||||||
a.$0
|
a.$0
|
||||||
|
|
|
@ -614,6 +614,7 @@ fn f(u: U) {
|
||||||
|
|
||||||
check_empty(
|
check_empty(
|
||||||
r#"
|
r#"
|
||||||
|
#![rustc_coherence_is_core]
|
||||||
#[lang = "u32"]
|
#[lang = "u32"]
|
||||||
impl u32 {
|
impl u32 {
|
||||||
pub const MIN: Self = 0;
|
pub const MIN: Self = 0;
|
||||||
|
|
|
@ -608,6 +608,7 @@ fn f() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//- /core.rs crate:core
|
//- /core.rs crate:core
|
||||||
|
#![rustc_coherence_is_core]
|
||||||
#[lang = "u8"]
|
#[lang = "u8"]
|
||||||
impl u8 {
|
impl u8 {
|
||||||
pub const MAX: Self = 255;
|
pub const MAX: Self = 255;
|
||||||
|
|
|
@ -297,6 +297,7 @@ impl Foo<str> {}
|
||||||
//- /lib.rs crate:main deps:core
|
//- /lib.rs crate:main deps:core
|
||||||
fn foo(_: bool$0) {{}}
|
fn foo(_: bool$0) {{}}
|
||||||
//- /libcore.rs crate:core
|
//- /libcore.rs crate:core
|
||||||
|
#![rustc_coherence_is_core]
|
||||||
#[lang = "bool"]
|
#[lang = "bool"]
|
||||||
impl bool {}
|
impl bool {}
|
||||||
//^^^^
|
//^^^^
|
||||||
|
|
|
@ -435,7 +435,7 @@ fn main() {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
range: 3386..3394,
|
range: 3415..3423,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
|
@ -448,7 +448,7 @@ fn main() {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
range: 3418..3422,
|
range: 3447..3451,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
|
@ -468,7 +468,7 @@ fn main() {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
range: 3386..3394,
|
range: 3415..3423,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
|
@ -481,7 +481,7 @@ fn main() {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
range: 3418..3422,
|
range: 3447..3451,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
|
@ -501,7 +501,7 @@ fn main() {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
range: 3386..3394,
|
range: 3415..3423,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
|
@ -514,7 +514,7 @@ fn main() {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
range: 3418..3422,
|
range: 3447..3451,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue