Clean up rustdoc tests by removing unnecessary features
This commit is contained in:
parent
53d19b37c5
commit
d61ea56884
|
@ -1,4 +1,2 @@
|
|||
#![feature(doc_alias)]
|
||||
|
||||
#[doc(alias = "true")]
|
||||
pub struct Foo;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(doc_alias)]
|
||||
|
||||
#[doc(alias = "true")]
|
||||
pub struct Foo;
|
||||
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
#![feature(doc_alias)]
|
||||
|
||||
#[doc(alias = "Demon Lord")]
|
||||
pub struct Struct;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(doc_alias)]
|
||||
|
||||
#[doc(alias = "StructItem")]
|
||||
pub struct Struct {
|
||||
#[doc(alias = "StructFieldItem")]
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(doc_alias)]
|
||||
|
||||
pub struct Bar;
|
||||
pub trait Foo {
|
||||
type X;
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
error: `#[doc(alias = "...")]` isn't allowed on extern block
|
||||
--> $DIR/check-doc-alias-attr-location.rs:9:7
|
||||
--> $DIR/check-doc-alias-attr-location.rs:7:7
|
||||
|
|
||||
LL | #[doc(alias = "foo")]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: `#[doc(alias = "...")]` isn't allowed on implementation block
|
||||
--> $DIR/check-doc-alias-attr-location.rs:12:7
|
||||
--> $DIR/check-doc-alias-attr-location.rs:10:7
|
||||
|
|
||||
LL | #[doc(alias = "bar")]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: `#[doc(alias = "...")]` isn't allowed on implementation block
|
||||
--> $DIR/check-doc-alias-attr-location.rs:18:7
|
||||
--> $DIR/check-doc-alias-attr-location.rs:16:7
|
||||
|
|
||||
LL | #[doc(alias = "foobar")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[doc(alias = "...")]` isn't allowed on type alias in implementation block
|
||||
--> $DIR/check-doc-alias-attr-location.rs:20:11
|
||||
--> $DIR/check-doc-alias-attr-location.rs:18:11
|
||||
|
|
||||
LL | #[doc(alias = "assoc")]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![crate_type = "lib"]
|
||||
#![feature(doc_alias)]
|
||||
|
||||
#[doc(alias = "foo")] // ok!
|
||||
pub struct Bar;
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
error: doc alias attribute expects a string: #[doc(alias = "0")]
|
||||
--> $DIR/check-doc-alias-attr.rs:7:7
|
||||
--> $DIR/check-doc-alias-attr.rs:6:7
|
||||
|
|
||||
LL | #[doc(alias)]
|
||||
| ^^^^^
|
||||
|
||||
error: doc alias attribute expects a string: #[doc(alias = "0")]
|
||||
--> $DIR/check-doc-alias-attr.rs:8:7
|
||||
--> $DIR/check-doc-alias-attr.rs:7:7
|
||||
|
|
||||
LL | #[doc(alias = 0)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: doc alias attribute expects a string: #[doc(alias = "0")]
|
||||
--> $DIR/check-doc-alias-attr.rs:9:7
|
||||
--> $DIR/check-doc-alias-attr.rs:8:7
|
||||
|
|
||||
LL | #[doc(alias("bar"))]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: '\"' character isn't allowed in `#[doc(alias = "...")]`
|
||||
--> $DIR/check-doc-alias-attr.rs:10:7
|
||||
--> $DIR/check-doc-alias-attr.rs:9:7
|
||||
|
|
||||
LL | #[doc(alias = "\"")]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: '\n' character isn't allowed in `#[doc(alias = "...")]`
|
||||
--> $DIR/check-doc-alias-attr.rs:11:7
|
||||
--> $DIR/check-doc-alias-attr.rs:10:7
|
||||
|
|
||||
LL | #[doc(alias = "\n")]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: '\n' character isn't allowed in `#[doc(alias = "...")]`
|
||||
--> $DIR/check-doc-alias-attr.rs:12:7
|
||||
--> $DIR/check-doc-alias-attr.rs:11:7
|
||||
|
|
||||
LL | #[doc(alias = "
|
||||
| _______^
|
||||
|
@ -37,19 +37,19 @@ LL | | ")]
|
|||
| |_^
|
||||
|
||||
error: '\t' character isn't allowed in `#[doc(alias = "...")]`
|
||||
--> $DIR/check-doc-alias-attr.rs:14:7
|
||||
--> $DIR/check-doc-alias-attr.rs:13:7
|
||||
|
|
||||
LL | #[doc(alias = "\t")]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: `#[doc(alias = "...")]` cannot start or end with ' '
|
||||
--> $DIR/check-doc-alias-attr.rs:15:7
|
||||
--> $DIR/check-doc-alias-attr.rs:14:7
|
||||
|
|
||||
LL | #[doc(alias = " hello")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[doc(alias = "...")]` cannot start or end with ' '
|
||||
--> $DIR/check-doc-alias-attr.rs:16:7
|
||||
--> $DIR/check-doc-alias-attr.rs:15:7
|
||||
|
|
||||
LL | #[doc(alias = "hello ")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#![feature(doc_alias)]
|
||||
#![feature(trait_alias)]
|
||||
|
||||
pub struct Foo;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: `#[doc(alias = "...")]` isn't allowed on associated constant in trait implementation block
|
||||
--> $DIR/doc-alias-assoc-const.rs:11:11
|
||||
--> $DIR/doc-alias-assoc-const.rs:10:11
|
||||
|
|
||||
LL | #[doc(alias = "CONST_BAZ")]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
// compile-flags:--test
|
||||
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
|
||||
|
||||
#![feature(cfg_doctest)]
|
||||
|
||||
// Make sure `cfg(doctest)` is set when finding doctests but not inside
|
||||
// the doctests.
|
||||
|
||||
/// ```
|
||||
/// #![feature(cfg_doctest)]
|
||||
/// assert!(!cfg!(doctest));
|
||||
/// ```
|
||||
#[cfg(doctest)]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
running 1 test
|
||||
test $DIR/doc-test-doctest-feature.rs - Foo (line 10) ... ok
|
||||
test $DIR/doc-test-doctest-feature.rs - Foo (line 8) ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(deprecated)]
|
||||
|
||||
// @has deprecated_future/index.html '//*[@class="stab deprecated"]' \
|
||||
// 'Deprecated'
|
||||
// @has deprecated_future/struct.S.html '//*[@class="stab deprecated"]' \
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(deprecated)]
|
||||
|
||||
// @has deprecated/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' \
|
||||
// 'Deprecated'
|
||||
// @has - '//*[@class="docblock-short"]' 'Deprecated docs'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(const_fn)]
|
||||
|
||||
// @has 'issue_76501/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32'
|
||||
/// A useless function that always returns 1.
|
||||
pub const fn bloop() -> i32 {
|
||||
|
|
Loading…
Reference in New Issue