Commit graph

34 commits

Author SHA1 Message Date
Artur Sinila
8530407e31
tests: fix rustdoc tests 2022-07-19 03:46:32 +03:00
pierwill
499e024ac9 rustdoc: Add more semantic information to impl ids
Instead of generating `#impl`, `#impl-1`, etc., generate IDs
like `#impl-Foo<M>`.

Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2022-07-05 19:43:52 +02:00
Deadbeef
9c0141a490
Bless rustdoc test 2022-02-22 09:25:30 +11:00
Jacob Hoffman-Andrews
32f62607c3 Emit valid HTML from rustdoc
Previously, tidy-html5 (`tidy`) would complain about a few things in our
HTML. The main thing is that `<summary>` tags can't contain `<div>`s.
That's easily fixed by changing out the `<div>`s for `<span>`s with
`display: block`.

However, there's also a rule that `<span>`s can't contain heading
elements. `<span>` permits only "phrasing content"
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span, and
`<h3>` (and friends) are "Flow content, heading content, palpable
content".
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements

We have a wrapping `<div>` that goes around each `<h3>`/`<h4>`,
etc. We turn that into a `<section>` rather than a `<span>` because
`<section>` permits "flow content".
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section

After this change we get only three warnings from tidy, run on
struct.String.html:

line 6 column 10790 - Warning: trimming empty <span>
line 1 column 1118 - Warning: <link> proprietary attribute "disabled"
line 1 column 1193 - Warning: <link> proprietary attribute "disabled"

The empty `<span>` is a known issue - there's a span in front of the
search box to work around a strange Safari issue.

The `<link>` attributes are the non-default stylesheets. We can probably
refactor theme application to avoid using this proprietary "disabled"
attribute.
2022-02-02 00:29:33 -08:00
Ellen
db9b8cef86 update tests 2021-12-10 19:21:25 +00:00
Noah Lev
ee58c06a12 Fix warnings in rustdoc HTML tests
Now that compiletest denies warnings in these tests, they need fixing!
2021-11-28 11:49:12 -08:00
lcnr
87e781799a feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
lcnr
0c28e028b6 feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
Ellen
c0e853f274 remove lazy_normalization_consts 2021-08-30 11:00:21 +02:00
Ellen
fcc2badf9b rename const_evaluatable_checked to generic_const_exprs
2021-08-30 11:00:21 +02:00
bors
76a3b609d0 Rustdoc accessibility: use real headers for doc items
Part of #87059

Partially reverts #84703

Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-25 21:41:57 +00:00
Ellen
94de92ddc7 add @has 2021-06-12 16:35:18 +01:00
Ellen
9a75381f64 line 2021-06-12 10:18:51 +01:00
Ellen
00a5ec1375 dont ICE on ConstEvaluatable predicates 2021-06-12 09:56:25 +01:00
Ellen
3bd7de90df add test 2021-06-03 09:40:07 +01:00
Guillaume Gomez
14fe83f7e4 Update rustdoc tests 2021-06-02 20:30:18 +02:00
Guillaume Gomez
9077d540da Replace h3 and h4 containing invalid DOM 2021-06-01 21:19:28 +02:00
Jacob Hoffman-Andrews
569096cbaf rustdoc: use details tag for trait implementors
This switches from JS-generated toggles to using the HTML <details> tag
for expanding and collapsing entries in the "Implementors" section.
2021-04-19 19:46:51 -07:00
Simon Jakobi
3ea62cb5d1 Remove redundant ignore-tidy-linelength annotations
This is step 2 towards fixing #77548.

In the codegen and codegen-units test suites, the `//` comment markers
were kept in order not to affect any source locations. This is because
these tests cannot be automatically `--bless`ed.
2021-04-03 22:30:20 +02:00
Bastian Kauschke
c4ba60a191 update tests 2020-12-26 18:24:10 +01:00
Bastian Kauschke
b8defab08d rustdoc: move lazy norm tests into const-generics 2020-12-01 22:36:43 +01:00
Joshua Nelson
38127caf73 Handle and test wildcard arguments 2020-11-12 11:14:29 -05:00
Bastian Kauschke
7d9f81517b add rustdoc test 2020-11-11 21:24:03 +01:00
Bastian Kauschke
ccf1f58081 rustdoc: fix min_const_generics with ty::Param 2020-09-03 21:57:27 +02:00
Bastian Kauschke
b90bc8d70b fix rustdoc generic param order 2020-07-31 23:51:19 +02:00
Oliver Scherer
819cde5dab Show the values and computation that would overflow a const evaluation or propagation 2020-06-26 10:08:52 +02:00
Guillaume Gomez
cf184823d1 Update tests 2020-05-05 22:56:23 +02:00
Ben Lewis
02fffc1556 Code review changes and fix rustdoc test. 2020-01-14 07:47:45 +13:00
Oliver Middleton
e2305d0055 rustdoc: HTML escape const values 2020-01-05 23:19:42 +00:00
Ohad Ravid
811bdeee00 Show value for consts in the documentation 2019-12-24 10:10:36 +01:00
varkor
9f788f3a2b Fix rustdoc const generics test 2019-10-22 12:26:32 +01:00
Guillaume Gomez
8f3753703c Fix slice const generic length display 2019-06-07 15:54:16 +02:00
varkor
9c9b7b4eac Add a regression test for unevaluated const in rustdoc 2019-05-28 22:53:48 +01:00
varkor
7f9dc73a31 Add a const-generics folder to rustdoc tests 2019-05-28 22:53:36 +01:00