fixed error message thanks to #6
This commit is contained in:
@@ -490,7 +490,7 @@ you'll get a compilation error.</p>
|
|||||||
Test::init(test2.as_mut());
|
Test::init(test2.as_mut());
|
||||||
|
|
||||||
println!("a: {}, b: {}", Test::a(test1.as_ref()), Test::b(test1.as_ref()));
|
println!("a: {}, b: {}", Test::a(test1.as_ref()), Test::b(test1.as_ref()));
|
||||||
std::mem::swap(test1.as_mut(), test2.as_mut());
|
std::mem::swap(test1.get_mut(), test2.get_mut());
|
||||||
println!("a: {}, b: {}", Test::a(test2.as_ref()), Test::b(test2.as_ref()));
|
println!("a: {}, b: {}", Test::a(test2.as_ref()), Test::b(test2.as_ref()));
|
||||||
}
|
}
|
||||||
# use std::pin::Pin;
|
# use std::pin::Pin;
|
||||||
|
|||||||
@@ -1966,7 +1966,7 @@ you'll get a compilation error.</p>
|
|||||||
Test::init(test2.as_mut());
|
Test::init(test2.as_mut());
|
||||||
|
|
||||||
println!("a: {}, b: {}", Test::a(test1.as_ref()), Test::b(test1.as_ref()));
|
println!("a: {}, b: {}", Test::a(test1.as_ref()), Test::b(test1.as_ref()));
|
||||||
std::mem::swap(test1.as_mut(), test2.as_mut());
|
std::mem::swap(test1.get_mut(), test2.get_mut());
|
||||||
println!("a: {}, b: {}", Test::a(test2.as_ref()), Test::b(test2.as_ref()));
|
println!("a: {}, b: {}", Test::a(test2.as_ref()), Test::b(test2.as_ref()));
|
||||||
}
|
}
|
||||||
# use std::pin::Pin;
|
# use std::pin::Pin;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -388,7 +388,7 @@ pub fn main() {
|
|||||||
Test::init(test2.as_mut());
|
Test::init(test2.as_mut());
|
||||||
|
|
||||||
println!("a: {}, b: {}", Test::a(test1.as_ref()), Test::b(test1.as_ref()));
|
println!("a: {}, b: {}", Test::a(test1.as_ref()), Test::b(test1.as_ref()));
|
||||||
std::mem::swap(test1.as_mut(), test2.as_mut());
|
std::mem::swap(test1.get_mut(), test2.get_mut());
|
||||||
println!("a: {}, b: {}", Test::a(test2.as_ref()), Test::b(test2.as_ref()));
|
println!("a: {}, b: {}", Test::a(test2.as_ref()), Test::b(test2.as_ref()));
|
||||||
}
|
}
|
||||||
# use std::pin::Pin;
|
# use std::pin::Pin;
|
||||||
|
|||||||
Reference in New Issue
Block a user