Skip to content

Commit c209f76

Browse files
committed
remove unused code
Signed-off-by: Weikang Guo <guoweikang@kylinos.cn>
1 parent 20e8a77 commit c209f76

2 files changed

Lines changed: 1 addition & 88 deletions

File tree

arch/khal/build.rs

Lines changed: 0 additions & 59 deletions
This file was deleted.

platforms/kplat-macros/src/lib.rs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,7 @@ use syn::{Error, FnArg, ItemFn, ItemTrait, ReturnType, TraitItem};
1111
fn err_ts(e: Error) -> TokenStream {
1212
e.to_compile_error().into()
1313
}
14-
fn check_fn(t: TokenStream, cnt: usize, exp_name: &str, msg: &str) -> TokenStream {
15-
let f = syn::parse_macro_input!(t as ItemFn);
16-
let mut bad = if let ReturnType::Type(_, ty) = &f.sig.output {
17-
quote! { #ty }.to_string() != "!"
18-
} else {
19-
true
20-
};
21-
let inputs = &f.sig.inputs;
22-
// for i in inputs.iter() {
23-
// if let FnArg::Typed(pt) = i {
24-
// if quote! { #pt.ty }.to_string() != "usize" {
25-
// bad = true;
26-
// break;
27-
// }
28-
// }
29-
// }
30-
if inputs.len() != cnt {
31-
bad = true;
32-
}
33-
if bad {
34-
err_ts(Error::new(Span::call_site(), msg))
35-
} else {
36-
quote! {
37-
#[unsafe(export_name = #exp_name)]
38-
#f
39-
}
40-
.into()
41-
}
42-
}
14+
4315
/// Generates dispatch wrappers for a platform device interface trait.
4416
#[proc_macro_attribute]
4517
pub fn device_interface(attr: TokenStream, item: TokenStream) -> TokenStream {

0 commit comments

Comments
 (0)