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: chains.rs
    path of file: ./repos/rustfmt/tests/target
    
    the code of the file until where you have to start completion: // rustfmt-use_small_heuristics: Off
// Test chain formatting.

fn main() {
    let a = b.c.d.1.foo(|x| x + 1);

    bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc.ddddddddddddddddddddddddddd();

    bbbbbbbbbbbbbbbbbbb
        .ccccccccccccccccccccccccccccccccccccc
        .ddddddddddddddddddddddddddd
        .eeeeeeee();

    let f = fooooooooooooooooooooooooooooooooooooooooooooooooooo
        .baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar;

    // Test case where first chain element isn't a path, but is shorter than
    // the size of a tab.
    x().y(|| match cond() {
        true => (),
        false => (),
    });

    loong_func().quux(move || {
        if true {
            1
        } else {
            2
        }
    });

    some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
        let x = c;
        x
    });

    some_fuuuuuuuuunction()
        .method_call_a(aaaaa, bbbbb, |c| {
            let x = c;
            x
        })
        .method_cal
    
fn floaters() {
    let z = Foo {
        field1: val1,
        field2: val2,
    };

    let x = Foo {
        field1: val1,
        field2: val2,
    }
    .method_call()
    .method_call();

    let y = if cond {
        val1
    } else {
        val2
    }
    .method_call();

    {
        match x {
            PushParam => {
                // params are 1-indexed
                stack.push(
                    mparams[match cur.to_digit(10) {
                        Some(d) => d as usize - 1,
                        None => return Err("bad param number".to_owned()),
                    }]
                    .clone(),
                );
            }
        }
    }

    if cond {
        some();
    } else {
        none();
    }
    .bar()
    .baz();

    Foo {
        x: val,
    }
    .baz(|| {
        force();
        multiline();
    })
    .quux();

    Foo {
        y: i_am_multi_line,
        z: ok,
    }
    .baz(|| {
        force();
        multiline();
    })
    .quux();

    a + match x {
        true => "yay!",
        false => "boo!",
    }
    .bar()
}