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

Generate impl blocks for associated enum functions #991

Merged
merged 26 commits into from
Dec 7, 2020

Commits on Dec 5, 2020

  1. Fix clippy::search_is_some

    MarijnS95 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    bfb0a2d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a639364 View commit details
    Browse the repository at this point in the history
  3. env: Remove unnecessary if from main_sys_crate_name

    This function always returns the value from sys_crate_name.
    MarijnS95 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    e54e73f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    18d4a54 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    68e4c73 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0f554d7 View commit details
    Browse the repository at this point in the history
  7. Remove unnecessary main_sys_crate_name imports

    `crate::ffi`, which these calls resolve to are ignored in
    Imports::common_checks, no need to pass these explicitly.
    MarijnS95 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    354c580 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ef8c22b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9bc5f6e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    841582f View commit details
    Browse the repository at this point in the history
  11. imports: Add support for multiple, lazily added declared symbols

    This is used in enum function generation where all enum types
    asssociated with a given crate are defined in the same file.
    MarijnS95 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    6e89f56 View commit details
    Browse the repository at this point in the history
  12. enums: Move rejection and glib imports from codegen to analysis

    This not only cleans up unnecessary mutable variables in the codegen
    loop and a cloned Imports instance (so that it can remain immutable
    during codegen), it also adds the missing rejection logic to enum
    analysis.  No harm was caused because these checks happened at codegen
    prior, but they omit some unnecessary imports.
    MarijnS95 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    50cee9e View commit details
    Browse the repository at this point in the history
  13. codegen/enums: Add missing trait_impls::generate call

    This function is responsible for generating a Display impl, and caused
    unused std::fmt import previously.
    MarijnS95 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    70eab37 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3023445 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7123280 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2020

  1. Configuration menu
    Copy the full SHA
    c3e827f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37366a2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a43595 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e549975 View commit details
    Browse the repository at this point in the history
  5. codegen/flags: Add missing display trait generation

    Analysis was copied from enums which adds an std::fmt when
    generate_display_trait is true, but the codegen for it was missing.
    Instead of removing the import, provide a simple Display trait that
    forwards to bitflags' Debug implementation.
    MarijnS95 committed Dec 6, 2020
    Configuration menu
    Copy the full SHA
    518d277 View commit details
    Browse the repository at this point in the history
  6. codegen: Don't emit Rust Display impl when C function is available

    When get_name or to_string is available and adheres to the right
    conditions a Display impl leveraging this C implementation is generated.
    This will clash with a pure Rust impl if generate_display_trait is true
    which should be disabled to prefer the C function call instead.
    MarijnS95 committed Dec 6, 2020
    Configuration menu
    Copy the full SHA
    68760c0 View commit details
    Browse the repository at this point in the history
  7. special_functions: Add version condition to imports as well

    Complements: 5ce31f2 ("codegen: Add version condition on special function traits")
    MarijnS95 committed Dec 6, 2020
    Configuration menu
    Copy the full SHA
    a1cfe65 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bf7dd09 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    18c12a5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5b32e69 View commit details
    Browse the repository at this point in the history
  11. Cargo update

    MarijnS95 committed Dec 6, 2020
    Configuration menu
    Copy the full SHA
    2915bde View commit details
    Browse the repository at this point in the history