You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: type_allocation_places.rs
    path of file: ./repos/ritual/ritual/src
    
    the code of the file until where you have to start completion: #![allow(dead_code)]

use crate::config::MovableTypesHookOutput;
use crate::cpp_data::{CppItem, CppPath};
use crate::cpp_type::{CppPointerLikeTypeKind, CppType};
use crate::processor::ProcessorData;
use log::{info, trace};
use ritual_common::errors::Result;
use std::collections::HashMap;

#[derive(Default, Debug)]
struct TypeStats {
    virtual_functions: Vec<String>,
    pointer_encounters: Vec<String>,
    non_pointer_encounters: Vec<String>,
}

fn log_results(data_map: &HashMap<CppPath, TypeStats>) {
    for (name, stats) in data_map {
        trace!("type = {}; stats = {:?}", name.to_cpp_pseudo_code(), stats);
    }

    for (path, stats) in data_map {
        let suggestion = if stats.virtual_functions.is_empty() {
            if stats.pointer_encounters.is_empty() {
          
    
pub fn suggest_allocation_places(data: &mut ProcessorData<'_>) -> Result<()> {
    let mut data_map = HashMap::new();

    for item in data.db.cpp_items() {
        if item.source_id.is_some() {
            continue;
        }
        if let CppItem::Type(type1) = &item.item {
            if !type1.kind.is_class() {
                continue;
            }
            if let Some(hook) = data.config.movable_types_hook() {
                if hook(&type1.path)? != MovableTypesHookOutput::Unknown {
                    continue;
                }
            }
            let good_path = type1.path.deinstantiate();
            data_map.insert(good_path, Default::default());
        }
    }

    for item in data.db.cpp_items() {
        if item.source_id.is_some() {
            continue;
        }
        if let CppItem::Function(function) = &item.item {
            if function.is_private() {
                continue;
            }
            let item_text = function.short_text();
            for t in &function.arguments {
                check_type(&t.argument_type, false, &mut data_map, &item_text);
            }
            check_type(&function.return_type, false, &mut data_map, &item_text);
            if function.is_virtual() {
                let type1 = function.class_path()?;
                let good_path = type1.deinstantiate();
                if let Some(stats) = data_map.get_mut(&good_path) {
                    if stats.virtual_functions.len() < MAX_ITEMS {
                        stats.virtual_functions.push(item_text);
                    }
                }
            }
        }
    }

    log_results(&data_map);

    Ok(())
}