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 {
28232823 /// Whether this would be the identifier for a tuple field like `self.0`, as
28242824 /// opposed to a named field like `self.thing`.
28252825 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 ( ) )
28272827 }
28282828}
28292829
Original file line number Diff line number Diff line change @@ -59,12 +59,7 @@ fn filter_assoc_items_by_name_and_namespace(
5959 ident : Ident ,
6060 ns : Namespace ,
6161) -> 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| {
6863 item. namespace ( ) == ns && tcx. hygienic_eq ( ident, item. ident ( tcx) , assoc_items_of)
6964 } )
7065}
You can’t perform that action at this time.
0 commit comments