File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2823,7 +2823,7 @@ impl Ident {
2823
2823
/// Whether this would be the identifier for a tuple field like `self.0`, as
2824
2824
/// opposed to a named field like `self.thing`.
2825
2825
pub fn is_numeric ( self ) -> bool {
2826
- ! self . name . is_empty ( ) && self . as_str ( ) . bytes ( ) . all ( |b| b. is_ascii_digit ( ) )
2826
+ self . as_str ( ) . bytes ( ) . all ( |b| b. is_ascii_digit ( ) )
2827
2827
}
2828
2828
}
2829
2829
Original file line number Diff line number Diff line change @@ -59,12 +59,7 @@ fn filter_assoc_items_by_name_and_namespace(
59
59
ident : Ident ,
60
60
ns : Namespace ,
61
61
) -> impl Iterator < Item = & ty:: AssocItem > {
62
- let iter: Box < dyn Iterator < Item = & ty:: AssocItem > > = if !ident. name . is_empty ( ) {
63
- Box :: new ( tcx. associated_items ( assoc_items_of) . filter_by_name_unhygienic ( ident. name ) )
64
- } else {
65
- Box :: new ( [ ] . iter ( ) )
66
- } ;
67
- iter. filter ( move |item| {
62
+ tcx. associated_items ( assoc_items_of) . filter_by_name_unhygienic ( ident. name ) . filter ( move |item| {
68
63
item. namespace ( ) == ns && tcx. hygienic_eq ( ident, item. ident ( tcx) , assoc_items_of)
69
64
} )
70
65
}
You can’t perform that action at this time.
0 commit comments