Skip to content

Commit f0c86f7

Browse files
committed
---
yaml --- r: 93870 b: refs/heads/try c: eb5cbfe h: refs/heads/master v: v3
1 parent 1c51189 commit f0c86f7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: cd7a9b723484115d447f68729f5074ea7cae409c
5+
refs/heads/try: eb5cbfebfd2a1524a2c366dc220a8de0d4f08b13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/pat_util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub type PatIdMap = HashMap<Ident, NodeId>;
2020

2121
// This is used because same-named variables in alternative patterns need to
2222
// use the NodeId of their namesake in the first pattern.
23-
pub fn pat_id_map(dm: resolve::DefMap, pat: @Pat) -> PatIdMap {
23+
pub fn pat_id_map(dm: resolve::DefMap, pat: &Pat) -> PatIdMap {
2424
let mut map = HashMap::new();
2525
do pat_bindings(dm, pat) |_bm, p_id, _s, n| {
2626
map.insert(path_to_ident(n), p_id);
@@ -52,7 +52,7 @@ pub fn pat_is_const(dm: resolve::DefMap, pat: &Pat) -> bool {
5252
}
5353
}
5454

55-
pub fn pat_is_binding(dm: resolve::DefMap, pat: @Pat) -> bool {
55+
pub fn pat_is_binding(dm: resolve::DefMap, pat: &Pat) -> bool {
5656
match pat.node {
5757
PatIdent(*) => {
5858
!pat_is_variant_or_struct(dm, pat) &&
@@ -62,7 +62,7 @@ pub fn pat_is_binding(dm: resolve::DefMap, pat: @Pat) -> bool {
6262
}
6363
}
6464

65-
pub fn pat_is_binding_or_wild(dm: resolve::DefMap, pat: @Pat) -> bool {
65+
pub fn pat_is_binding_or_wild(dm: resolve::DefMap, pat: &Pat) -> bool {
6666
match pat.node {
6767
PatIdent(*) => pat_is_binding(dm, pat),
6868
PatWild | PatWildMulti => true,
@@ -73,7 +73,7 @@ pub fn pat_is_binding_or_wild(dm: resolve::DefMap, pat: @Pat) -> bool {
7373
/// Call `it` on every "binding" in a pattern, e.g., on `a` in
7474
/// `match foo() { Some(a) => (), None => () }`
7575
pub fn pat_bindings(dm: resolve::DefMap,
76-
pat: @Pat,
76+
pat: &Pat,
7777
it: |BindingMode, NodeId, Span, &Path|) {
7878
do walk_pat(pat) |p| {
7979
match p.node {
@@ -86,15 +86,15 @@ pub fn pat_bindings(dm: resolve::DefMap,
8686
};
8787
}
8888

89-
pub fn pat_binding_ids(dm: resolve::DefMap, pat: @Pat) -> ~[NodeId] {
89+
pub fn pat_binding_ids(dm: resolve::DefMap, pat: &Pat) -> ~[NodeId] {
9090
let mut found = ~[];
9191
pat_bindings(dm, pat, |_bm, b_id, _sp, _pt| found.push(b_id) );
9292
return found;
9393
}
9494

9595
/// Checks if the pattern contains any patterns that bind something to
9696
/// an ident, e.g. `foo`, or `Foo(foo)` or `foo @ Bar(*)`.
97-
pub fn pat_contains_bindings(dm: resolve::DefMap, pat: @Pat) -> bool {
97+
pub fn pat_contains_bindings(dm: resolve::DefMap, pat: &Pat) -> bool {
9898
let mut contains_bindings = false;
9999
do walk_pat(pat) |p| {
100100
if pat_is_binding(dm, p) {

branches/try/src/libsyntax/ast_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ pub fn is_item_impl(item: @ast::item) -> bool {
636636
}
637637
}
638638

639-
pub fn walk_pat(pat: @Pat, it: |@Pat| -> bool) -> bool {
639+
pub fn walk_pat(pat: &Pat, it: |&Pat| -> bool) -> bool {
640640
if !it(pat) {
641641
return false;
642642
}

0 commit comments

Comments
 (0)