File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed
branches/beta/src/libsyntax Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
31
31
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32
32
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
33
33
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34
- refs/heads/beta: d0a9a39b1eb6a5fd152332392b7c4b1cd08a92c6
34
+ refs/heads/beta: f88c94d8d2c74402d6f72607a47c4850dcdf3b4d
35
35
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
36
36
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37
37
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f
Original file line number Diff line number Diff line change @@ -670,20 +670,13 @@ pub fn path_name_eq(a : &ast::Path, b : &ast::Path) -> bool {
670
670
671
671
// are two arrays of segments equal when compared unhygienically?
672
672
pub fn segments_name_eq ( a : & [ ast:: PathSegment ] , b : & [ ast:: PathSegment ] ) -> bool {
673
- if a. len ( ) != b. len ( ) {
674
- false
675
- } else {
676
- for ( idx, seg) in a. iter ( ) . enumerate ( ) {
677
- if seg. identifier . name != b[ idx] . identifier . name
678
- // FIXME #7743: ident -> name problems in lifetime comparison?
679
- // can types contain idents?
680
- || seg. parameters != b[ idx] . parameters
681
- {
682
- return false ;
683
- }
684
- }
685
- true
686
- }
673
+ a. len ( ) == b. len ( ) &&
674
+ a. iter ( ) . zip ( b. iter ( ) ) . all ( |( s, t) | {
675
+ s. identifier . name == t. identifier . name &&
676
+ // FIXME #7743: ident -> name problems in lifetime comparison?
677
+ // can types contain idents?
678
+ s. parameters == t. parameters
679
+ } )
687
680
}
688
681
689
682
/// Returns true if this literal is a string and false otherwise.
You can’t perform that action at this time.
0 commit comments