...

Text file src/github.com/alecthomas/chroma/v2/lexers/testdata/rust/lifetimes_and_loop_labels.actual

Documentation: github.com/alecthomas/chroma/v2/lexers/testdata/rust

     1struct Bar<'b>(&'b str);
     2
     3struct Foo<'b, 'a: 'b>(&'a Bar<'b>);
     4
     5fn foo<'some_name>(_: Bar<'_>, _: impl Iterator<Item = Bar<'static>> + 'static) {
     6    'im_a_loop_label: loop {
     7        break 'im_a_loop_label;
     8    }
     9
    10    // None of these should have lifetimes
    11    let _ = 'a';
    12    let _ = b'a';
    13    let _ = "
    14        'not_a_lifetime_or_label
    15    ";
    16}

View as plain text