Content-Length: 24397 | pFad | https://doc.rust-lang.org/std/pin/../default/../rc/../../../std/../error_codes/./E0071.html

E0071 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0071

A structure-literal syntax was used to create an item that is not a structure or enum variant.

Example of erroneous code:

#![allow(unused)]
fn main() {
type U32 = u32;
let t = U32 { value: 4 }; // error: expected struct, variant or union type,
                          // found builtin type `u32`
}

To fix this, ensure that the name was correctly spelled, and that the correct form of initializer was used.

For example, the code above can be fixed to:

#![allow(unused)]
fn main() {
type U32 = u32;
let t: U32 = 4;
}

or:

#![allow(unused)]
fn main() {
struct U32 { value: u32 }
let t = U32 { value: 4 };
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/pin/../default/../rc/../../../std/../error_codes/./E0071.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy