Skip to content

Commit c22fed8

Browse files
committed
Fix test fixtures
1 parent b634d99 commit c22fed8

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

crates/ide/src/inlay_hints.rs

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn lifetime_hints(
134134
let param_list = func.param_list()?;
135135
let generic_param_list = func.generic_param_list();
136136
let ret_type = func.ret_type();
137-
let self_param = param_list.self_param();
137+
let self_param = param_list.self_param().filter(|it| it.amp_token().is_some());
138138

139139
// FIXME: don't use already used lifetimenames
140140

@@ -1472,41 +1472,6 @@ fn main() {
14721472
);
14731473
}
14741474

1475-
#[test]
1476-
fn incomplete_for_no_hint() {
1477-
check_types(
1478-
r#"
1479-
fn main() {
1480-
let data = &[1i32, 2, 3];
1481-
//^^^^ &[i32; 3]
1482-
for i
1483-
}"#,
1484-
);
1485-
check(
1486-
r#"
1487-
pub struct Vec<T> {}
1488-
1489-
impl<T> Vec<T> {
1490-
pub fn new() -> Self { Vec {} }
1491-
pub fn push(&mut self, t: T) {}
1492-
}
1493-
1494-
impl<T> IntoIterator for Vec<T> {
1495-
type Item=T;
1496-
}
1497-
1498-
fn main() {
1499-
let mut data = Vec::new();
1500-
//^^^^ Vec<&str>
1501-
data.push("foo");
1502-
for i in
1503-
1504-
println!("Unit expr");
1505-
}
1506-
"#,
1507-
);
1508-
}
1509-
15101475
#[test]
15111476
fn complete_for_hint() {
15121477
check_types(
@@ -2010,7 +1975,7 @@ fn main() {
20101975
}
20111976

20121977
#[test]
2013-
fn hints_sssin_attr_call() {
1978+
fn hints_lifetimes() {
20141979
check(
20151980
r#"
20161981
fn empty() {}

0 commit comments

Comments
 (0)