pub fn kernel_path(
out_dir: &str,
pkg: &str,
module_path: &str,
fn_name: &str,
) -> StringExpand description
Builds the on-disk .bin path for a kernel, from the perspective of the #[device] macro expansion.
module_path!() includes the crate name (my_crate::sub::mod), but the plugin’s artifact names use
tcx.def_path_str which strips it (sub::mod); this helper drops the leading crate segment and mangles
:: → __ so the stem agrees with rustc_plugin::build_one.