4 ms·
The doubled ' is just a bug in the documentation generator (fixed by https://github.com/mozilla/rust/pull/14900 https://github.com/mozilla/rust/pull/14900, whic
by dbaupp 12y ago
The doubled ' is just a bug in the documentation generator (fixed by https://github.com/mozilla/rust/pull/14900 https://github.com/mozilla/rust/pull/14900, which is unfortunately (and strangely) failing tests at the moment).
Its true form is
pub struct Request<'a> {
pub origin: &'a Request,
pub params: HashMap<String, String>
}
where the 'a is representing the lifetime of the origin reference (that is, it is asserting that a Request struct is only usable for as long as the reference in the `origin` field is valid). Lifetimes/references are one of the core features of Rust guaranteeing both memory safety and performance.
See also: http://doc.rust-lang.org/master/guide-lifetimes.html http://doc.rust-lang.org/master/guide-lifetimes.html
- dbaupp 12y ago(Sorry, I misspoke, #14900 is fixing a different rustdoc issue: the fix for '' is https://github.com/mozilla/rust/pull/14906 https://github.com/mozilla/rust/pull/14906 .)