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

Add warning for use of lifetime parameter with 'static bound #40734

Merged
merged 2 commits into from
Mar 26, 2017

Commits on Mar 22, 2017

  1. Refactor checking if a Lifetime is static

    Simply move the test for `keywords::StaticLifetime` into the
    `Lifetime` impl, to match how elision is checked.
    adamransom committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    1ae1a19 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2017

  1. Warn when using a 'static lifetime bound

    Previously a `'static` lifetime bound would result in an `undeclared
    lifetime` error when compiling, even though it could be considered
    valid.
    
    However, it is unnecessary to use it as a lifetime bound so we present
    the user with a warning instead and suggest using the `'static` lifetime
    directly, in place of the lifetime parameter.
    adamransom committed Mar 25, 2017
    Configuration menu
    Copy the full SHA
    e7949d0 View commit details
    Browse the repository at this point in the history