Fix some warnings
This commit is contained in:
parent
bfff2a50fd
commit
79ec8948d8
2 changed files with 3 additions and 3 deletions
|
@ -21,14 +21,14 @@ pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) ->
|
||||||
if any_dynamic_crate {
|
if any_dynamic_crate {
|
||||||
false
|
false
|
||||||
} else if let Some(kind) = tcx.allocator_kind() {
|
} else if let Some(kind) = tcx.allocator_kind() {
|
||||||
codegen_inner(tcx.sess, module, kind);
|
codegen_inner(module, kind);
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
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();
|
let usize_ty = module.target_config().pointer_type();
|
||||||
|
|
||||||
for method in ALLOCATOR_METHODS {
|
for method in ALLOCATOR_METHODS {
|
||||||
|
|
|
@ -74,7 +74,7 @@ pub struct CommentWriter {
|
||||||
|
|
||||||
impl CommentWriter {
|
impl CommentWriter {
|
||||||
pub fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
|
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![
|
vec![
|
||||||
format!("symbol {}", tcx.symbol_name(instance).name.as_str()),
|
format!("symbol {}", tcx.symbol_name(instance).name.as_str()),
|
||||||
format!("instance {:?}", instance),
|
format!("instance {:?}", instance),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue