Fix some warnings
This commit is contained in:
parent
bfff2a50fd
commit
79ec8948d8
@ -21,14 +21,14 @@ pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) ->
|
||||
if any_dynamic_crate {
|
||||
false
|
||||
} else if let Some(kind) = tcx.allocator_kind() {
|
||||
codegen_inner(tcx.sess, module, kind);
|
||||
codegen_inner(module, kind);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn codegen_inner(sess: &Session, module: &mut Module<impl Backend + 'static>, kind: AllocatorKind) {
|
||||
pub fn codegen_inner(module: &mut Module<impl Backend + 'static>, kind: AllocatorKind) {
|
||||
let usize_ty = module.target_config().pointer_type();
|
||||
|
||||
for method in ALLOCATOR_METHODS {
|
||||
|
@ -74,7 +74,7 @@ pub struct CommentWriter {
|
||||
|
||||
impl CommentWriter {
|
||||
pub fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
|
||||
let mut global_comments = if cfg!(debug_assertions) {
|
||||
let global_comments = if cfg!(debug_assertions) {
|
||||
vec![
|
||||
format!("symbol {}", tcx.symbol_name(instance).name.as_str()),
|
||||
format!("instance {:?}", instance),
|
||||
|
Loading…
Reference in New Issue
Block a user