Skip to content

Commit 1ce5eff

Browse files
committed
testsuite: add explanation to a Note, and remove duplicated code.
Fixes #7302.
1 parent e5fb4c4 commit 1ce5eff

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/test/run-pass/rcvr-borrowed-to-region.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ trait get {
1212
fn get(self) -> int;
1313
}
1414

15-
// FIXME #7302: Note: impl on a slice
15+
// Note: impl on a slice; we're checking that the pointers below
16+
// correctly get borrowed to `&`. (similar to impling for `int`, with
17+
// `&self` instead of `self`.)
1618
impl<'self> get for &'self int {
1719
fn get(self) -> int {
1820
return *self;
@@ -34,11 +36,6 @@ pub fn main() {
3436
info!("y=%d", y);
3537
assert_eq!(y, 6);
3638

37-
let x = ~6;
38-
let y = x.get();
39-
info!("y=%d", y);
40-
assert_eq!(y, 6);
41-
4239
let x = &6;
4340
let y = x.get();
4441
info!("y=%d", y);

0 commit comments

Comments
 (0)