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

Invert control in struct_lint_level. #68725

Merged
merged 11 commits into from
Feb 11, 2020

Commits on Feb 11, 2020

  1. Invert control in struct_lint_level.

    Caller now passes in a `decorate` function, which is only run if the
    lint is allowed.
    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    7c58ffe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0df1ca3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0634a50 View commit details
    Browse the repository at this point in the history
  4. Run RustFmt

    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    d246385 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b2e78fa View commit details
    Browse the repository at this point in the history
  6. Make cx.span_lint methods lazy

    - Make report_unsafe take decorate function
    - Remove span_lint, replacing calls with struct_span_lint, as caller is
    now responsible for emitting.
    - Remove lookup_and_emit, replacing with just lookup which takes a
    decorate function.
    - Remove span_lint_note, span_lint_help.  These methods aren't easily
    made lazy as standalone methods, private, and unused. If this
    functionality is needed, to be lazy, they can easily be made into
    Fn(&mut DiagnosticBuilder) that are meant to be called _within_ the
    decorate function.
    - Rename lookup_and_emit_with_diagnostics to lookup_with_diagnostics to
    better reflect the fact that it doesn't emit for you.
    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    2f0430a View commit details
    Browse the repository at this point in the history
  7. Run RustFmt

    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    aa3c458 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0b2436f View commit details
    Browse the repository at this point in the history
  9. Address review nitpicks.

    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    284982d View commit details
    Browse the repository at this point in the history
  10. Avoid allocs in a few places.

    - AnonymousParameters::check_trait_item
    - TypeAliasBounds::check_item
    - NonSnakeCase::check_snake_case
    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    e450996 View commit details
    Browse the repository at this point in the history
  11. Fix stage2 test failures from call to span_lint.

    span_lint was removed. Callers should use the `lint` method now, and
    call `set_span` within the closure passed to this method.
    jumbatm committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    b959da2 View commit details
    Browse the repository at this point in the history