Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more questions #1

Closed
Manishearth opened this issue Nov 28, 2018 · 2 comments
Closed

Some more questions #1

Manishearth opened this issue Nov 28, 2018 · 2 comments

Comments

@Manishearth
Copy link
Contributor

I occasionally tweet rust quiz questions like these, see https://twitter.com/search?q=from%3Amanishearth%20quiz

Feel free to steal them 馃槃 (I may make a PR at some point)

@dtolnay
Copy link
Owner

dtolnay commented Nov 28, 2018

Thanks! https://twitter.com/ManishEarth/status/823342219369201664 would be great.

@dtolnay
Copy link
Owner

dtolnay commented Nov 29, 2018

Here is a wild one for you that I can't make into a quiz question but fits your style better:

fn main() {
    let x: String;
    let m!() = x;
}
  • always compile error?
  • sometimes compile error?

If you have:

macro_rules! m {
    () => { _ };
}

then this compiles (for some reason).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants