Skip to content

Commit

Permalink
Correct merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 8, 2013
1 parent b5fc4ae commit 0c6d02f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/librustc/middle/trans/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@ pub fn store_arg(mut bcx: block,

fn mk_binding_alloca(mut bcx: block,
p_id: ast::node_id,
path: @ast::Path,
path: &ast::Path,
binding_mode: IrrefutablePatternBindingMode,
populate: &fn(block, ty::t, ValueRef) -> block) -> block {
let var_ty = node_id_type(bcx, p_id);
Expand Down Expand Up @@ -1899,7 +1899,7 @@ fn bind_irrefutable_pat(bcx: block,
let tcx = bcx.tcx();
let ccx = bcx.ccx();
match pat.node {
ast::pat_ident(pat_binding_mode, path, inner) => {
ast::pat_ident(pat_binding_mode, ref path, inner) => {
if pat_is_binding(tcx.def_map, pat) {
// Allocate the stack slot where the value of this
// binding will live and place it into the appropriate
Expand Down Expand Up @@ -2017,9 +2017,9 @@ fn bind_irrefutable_pat(bcx: block,
return bcx;
}

fn simple_identifier(pat: @ast::pat) -> Option<@ast::Path> {
fn simple_identifier<'a>(pat: &'a ast::pat) -> Option<&'a ast::Path> {
match pat.node {
ast::pat_ident(ast::bind_infer, path, None) => {
ast::pat_ident(ast::bind_infer, ref path, None) => {
Some(path)
}
_ => {
Expand Down
16 changes: 10 additions & 6 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1969,17 +1969,17 @@ pub fn trans_tuple_struct(ccx: @mut CrateContext,

trait IdAndTy {
fn id(&self) -> ast::node_id;
fn ty(&self) -> @ast::Ty;
fn ty<'a>(&'a self) -> &'a ast::Ty;
}

impl IdAndTy for ast::variant_arg {
fn id(&self) -> ast::node_id { self.id }
fn ty(&self) -> @ast::Ty { self.ty }
fn ty<'a>(&'a self) -> &'a ast::Ty { &self.ty }
}

impl IdAndTy for @ast::struct_field {
fn id(&self) -> ast::node_id { self.node.id }
fn ty(&self) -> @ast::Ty { self.node.ty }
fn ty<'a>(&'a self) -> &'a ast::Ty { &self.node.ty }
}

pub fn trans_enum_variant_or_tuple_like_struct<A:IdAndTy>(
Expand All @@ -1994,7 +1994,7 @@ pub fn trans_enum_variant_or_tuple_like_struct<A:IdAndTy>(
let fn_args = do args.map |varg| {
ast::arg {
is_mutbl: false,
ty: varg.ty(),
ty: copy *varg.ty(),
pat: ast_util::ident_to_pat(
ccx.tcx.sess.next_node_id(),
codemap::dummy_sp(),
Expand Down Expand Up @@ -2977,8 +2977,12 @@ pub fn trans_crate(sess: session::Session,
do sort::quick_sort(ccx.stats.fn_stats) |&(_, _, insns_a), &(_, _, insns_b)| {
insns_a > insns_b
}
for ccx.stats.fn_stats.iter().advance |&(name, ms, insns)| {
io::println(fmt!("%u insns, %u ms, %s", insns, ms, name));
for ccx.stats.fn_stats.iter().advance |tuple| {
match *tuple {
(ref name, ms, insns) => {
io::println(fmt!("%u insns, %u ms, %s", insns, ms, *name));
}
}
}
}
if ccx.sess.count_llvm_insns() {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/typeck/coherence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl CoherenceChecker {
match item.node {
item_impl(_, ref opt_trait, _, _) => {
let opt_trait : ~[trait_ref] = opt_trait.iter()
.transform(|&x| x)
.transform(|x| copy *x)
.collect();
self.check_implementation(item, opt_trait);
}
Expand Down Expand Up @@ -270,7 +270,7 @@ impl CoherenceChecker {
// We only want to generate one Impl structure. When we generate one,
// we store it here so that we don't recreate it.
let mut implementation_opt = None;
for associated_traits.iter().advance |&associated_trait| {
for associated_traits.iter().advance |associated_trait| {
let trait_ref =
ty::node_id_to_trait_ref(
self.crate_context.tcx,
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ impl<T> OwnedVector<T> for ~[T] {
let valptr = ptr::to_mut_unsafe_ptr(&mut self[ln - 1u]);
unsafe {
raw::set_len(self, ln - 1u);
ptr::read_ptr(valptr)
Some(ptr::read_ptr(valptr))
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/libsyntax/ext/deriving/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ impl<'self> MethodDef<'self> {
// create the generics that aren't for Self
let fn_generics = self.generics.to_generics(cx, span, type_ident, generics);

let args = do arg_types.map |&(id, ty)| {
cx.arg(span, id, ty)
let args = do arg_types.map |pair| {
cx.arg(span, pair.first(), pair.second())
};

let ret_type = self.get_ret_ty(cx, span, generics, type_ident);
Expand Down Expand Up @@ -896,8 +896,8 @@ pub fn create_subpatterns(cx: @ExtCtxt,
field_paths: ~[ast::Path],
mutbl: ast::mutability)
-> ~[@ast::pat] {
do field_paths.map |&path| {
cx.pat(span, ast::pat_ident(ast::bind_by_ref(mutbl), path, None))
do field_paths.map |path| {
cx.pat(span, ast::pat_ident(ast::bind_by_ref(mutbl), copy *path, None))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/pipes/pipec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl gen_send for message {
let arg_names = vec::from_fn(tys.len(), |i| "x_" + i.to_str());

let args_ast: ~[ast::arg] = arg_names.iter().zip(tys.iter())
.transform(|(&n, t)| cx.arg(span, cx.ident_of(n), copy *t)).collect();
.transform(|(n, t)| cx.arg(span, cx.ident_of(*n), copy *t)).collect();

let args_ast = vec::append(
~[cx.arg(span,
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3914,7 +3914,7 @@ impl Parser {
};
let full_path = full_path.normalize();

let maybe_i = do self.sess.included_mod_stack.iter().position |&p| { p == full_path };
let maybe_i = do self.sess.included_mod_stack.iter().position |p| { *p == full_path };
match maybe_i {
Some(i) => {
let stack = &self.sess.included_mod_stack;
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ pub fn print_bounded_path(s: @ps, path: &ast::Path,
print_path_(s, path, false, bounds)
}

pub fn print_pat(s: @ps, pat: @ast::pat) {
pub fn print_pat(s: @ps, pat: &ast::pat) {
maybe_print_comment(s, pat.span.lo);
let ann_node = node_pat(s, pat);
(s.ann.pre)(ann_node);
Expand Down

9 comments on commit 0c6d02f

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 8, 2013

Choose a reason for hiding this comment

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

saw approval from catamorphism
at nikomatsakis@0c6d02f

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 8, 2013

Choose a reason for hiding this comment

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

merging nikomatsakis/rust/ref-bindings-in-irrefut-patterns = 0c6d02f into auto

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 8, 2013

Choose a reason for hiding this comment

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

nikomatsakis/rust/ref-bindings-in-irrefut-patterns = 0c6d02f merged ok, testing candidate = 652be031

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 8, 2013

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 9, 2013

Choose a reason for hiding this comment

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

saw approval from catamorphism
at nikomatsakis@0c6d02f

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 9, 2013

Choose a reason for hiding this comment

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

merging nikomatsakis/rust/ref-bindings-in-irrefut-patterns = 0c6d02f into auto

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 9, 2013

Choose a reason for hiding this comment

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

nikomatsakis/rust/ref-bindings-in-irrefut-patterns = 0c6d02f merged ok, testing candidate = a48ca32

@bors
Copy link
Contributor

@bors bors commented on 0c6d02f Jul 9, 2013

Choose a reason for hiding this comment

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

fast-forwarding master to auto = a48ca32

Please sign in to comment.