Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FIXME: Make me compile! Diff budget: 1 line.
- struct StrWrapper<'a>(&'a str);
- impl<'a> StrWrapper<'a> {
- fn inner(&self) -> &str {
- self.0
- }
- }
- // Do not modify this function.
- pub fn main() {
- let string = "Hello!";
- let wrapper = StrWrapper(&string);
- let _: &'static str = wrapper.inner();
- }
Advertisement
Add Comment
Please, Sign In to add comment