Skip to content

Fix build - main_config_name impl is unsafe

Chris Manning requested to merge chrismanning/kconfig-rs:master into master

Building kconfig-rs currently fails on rustc 1.67.0-nightly (215e3cd21 2022-11-03) with the following error:

error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
  --> kconfig-rs/kconfig/src/kconfig.rs:92:9
   |
92 | /         cpp!([] -> QString as "QString" {
93 | |             #if KCONFIG_VERSION >= QT_VERSION_CHECK(5, 93, 0)
94 | |             return KConfig::mainConfigName();
95 | |             #endif
96 | |         })
   | |__________^ call to unsafe function
   |

This MR marks the cpp function as unsafe to fix the build

Merge request reports