Skip to content

Commit

Permalink
rustc: Change At to Managed and Uniq to Owned
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Apr 29, 2013
1 parent edc11a9 commit d8024e2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/librustc/middle/typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,10 @@ pub fn check_pat(pcx: &pat_ctxt, pat: @ast::pat, expected: ty::t) {
}
}
ast::pat_box(inner) => {
check_pointer_pat(pcx, At, inner, pat.id, pat.span, expected);
check_pointer_pat(pcx, Managed, inner, pat.id, pat.span, expected);
}
ast::pat_uniq(inner) => {
check_pointer_pat(pcx, Uniq, inner, pat.id, pat.span, expected);
check_pointer_pat(pcx, Owned, inner, pat.id, pat.span, expected);
}
ast::pat_region(inner) => {
check_pointer_pat(pcx, Borrowed, inner, pat.id, pat.span, expected);
Expand Down Expand Up @@ -609,10 +609,10 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
fcx.write_ty(pat_id, expected);
};
match structure_of(fcx, span, expected) {
ty::ty_box(e_inner) if pointer_kind == At => {
ty::ty_box(e_inner) if pointer_kind == Managed => {
check_inner(e_inner);
}
ty::ty_uniq(e_inner) if pointer_kind == Uniq => {
ty::ty_uniq(e_inner) if pointer_kind == Owned => {
check_inner(e_inner);
}
ty::ty_rptr(_, e_inner) if pointer_kind == Borrowed => {
Expand All @@ -626,8 +626,8 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
fmt!("mismatched types: expected `%s` but found %s",
resolved_expected, actual)},
fmt!("an %s pattern", match pointer_kind {
At => "@-box",
Uniq => "~-box",
Managed => "@-box",
Owned => "~-box",
Borrowed => "&-pointer"
}),
None);
Expand All @@ -637,5 +637,5 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
}

#[deriving(Eq)]
enum PointerKind { At, Uniq, Borrowed }
enum PointerKind { Managed, Owned, Borrowed }

1 comment on commit d8024e2

@catamorphism
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ (r=nikomatsakis)

Please sign in to comment.