Skip to content

Commit

Permalink
Add a test for closed issue #9259
Browse files Browse the repository at this point in the history
This must have been fixed in some recent trans refactor/rewrite, hurray!

Closes #9259
  • Loading branch information
alexcrichton committed Jan 18, 2014
1 parent 9434e7c commit 4d5da45
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/run-pass/issue-9259.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// 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.

struct A<'a> {
a: &'a [~str],
b: Option<&'a [~str]>,
}

pub fn main() {
let b = &[~"foo"];
let a = A {
a: &[~"test"],
b: Some(b),
};
assert_eq!(a.b.get_ref()[0].as_slice(), "foo");
}

5 comments on commit 4d5da45

@bors
Copy link
Contributor

@bors bors commented on 4d5da45 Jan 18, 2014

Choose a reason for hiding this comment

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

saw approval from brson
at alexcrichton@4d5da45

@bors
Copy link
Contributor

@bors bors commented on 4d5da45 Jan 18, 2014

Choose a reason for hiding this comment

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

merging alexcrichton/rust/issue-9259 = 4d5da45 into auto

@bors
Copy link
Contributor

@bors bors commented on 4d5da45 Jan 18, 2014

Choose a reason for hiding this comment

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

alexcrichton/rust/issue-9259 = 4d5da45 merged ok, testing candidate = c5d05ac

@bors
Copy link
Contributor

@bors bors commented on 4d5da45 Jan 18, 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 4d5da45 Jan 18, 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 = c5d05ac

Please sign in to comment.