We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5fb4c4 commit 1ce5effCopy full SHA for 1ce5eff
src/test/run-pass/rcvr-borrowed-to-region.rs
@@ -12,7 +12,9 @@ trait get {
12
fn get(self) -> int;
13
}
14
15
-// FIXME #7302: Note: impl on a slice
+// 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`.)
18
impl<'self> get for &'self int {
19
fn get(self) -> int {
20
return *self;
@@ -34,11 +36,6 @@ pub fn main() {
34
36
info!("y=%d", y);
35
37
assert_eq!(y, 6);
38
- let x = ~6;
- let y = x.get();
39
- info!("y=%d", y);
40
- assert_eq!(y, 6);
41
-
42
let x = &6;
43
let y = x.get();
44
0 commit comments