]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/self/elision/ref-struct.rs
1 #![allow(non_snake_case)]
8 // Test using `&Struct` explicitly:
10 fn ref_Struct(self: &Struct
, f
: &u32) -> &u32 {
11 f
//~ ERROR lifetime mismatch
14 fn box_ref_Struct(self: Box
<&Struct
>, f
: &u32) -> &u32 {
15 f
//~ ERROR lifetime mismatch
18 fn pin_ref_Struct(self: Pin
<&Struct
>, f
: &u32) -> &u32 {
19 f
//~ ERROR lifetime mismatch
22 fn box_box_ref_Struct(self: Box
<Box
<&Struct
>>, f
: &u32) -> &u32 {
23 f
//~ ERROR lifetime mismatch
26 fn box_pin_Struct(self: Box
<Pin
<&Struct
>>, f
: &u32) -> &u32 {
27 f
//~ ERROR lifetime mismatch