Last active
January 14, 2018 14:37
-
-
Save Kerollmops/dd2499b9b83ce8df35fdc96d39b2b786 to your computer and use it in GitHub Desktop.
test on impl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARNING: This output format is intended for human consumers only | |
// and is subject to change without notice. Knock yourself out. | |
fn <impl at src/lib.rs:5:1: 9:2>::from(_1: i16) -> Koko { | |
let mut _0: Koko; // return place | |
let mut _2: i16; | |
bb0: { | |
StorageLive(_2); // bb0[0]: scope 0 at src/lib.rs:7:23: 7:28 | |
_2 = _1; // bb0[1]: scope 0 at src/lib.rs:7:23: 7:28 | |
_0 = Koko { field: move _2 }; // bb0[2]: scope 0 at src/lib.rs:7:9: 7:30 | |
StorageDead(_2); // bb0[3]: scope 0 at src/lib.rs:7:30: 7:30 | |
return; // bb0[4]: scope 0 at src/lib.rs:8:6: 8:6 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct Koko { | |
field: i16 | |
} | |
impl From<i16> for Koko { | |
fn from(value: i16) -> Self { | |
Koko { field: value } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment