mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Fix test fixtures
This commit is contained in:
parent
b634d99361
commit
c22fed895e
1 changed files with 2 additions and 37 deletions
|
@ -134,7 +134,7 @@ fn lifetime_hints(
|
||||||
let param_list = func.param_list()?;
|
let param_list = func.param_list()?;
|
||||||
let generic_param_list = func.generic_param_list();
|
let generic_param_list = func.generic_param_list();
|
||||||
let ret_type = func.ret_type();
|
let ret_type = func.ret_type();
|
||||||
let self_param = param_list.self_param();
|
let self_param = param_list.self_param().filter(|it| it.amp_token().is_some());
|
||||||
|
|
||||||
// FIXME: don't use already used lifetimenames
|
// FIXME: don't use already used lifetimenames
|
||||||
|
|
||||||
|
@ -1472,41 +1472,6 @@ fn main() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn incomplete_for_no_hint() {
|
|
||||||
check_types(
|
|
||||||
r#"
|
|
||||||
fn main() {
|
|
||||||
let data = &[1i32, 2, 3];
|
|
||||||
//^^^^ &[i32; 3]
|
|
||||||
for i
|
|
||||||
}"#,
|
|
||||||
);
|
|
||||||
check(
|
|
||||||
r#"
|
|
||||||
pub struct Vec<T> {}
|
|
||||||
|
|
||||||
impl<T> Vec<T> {
|
|
||||||
pub fn new() -> Self { Vec {} }
|
|
||||||
pub fn push(&mut self, t: T) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T> IntoIterator for Vec<T> {
|
|
||||||
type Item=T;
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
let mut data = Vec::new();
|
|
||||||
//^^^^ Vec<&str>
|
|
||||||
data.push("foo");
|
|
||||||
for i in
|
|
||||||
|
|
||||||
println!("Unit expr");
|
|
||||||
}
|
|
||||||
"#,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn complete_for_hint() {
|
fn complete_for_hint() {
|
||||||
check_types(
|
check_types(
|
||||||
|
@ -2010,7 +1975,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn hints_sssin_attr_call() {
|
fn hints_lifetimes() {
|
||||||
check(
|
check(
|
||||||
r#"
|
r#"
|
||||||
fn empty() {}
|
fn empty() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue