rust/tests/rustdoc/useless_lifetime_bound.rs

14 lines
377 B
Rust
Raw Normal View History

use std::marker::PhantomData;
// @has useless_lifetime_bound/struct.Scope.html
// @!has - '//*[@class="rust struct"]' "'env: 'env"
pub struct Scope<'env> {
_marker: PhantomData<&'env mut &'env ()>,
2019-04-03 15:13:12 -05:00
}
2019-04-03 15:18:41 -05:00
// @has useless_lifetime_bound/struct.Scope.html
// @!has - '//*[@class="rust struct"]' "T: 'a + 'a"
pub struct SomeStruct<'a, T: 'a> {
_marker: PhantomData<&'a T>,
}