rust/src/test/rustdoc
bors b239743753 Auto merge of #52644 - varkor:lib-feature-gate-2, r=withoutboats
Add errors for unknown, stable and duplicate feature attributes

- Adds an error for unknown (lang and lib) features.
- Extends the lint for unnecessary feature attributes for stable features to libs features (this already exists for lang features).
- Adds an error for duplicate (lang and lib) features.

```rust
#![feature(fake_feature)] //~ ERROR unknown feature `fake_feature`

#![feature(i128_type)] //~ WARNING the feature `i128_type` has been stable since 1.26.0

#![feature(non_exhaustive)]
#![feature(non_exhaustive)] //~ ERROR duplicate `non_exhaustive` feature attribute
```

Fixes #52053, fixes #53032 and address some of the problems noted in #44232 (though not unused features).

There are a few outstanding problems, that I haven't narrowed down yet:
- [x] Stability attributes on macros do not seem to be taken into account.
- [x] Stability attributes behind `cfg` attributes are not taken into account.
- [x] There are failing incremental tests.
2018-08-06 16:58:27 +00:00
..
auxiliary Auto merge of #52644 - varkor:lib-feature-gate-2, r=withoutboats 2018-08-06 16:58:27 +00:00
duplicate_impls Generate documentation for auto-trait impls 2018-02-18 16:29:24 -05:00
inline_cross test for renaming re-exported macros 2018-07-03 10:40:11 -05:00
inline_local let htmldocck.py check for directories 2017-09-30 13:28:09 -05:00
primitive Fix primitive blanket impls not showing up 2018-08-04 11:02:00 +02:00
src-links
synthetic_auto Fix rustdoc crash when 'static bound appears in struct declaration 2018-08-02 09:58:44 -04:00
test_option_check
all.rs rustdoc: Don't include private paths in all.html 2018-04-13 14:58:43 +01:00
assoc-consts.rs
assoc-item-cast.rs
assoc-types.rs
attributes.rs
auto-impl-for-trait.rs Fix auto trait impl rustdoc ice 2018-02-24 01:23:54 +01:00
auto-impl-primitive.rs add auto-impl for primitive type 2018-05-15 21:37:12 +02:00
auto-traits.rs rustdoc: Show when traits are auto traits 2018-01-23 01:04:24 +00:00
cap-lints.rs Fix rustdoc test failure 2018-06-13 21:18:56 +02:00
check-styled-link.rs Fix automatic urls with backticks 2018-03-19 23:25:55 +01:00
codeblock-title.rs update codeblock-title test with new notice text 2017-11-13 11:44:19 -06:00
const-doc.rs
const-evalutation-ice.rs Fix rustdoc test 2018-08-05 15:54:49 +01:00
const-fn.rs Fix rendering of const keyword for functions 2017-09-12 21:55:24 +02:00
const.rs
constructor-imports.rs rustdoc: Hide struct and enum variant constructor imports 2018-07-10 00:16:18 +01:00
crate-version.rs let rustdoc print the crate version into docs 2017-10-09 09:56:17 -05:00
cross-crate-links.rs fix cross-crate-links test 2018-06-17 16:27:46 -05:00
default-impl.rs
default-trait-method-link.rs Fix url for intra link provided method 2018-04-02 18:52:04 +02:00
deprecated-future.rs Shorten deprecation note 2018-03-31 21:44:12 +01:00
deprecated-impls.rs
deprecated.rs
doc-assoc-item.rs
doc-cfg-target-feature.rs add test for using target features in doctests 2018-04-12 15:51:11 -05:00
doc-cfg.rs add target_feature items to doc_cfg rustdoc test 2018-03-21 19:57:10 -05:00
doc-proc-macro.rs add test for issue 52129 2018-07-13 21:46:47 -05:00
doc-spotlight.rs Add tooltip for important traits display 2017-11-18 14:37:10 +01:00
double-quote-escape.rs Fix invalid HTML escape 2017-11-29 19:33:04 +01:00
edition-flag.rs Pass edition flags to compiler from rustdoc as expected 2018-07-14 20:45:44 +02:00
empty-mod-private.rs modify tests to use new flag 2017-10-17 15:38:52 -04:00
empty-mod-public.rs
empty-section.rs Remove auto trait implementation section when empty 2018-03-09 22:18:08 +01:00
escape-deref-methods.rs Escape more items in the sidebar when needed 2017-12-21 13:17:15 +01:00
escape-rust-expr.rs
extern-default-method.rs
extern-impl-trait.rs rustdoc: Add test for foreign impl trait with bounds 2018-03-27 23:57:03 +02:00
extern-impl.rs
extern-links.rs
extern-method.rs
external-cross.rs allow loading external files in documentation 2017-11-21 15:46:49 -06:00
external-doc.rs allow loading external files in documentation 2017-11-21 15:46:49 -06:00
ffi.rs
fn-pointer-arg-name.rs Fix invalid rustdoc rendering for FnTy args 2017-10-07 17:23:06 +02:00
fn-sidebar.rs Add missing items in the sidebar for functions 2018-03-09 17:45:44 +01:00
force-target-feature.rs add -C parameter to rustdoc 2018-04-13 16:07:12 -05:00
foreigntype-reexport.rs Properly handle reexport of foreign items. 2017-11-21 02:51:05 +08:00
foreigntype.rs Support extern type in rustdoc. 2017-11-15 18:20:28 +08:00
generic-impl.rs Strengthen tests 2018-08-04 11:02:00 +02:00
hidden-impls.rs
hidden-line.rs
hidden-methods.rs
hidden-trait-struct-impls.rs Add tests for hidden types 2017-12-18 23:07:19 +01:00
impl-disambiguation.rs
impl-parts-crosscrate.rs fix more typos found by codespell. 2018-02-17 17:38:49 +01:00
impl-parts.rs Adjust tests for removal of impl Foo for .. {} 2018-01-13 18:48:00 +03:00
inline-default-methods.rs
intra-link-extern-crate.rs add tests for new intra-doc-link behavior 2018-08-04 22:20:45 -05:00
intra-link-private.rs add tests for new intra-doc-link behavior 2018-08-04 22:20:45 -05:00
intra-link-self.rs Add "self" intra-link support 2018-07-22 00:22:30 +02:00
intra-links.rs Add test 2018-02-18 17:57:06 -08:00
invalid.crate.name.rs Fix crate-name option in rustdoc 2018-06-04 23:05:14 +02:00
issue-12834.rs Update unstable-crate test 2017-08-30 09:40:43 +02:00
issue-13698.rs
issue-15169.rs
issue-15318-2.rs
issue-15318-3.rs
issue-15318.rs
issue-15347.rs modify tests to use new flag 2017-10-17 15:38:52 -04:00
issue-16019.rs
issue-16265-1.rs
issue-16265-2.rs
issue-17476.rs
issue-18199.rs
issue-19055.rs
issue-19181.rs
issue-19190-2.rs Make rustdoc not include self-by-value methods from Deref target 2017-11-20 00:15:26 +01:00
issue-19190-3.rs Make rustdoc not include self-by-value methods from Deref target 2017-11-20 00:15:26 +01:00
issue-19190.rs
issue-20175.rs
issue-20646.rs
issue-20727-2.rs
issue-20727-3.rs
issue-20727-4.rs
issue-20727.rs
issue-21092.rs
issue-21474.rs Generate documentation for auto-trait impls 2018-02-18 16:29:24 -05:00
issue-21801.rs
issue-22025.rs
issue-22038.rs
issue-23106.rs
issue-23207.rs
issue-23511.rs Replace StrExt with inherent str methods in libcore 2018-04-21 09:47:37 +02:00
issue-23744.rs
issue-23812.rs
issue-25001.rs
issue-25944.rs
issue-26606.rs
issue-26995.rs
issue-27104.rs
issue-27362.rs
issue-27759.rs
issue-27862.rs
issue-28478.rs
issue-28927.rs
issue-29449.rs Fix tests 2017-09-01 20:07:04 +12:00
issue-29503.rs
issue-29584.rs
issue-30109.rs
issue-30252.rs
issue-30366.rs
issue-31808.rs
issue-31899.rs
issue-32374.rs
issue-32395.rs
issue-32556.rs Add ignore reason 2018-03-31 16:23:50 -04:00
issue-32890.rs
issue-33069.rs
issue-33178-1.rs
issue-33178.rs
issue-33302.rs
issue-33592.rs
issue-34025.rs
issue-34274.rs
issue-34423.rs
issue-34473.rs
issue-34928.rs
issue-35169-2.rs
issue-35169.rs
issue-35488.rs
issue-36031.rs
issue-38129.rs
issue-38219.rs
issue-40936.rs
issue-41783.rs Update test issue-41783.rs for new attribute highlighting behaviour 2017-08-28 10:52:49 -04:00
issue-42760.rs allow loading external files in documentation 2017-11-21 15:46:49 -06:00
issue-42875.rs
issue-43153.rs doc tests: use the filename from the source file for doc test programs, rather than a dummy name 2017-08-10 17:59:20 +12:00
issue-43701.rs rustdoc: Don't add external impls to implementors js 2017-08-08 15:01:37 +01:00
issue-43869.rs Stabilize conservative_impl_trait 2018-03-26 10:43:03 +02:00
issue-43893.rs rustdoc: Add missing src links for generic impls on trait pages 2017-12-27 23:39:25 +00:00
issue-45584.rs Generate documentation for auto-trait impls 2018-02-18 16:29:24 -05:00
issue-46271.rs rustc: Filter out bogus extern crate warnings 2017-11-30 08:03:04 -08:00
issue-46377.rs Fix rustoc item summaries that are headers 2017-11-30 00:28:59 +01:00
issue-46380-2.rs Fix htmldocck naming 2017-11-30 21:43:21 +01:00
issue-46380.rs Show hidden items with rustdoc's document-private 2017-11-30 21:18:00 +01:00
issue-46727.rs Testcase for const-eval array lengths 2017-12-23 11:16:03 +01:00
issue-46766.rs rustdoc: Don't try to generate links for modules in import paths 2017-12-28 17:51:31 +00:00
issue-46767.rs rustdoc: Don't try to generate links for modules in import paths 2017-12-28 17:51:31 +00:00
issue-46976.rs Stabilize universal_impl_trait 2018-03-26 07:39:38 +02:00
issue-47038.rs rustdoc: Don't import macros from private imports 2018-01-08 03:39:25 +00:00
issue-47197-blank-line-in-doc-block.rs wherein careful doc-decoration arithmetic proves quite the ICE-breaker 2018-01-06 11:17:29 -08:00
issue-47639.rs Add regression test 2018-02-02 13:36:26 +05:30
issue-48377.rs Fix rustdoc test ICE 2018-02-20 20:30:29 +01:00
issue-48414.rs add test for issue 48414 ICE 2018-02-21 19:58:20 -06:00
issue-51236.rs Filter out duplicated trait predicates when generating auto traits 2018-08-02 13:59:16 -04:00
keyword.rs Add even more tests 2018-06-04 09:52:31 +02:00
line-breaks.rs
link-assoc-const.rs Fix impl assoc constant link not working 2018-03-24 16:38:16 +01:00
link-title-escape.rs Remove hoedown from rustdoc 2018-02-16 23:17:15 +01:00
macros.rs
manual_impl.rs Add new tests and fix old ones 2018-07-22 21:02:44 +02:00
masked.rs rustdoc: Hide methods from #[doc(masked)] crates from the search index 2018-01-23 04:22:20 +00:00
method-list.rs Add tests for methods listing in rust docs 2017-11-03 18:39:00 +01:00
mod-stackoverflow.rs Prevent infinite recursion of modules 2018-05-07 12:44:03 +02:00
module-impls.rs
must-use.rs
namespaces.rs add test for issue 34843 2018-06-14 17:47:35 -05:00
negative-impl-sidebar.rs Display negative traits implementation 2017-11-20 21:53:19 +01:00
negative-impl.rs
no-run-still-checks-lints.rs
nul-error.rs Remove \0 printing 2017-08-07 22:25:15 +02:00
playground-arg.rs add #![allow(unused)] to the playground link rustdoc tests 2017-11-05 10:24:05 -06:00
playground-empty.rs
playground-none.rs
playground.rs fix playground test for newly-trimmed doctests 2018-02-09 13:48:59 -06:00
prim-title.rs
primitive-generic-impl.rs Fix primitive blanket impls not showing up 2018-08-04 11:02:00 +02:00
primitive-link.rs Add primitive intra-links 2018-03-29 13:43:55 +02:00
private-type-alias.rs
pub-method.rs modify tests to use new flag 2017-10-17 15:38:52 -04:00
pub-restricted.rs rustdoc: Add support for pub(restricted) 2018-05-12 18:25:09 +01:00
pub-use-extern-macros.rs fix test pub-use-extern-macros 2018-06-17 20:14:24 -05:00
recursion1.rs
recursion2.rs
recursion3.rs
redirect-const.rs
redirect-rename.rs
redirect.rs
remove-duplicates.rs Add duplicate test 2017-08-24 11:38:58 +02:00
rustc-macro-crate.rs Rustdoc itself no longer requires proc macros to build 2018-06-02 09:32:22 -06:00
search-index-summaries.rs
search-index.rs
short-dockblock.rs Prevent some markdown transformation on short docblocks 2018-06-28 01:55:43 +02:00
sidebar-items.rs Add new tests and fix old ones 2018-07-22 21:02:44 +02:00
smoke.rs
sort-modules-by-appearance.rs Add a test for --sort-modules-by-appearance 2017-12-19 01:05:06 +00:00
src-links-external.rs
src-links.rs
struct-field.rs Add support for variant and types fields for intra links 2018-03-30 16:22:57 +02:00
structfields.rs
test-lists.rs
test-parens.rs
titles.rs
trait-attributes.rs Add attributes for trait and methods as well 2018-06-02 23:26:46 +02:00
trait-self-link.rs
traits-in-bodies.rs add rustdoc test for everybody_loops fix 2018-08-02 15:42:02 -05:00
tuples.rs
typedef.rs
union.rs
unit-return.rs rustdoc: Hide -> () in cross crate inlined Fn* bounds 2018-02-07 13:14:37 +00:00
universal-impl-trait.rs Fix rustdoc panic with impl Trait in type parameters 2018-05-16 11:03:02 +09:00
unneeded-trait-implementations-title.rs Remove unneeded trait implementations titles 2018-03-29 14:33:16 +02:00
variadic.rs
viewpath-rename.rs
viewpath-self.rs
where-sized.rs Fix ?Sized where bound not being displayed at the correct place 2017-12-18 10:44:26 +01:00
where.rs