For example:
+```
let x: i32 = "I am not a number!";
// ~~~ ~~~~~~~~~~~~~~~~~~~~
// | |
// | compiler infers type `&str`
// |
// type `i32` assigned to variable `x`
+```
"##,
E0309: r##"
must be as long as the data needs to be alive, and missing the constraint that
denotes this will cause this error.
+```
// This won't compile because T is not constrained, meaning the data
// stored in it is not guaranteed to last as long as the reference
struct Foo<'a, T> {
struct Foo<'a, T: 'a> {
foo: &'a T
}
+```
"##,
E0310: r##"
must be as long as the data needs to be alive, and missing the constraint that
denotes this will cause this error.
+```
// This won't compile because T is not constrained to the static lifetime
// the reference needs
struct Foo<T> {
struct Foo<T: 'static> {
foo: &'static T
}
+```
"##
}