struct Foo { x: &bool } // error
struct Foo<'a> { x: &'a bool } // correct
+struct Bar { x: Foo }
+ ^^^ expected lifetime parameter
+struct Bar<'a> { x: Foo<'a> } // correct
+
enum Bar { A(u8), B(&bool), } // error
enum Bar<'a> { A(u8), B(&'a bool), } // correct
See also https://doc.rust-lang.org/book/first-edition/no-stdlib.html
"##,
+E0214: r##"
+A generic type was described using parentheses rather than angle brackets. For
+example:
+
+```compile_fail,E0214
+fn main() {
+ let v: Vec(&str) = vec!["foo"];
+}
+```
+
+This is not currently supported: `v` should be defined as `Vec<&str>`.
+Parentheses are currently only used with generic types when defining parameters
+for `Fn`-family traits.
+"##,
+
E0261: r##"
When using a lifetime like `'a` in a type, it must be declared before being
used.
representation of enums isn't strictly defined in Rust, and this attribute
won't work on enums.
-`#[repr(simd)]` will give a struct consisting of a homogenous series of machine
+`#[repr(simd)]` will give a struct consisting of a homogeneous series of machine
types (i.e. `u8`, `i32`, etc) a representation that permits vectorization via
SIMD. This doesn't make much sense for enums since they don't consist of a
single list of data.
E0490, // a value of type `..` is borrowed for too long
E0495, // cannot infer an appropriate lifetime due to conflicting requirements
E0566, // conflicting representation hints
- E0587, // conflicting packed and align representation hints
+ E0623, // lifetime mismatch where both parameters are anonymous regions
}