提交 1ce5effa 编写于 作者: H Huon Wilson

testsuite: add explanation to a Note, and remove duplicated code.

Fixes #7302.
上级 e5fb4c43
......@@ -12,7 +12,9 @@ trait get {
fn get(self) -> int;
}
// FIXME #7302: Note: impl on a slice
// Note: impl on a slice; we're checking that the pointers below
// correctly get borrowed to `&`. (similar to impling for `int`, with
// `&self` instead of `self`.)
impl<'self> get for &'self int {
fn get(self) -> int {
return *self;
......@@ -34,11 +36,6 @@ pub fn main() {
info!("y=%d", y);
assert_eq!(y, 6);
let x = ~6;
let y = x.get();
info!("y=%d", y);
assert_eq!(y, 6);
let x = &6;
let y = x.get();
info!("y=%d", y);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册