Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. fn main() {
  2. println!("Hello, world!");
  3. let lifetimeBeacon = "I am in the main scope";
  4. let config = newConfig(lifetimeBeacon);
  5. }
  6.  
  7. pub struct Config<'a> {
  8. host: &'a str
  9. }
  10.  
  11. fn newConfig<'a>(lifetimeBeacon: &str) -> Config<'a> {
  12. Config {host: "default"}
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement