Skip to content

Commit

Permalink
Add regression test for #18652
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoropoff committed Nov 7, 2014
1 parent c3c7223 commit 2c956d0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/run-pass/issue-18652.rs
@@ -0,0 +1,21 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// Tests multiple free variables being passed by value into an unboxed
// once closure as an optimization by trans. This used to hit an
// incorrect assert.

#![feature(unboxed_closures, overloaded_calls)]

fn main() {
let x = 2u8;
let y = 3u8;
assert_eq!((move |:| x + y)(), 5);
}

9 comments on commit 2c956d0

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

saw approval from eddyb
at bkoropoff@2c956d0

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

merging bkoropoff/rust/issue-18652 = 2c956d0 into auto

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

bkoropoff/rust/issue-18652 = 2c956d0 merged ok, testing candidate = 58a9690f

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

saw approval from eddyb
at bkoropoff@2c956d0

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

merging bkoropoff/rust/issue-18652 = 2c956d0 into auto

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 8, 2014

Choose a reason for hiding this comment

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

bkoropoff/rust/issue-18652 = 2c956d0 merged ok, testing candidate = 93c85eb

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 9, 2014

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on 2c956d0 Nov 9, 2014

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 = 93c85eb

Please sign in to comment.