mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
meson: Add a rust_2024_lint_args helper
Copied from rusticl. This makes it easier for other Rust components to ask for all the 2024 warnings. Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
This commit is contained in:
parent
291ccffd3d
commit
5db8727ed1
2 changed files with 19 additions and 16 deletions
18
meson.build
18
meson.build
|
|
@ -802,6 +802,24 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or
|
|||
if rustc.version().version_compare('>= 1.88')
|
||||
bindgen_output_args += ['--raw-line', '#![allow(unnecessary_transmutes)]']
|
||||
endif
|
||||
|
||||
rust_2024_lint_args = [
|
||||
'-Dboxed_slice_into_iter',
|
||||
'-Ddeprecated_safe_2024',
|
||||
'-Dimpl_trait_overcaptures',
|
||||
'-Dkeyword_idents_2024',
|
||||
'-Dmissing_unsafe_on_extern',
|
||||
'-Dnever_type_fallback_flowing_into_unsafe',
|
||||
'-Drust_2024_prelude_collisions',
|
||||
'-Dstatic_mut_refs',
|
||||
'-Dunsafe_attr_outside_unsafe',
|
||||
'-Dunsafe_op_in_unsafe_fn',
|
||||
|
||||
# 1.83+
|
||||
# '-Dif_let_rescope',
|
||||
# '-Drust_2024_guarded_string_incompatible_syntax',
|
||||
# '-Drust_2024_incompatible_pat',
|
||||
]
|
||||
endif
|
||||
|
||||
if get_option('precomp-compiler') != 'system'
|
||||
|
|
|
|||
|
|
@ -62,22 +62,7 @@ rusticl_files = files(
|
|||
)
|
||||
|
||||
rusticl_args = [
|
||||
# rust 2024 edition lints
|
||||
'-Dboxed_slice_into_iter',
|
||||
'-Ddeprecated_safe_2024',
|
||||
'-Dimpl_trait_overcaptures',
|
||||
'-Dkeyword_idents_2024',
|
||||
'-Dmissing_unsafe_on_extern',
|
||||
'-Dnever_type_fallback_flowing_into_unsafe',
|
||||
'-Drust_2024_prelude_collisions',
|
||||
'-Dstatic_mut_refs',
|
||||
'-Dunsafe_attr_outside_unsafe',
|
||||
'-Dunsafe_op_in_unsafe_fn',
|
||||
|
||||
# 1.83+:
|
||||
# '-Dif_let_rescope',
|
||||
# '-Drust_2024_guarded_string_incompatible_syntax',
|
||||
# '-Drust_2024_incompatible_pat',
|
||||
rust_2024_lint_args,
|
||||
|
||||
# Should be ran manually before moving to the 2024 edition
|
||||
# '-Dtail_expr_drop_order',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue