🎨 Add blank lines into an example with missing variable shadowing

This commit is contained in:
Dima Pristupa 2021-10-25 19:10:03 +03:00 committed by Taiki Endo
parent 0faae314c1
commit a38c701b9e
1 changed files with 2 additions and 0 deletions

View File

@ -496,8 +496,10 @@ The type system prevents us from moving the data.
> let mut test1 = Test::new("test1");
> let mut test1_pin = unsafe { Pin::new_unchecked(&mut test1) };
> Test::init(test1_pin.as_mut());
>
> drop(test1_pin);
> println!(r#"test1.b points to "test1": {:?}..."#, test1.b);
>
> let mut test2 = Test::new("test2");
> mem::swap(&mut test1, &mut test2);
> println!("... and now it points nowhere: {:?}", test1.b);