[build]
target-dir = "target"
rustdocflags = [
    "-Arustdoc::private_intra_doc_links",
    "-Drustdoc::broken_intra_doc_links",
]

[target.'cfg(all())']
rustflags = [
    # https://doc.rust-lang.org/rustc/lints/index.html
    "-Dtrivial_casts",
    "-Dtrivial_numeric_casts",
    "-Dunsafe_code",
    "-Wfuture_incompatible",
    "-Wrust_2018_compatibility",
    "-Wrust_2018_idioms",
    "-Wrust_2021_compatibility",
    "-Wunused_import_braces",
    "-Wunused_qualifications",

    # https://rust-lang.github.io/rust-clippy/master/index.html
    "-Aclippy::doc_markdown",
    "-Dclippy::dbg_macro",
    "-Dclippy::todo",
    "-Dclippy::unimplemented",
    "-Wclippy::checked_conversions",
    "-Wclippy::debug_assert_with_mut_call",
    "-Wclippy::enum_glob_use",

    "-Wclippy::exit",
    "-Wclippy::expl_impl_clone_on_copy",
    "-Wclippy::explicit_deref_methods",
    "-Wclippy::explicit_into_iter_loop",
    "-Wclippy::fallible_impl_from",
    "-Wclippy::filter_map_next",
    "-Wclippy::flat_map_option",
    "-Wclippy::float_cmp_const",
    "-Wclippy::fn_params_excessive_bools",
    "-Wclippy::from_iter_instead_of_collect",
    "-Wclippy::implicit_clone",
    "-Wclippy::imprecise_flops",
    "-Wclippy::indexing_slicing",
    "-Wclippy::inefficient_to_string",
    "-Wclippy::invalid_upcast_comparisons",
    "-Wclippy::large_digit_groups",
    "-Wclippy::large_stack_arrays",
    "-Wclippy::large_types_passed_by_value",
    "-Wclippy::linkedlist",
    "-Wclippy::lossy_float_literal",
    "-Wclippy::macro_use_imports",
    "-Wclippy::manual_ok_or",
    "-Wclippy::map_err_ignore",
    "-Wclippy::match_same_arms",
    "-Wclippy::match_wild_err_arm",
    "-Wclippy::match_wildcard_for_single_variants",
    "-Wclippy::mem_forget",
    "-Wclippy::missing_enforced_import_renames",
    "-Wclippy::mut_mut",
    "-Wclippy::mutex_integer",
    "-Wclippy::needless_continue",
    "-Wclippy::needless_for_each",
    "-Wclippy::option_option",
    "-Wclippy::path_buf_push_overwrite",
    "-Wclippy::ptr_as_ptr",
    "-Wclippy::rc_mutex",
    "-Wclippy::ref_option_ref",
    "-Wclippy::rest_pat_in_fully_bound_structs",
    "-Wclippy::same_functions_in_if_condition",
    "-Wclippy::semicolon_if_nothing_returned",
    "-Wclippy::single_match_else",
    "-Wclippy::string_add",
    "-Wclippy::string_add_assign",
    "-Wclippy::trait_duplication_in_bounds",
    "-Wclippy::unnested_or_patterns",
    "-Wclippy::unused_self",
    "-Wclippy::useless_transmute",
    "-Wclippy::verbose_file_reads",
    "-Wclippy::zero_sized_map_values",

]
