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: linking.rs
    path of file: ./repos/ZLUDA/zluda/tests
    
    the code of the file until where you have to start completion: use common::CudaDriverFns;
use cuda_types::*;
use paste::paste;
use rustc_hash::FxHashSet;
use std::fmt::Debug;
use std::hash::Hash;
use std::{mem, os::raw::c_void, ptr};

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
enum Directive {
    Kernel,
    Method,
    Global,
    Shared,
    Const,
}

impl Directive {
    fn to_str(self, defined: bool) -> &'static str {
        match (self, defined) {
            (Directive::Kerne
    
unsafe fn multiple_static_globals_are_allowed<T: CudaDriverFns>(cuda: T) {
    let common1 = "
        .version 6.5
        .target sm_60
        .address_size 64
        .global .u64 foobar[1] = {1};\0"
        .to_string();
    let common2 = "
        .version 6.5
        .target sm_60
        .address_size 64
        .global .u32 foobar[1] = {2};\0"
        .to_string();
    assert_eq!(cuda.cuInit(0), CUresult::CUDA_SUCCESS);
    let mut ctx = ptr::null_mut();
    assert_eq!(
        cuda.cuCtxCreate_v2(&mut ctx, 0, CUdevice_v1(0)),
        CUresult::CUDA_SUCCESS
    );
    let (binary, _) = link_and_compile(&cuda, &[common1, common2]).unwrap();
    let mut module = mem::zeroed();
    assert_eq!(
        cuda.cuModuleLoadData(&mut module, binary.cast()),
        CUresult::CUDA_SUCCESS
    );
    let mut ptr = mem::zeroed();
    let mut size = mem::zeroed();
    assert_eq!(
        cuda.cuModuleGetGlobal_v2(&mut ptr, &mut size, module, "foobar\0".as_ptr().cast()),
        CUresult::CUDA_SUCCESS
    );
    assert_eq!(size, 8);
    let mut result = 0u64;
    assert_eq!(
        cuda.cuMemcpyDtoH_v2(&mut result as *mut _ as *mut _, ptr, size),
        CUresult::CUDA_SUCCESS
    );
    assert_eq!(result, 1);
}