Skip to content

Commit 605e8ce

Browse files
committed
---
yaml --- r: 182842 b: refs/heads/beta c: f88c94d h: refs/heads/master v: v3
1 parent d4bb8a2 commit 605e8ce

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: d0a9a39b1eb6a5fd152332392b7c4b1cd08a92c6
34+
refs/heads/beta: f88c94d8d2c74402d6f72607a47c4850dcdf3b4d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/src/libsyntax/ast_util.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -670,20 +670,13 @@ pub fn path_name_eq(a : &ast::Path, b : &ast::Path) -> bool {
670670

671671
// are two arrays of segments equal when compared unhygienically?
672672
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+
})
687680
}
688681

689682
/// Returns true if this literal is a string and false otherwise.

0 commit comments

Comments
 (0)