Rollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebank
Fix invalid bounds string generation in rustdoc Fixes #58737. Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain). Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct... r? @QuietMisdreavus
This commit is contained in:
commit
e5435d97ea
6 changed files with 27 additions and 11 deletions
13
src/test/rustdoc/useless_lifetime_bound.rs
Normal file
13
src/test/rustdoc/useless_lifetime_bound.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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 ()>,
|
||||
}
|
||||
|
||||
// @has useless_lifetime_bound/struct.Scope.html
|
||||
// @!has - '//*[@class="rust struct"]' "T: 'a + 'a"
|
||||
pub struct SomeStruct<'a, T: 'a> {
|
||||
_marker: PhantomData<&'a T>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue