File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed
branches/try/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 2
2
refs/heads/master: 336c8d2e9c6b276b162bdb3edd43706372e6eddd
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 474b324eda10440d6568ef872a7307d38e7de95b
5
- refs/heads/try: d0a9a39b1eb6a5fd152332392b7c4b1cd08a92c6
5
+ refs/heads/try: f88c94d8d2c74402d6f72607a47c4850dcdf3b4d
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
8
8
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
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