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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement the ? operator #31954

Merged
merged 2 commits into from Mar 8, 2016
Merged

implement the ? operator #31954

merged 2 commits into from Mar 8, 2016

Commits on Mar 7, 2016

  1. implement the ? operator

    The `?` postfix operator is sugar equivalent to the try! macro, but is more amenable to chaining:
    `File::open("foo")?.metadata()?.is_dir()`.
    
    `?` is accepted on any *expression* that can return a `Result`, e.g. `x()?`, `y!()?`, `{z}?`,
    `(w)?`, etc. And binds more tightly than unary operators, e.g. `!x?` is parsed as `!(x?)`.
    
    cc rust-lang#31436
    Jorge Aparicio committed Mar 7, 2016
    Copy the full SHA
    210dd61 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2016

  1. update error messages in parse-fail tests

    Jorge Aparicio committed Mar 8, 2016
    Copy the full SHA
    2de4932 View commit details
    Browse the repository at this point in the history