File tree Expand file tree Collapse file tree 1 file changed +2
-37
lines changed Expand file tree Collapse file tree 1 file changed +2
-37
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ fn lifetime_hints(
134
134
let param_list = func. param_list ( ) ?;
135
135
let generic_param_list = func. generic_param_list ( ) ;
136
136
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 ( ) ) ;
138
138
139
139
// FIXME: don't use already used lifetimenames
140
140
@@ -1472,41 +1472,6 @@ fn main() {
1472
1472
) ;
1473
1473
}
1474
1474
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
-
1510
1475
#[ test]
1511
1476
fn complete_for_hint ( ) {
1512
1477
check_types (
@@ -2010,7 +1975,7 @@ fn main() {
2010
1975
}
2011
1976
2012
1977
#[ test]
2013
- fn hints_sssin_attr_call ( ) {
1978
+ fn hints_lifetimes ( ) {
2014
1979
check (
2015
1980
r#"
2016
1981
fn empty() {}
You can’t perform that action at this time.
0 commit comments