qemu/rust/qemu-api/src
Paolo Bonzini 476d6e4c9c rust: restrict missing_const_for_fn to qemu_api crate
missing_const_for_fn is not necessarily useful or good.  For example in
a private API you can always add const later, and in a public API
it can be unnecessarily restrictive to annotate everything with const
(blocking further improvements to the API).

Nevertheless, QEMU turns it on because qemu_api uses const quite
aggressively and therefore it can be handy to have as much as possible
annotated with const.  Outside qemu_api though, not so much: devices
are self contained consumers and if there is nothing that could use
their functions in const contexts that were not anticipated.

Since missing_const_for_fn can be a bit noisy and trigger on trivial
functions that no one would ever call in const context, do not
turn it on everywhere and only keep it in qemu_api as a special case.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-02-10 11:18:32 +01:00
..
assertions.rs rust: add a utility module for compile-time type checks 2025-01-10 23:34:43 +01:00
bindings.rs rust: build: establish a baseline of lints across all crates 2024-12-10 18:44:06 +01:00
bitops.rs rust: add a bit operation module 2024-12-10 18:49:26 +01:00
c_str.rs rust: introduce a c_str macro 2024-11-05 14:18:16 +01:00
callbacks.rs rust: qemu-api: add a module to wrap functions and zero-sized closures 2024-12-19 19:36:37 +01:00
cell.rs bql: add a "mock" BQL for Rust unit tests 2024-12-19 19:36:37 +01:00
irq.rs rust: qdev: expose inherited methods to subclasses of SysBusDevice 2025-01-10 23:34:44 +01:00
lib.rs rust: restrict missing_const_for_fn to qemu_api crate 2025-02-10 11:18:32 +01:00
module.rs rust: rename qemu-api modules to follow C code a bit more 2024-12-19 19:36:37 +01:00
offset_of.rs rust: introduce alternative implementation of offset_of! 2024-11-05 14:18:16 +01:00
prelude.rs rust: vmstate: add new type safe implementation 2025-01-23 11:50:53 +01:00
qdev.rs rust: qdev: make reset take a shared reference 2025-01-28 17:58:09 +01:00
qom.rs rust: prefer NonNull::new to assertions 2025-01-23 18:47:46 +01:00
sysbus.rs rust: qdev: expose inherited methods to subclasses of SysBusDevice 2025-01-10 23:34:44 +01:00
vmstate.rs rust: vmstate: make order of parameters consistent in vmstate_clock 2025-01-23 11:50:53 +01:00
zeroable.rs rust/zeroable: Implement Zeroable with const_zero macro 2025-01-28 17:58:09 +01:00