Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("Hello, world!");
- let lifetimeBeacon = "I am in the main scope";
- let config = newConfig(lifetimeBeacon);
- }
- pub struct Config<'a> {
- host: &'a str
- }
- fn newConfig<'a>(lifetimeBeacon: &str) -> Config<'a> {
- Config {host: "default"}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement