diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-04-06 00:14:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-06 00:14:40 +0200 |
| commit | e5435d97ea0f7dbd32d3fb30ecfe8877ea7c116a (patch) | |
| tree | 680f321c74af3147c7e851579271ae97e0e6a927 /src/test | |
| parent | acd8dd6a50d505057a7d7ad8d0d7a4c2bd274200 (diff) | |
| parent | c966c458975cc6987f83440206bdedd3cab298b6 (diff) | |
| download | rust-e5435d97ea0f7dbd32d3fb30ecfe8877ea7c116a.tar.gz rust-e5435d97ea0f7dbd32d3fb30ecfe8877ea7c116a.zip | |
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
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc/useless_lifetime_bound.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/rustdoc/useless_lifetime_bound.rs b/src/test/rustdoc/useless_lifetime_bound.rs new file mode 100644 index 00000000000..f530d8a654f --- /dev/null +++ b/src/test/rustdoc/useless_lifetime_bound.rs @@ -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>, +} |
