1
Fork 0

Fix tests

This commit is contained in:
Lukas Wirth 2023-03-14 19:36:28 +01:00
parent f34b2469bd
commit 2c364f6e5a
5 changed files with 11 additions and 10 deletions

View file

@ -415,7 +415,6 @@ fn foo(a: lib::A) { a.$0 }
fn test_local_impls() {
check(
r#"
//- /lib.rs crate:lib
pub struct A {}
mod m {
impl super::A {
@ -427,9 +426,8 @@ mod m {
}
}
}
//- /main.rs crate:main deps:lib
fn foo(a: lib::A) {
impl lib::A {
fn foo(a: A) {
impl A {
fn local_method(&self) {}
}
a.$0

View file

@ -614,6 +614,7 @@ fn f(u: U) {
check_empty(
r#"
#![rustc_coherence_is_core]
#[lang = "u32"]
impl u32 {
pub const MIN: Self = 0;

View file

@ -608,6 +608,7 @@ fn f() {
}
//- /core.rs crate:core
#![rustc_coherence_is_core]
#[lang = "u8"]
impl u8 {
pub const MAX: Self = 255;

View file

@ -297,6 +297,7 @@ impl Foo<str> {}
//- /lib.rs crate:main deps:core
fn foo(_: bool$0) {{}}
//- /libcore.rs crate:core
#![rustc_coherence_is_core]
#[lang = "bool"]
impl bool {}
//^^^^

View file

@ -435,7 +435,7 @@ fn main() {
file_id: FileId(
1,
),
range: 3386..3394,
range: 3415..3423,
},
),
tooltip: "",
@ -448,7 +448,7 @@ fn main() {
file_id: FileId(
1,
),
range: 3418..3422,
range: 3447..3451,
},
),
tooltip: "",
@ -468,7 +468,7 @@ fn main() {
file_id: FileId(
1,
),
range: 3386..3394,
range: 3415..3423,
},
),
tooltip: "",
@ -481,7 +481,7 @@ fn main() {
file_id: FileId(
1,
),
range: 3418..3422,
range: 3447..3451,
},
),
tooltip: "",
@ -501,7 +501,7 @@ fn main() {
file_id: FileId(
1,
),
range: 3386..3394,
range: 3415..3423,
},
),
tooltip: "",
@ -514,7 +514,7 @@ fn main() {
file_id: FileId(
1,
),
range: 3418..3422,
range: 3447..3451,
},
),
tooltip: "",