Update ui tests
This commit is contained in:
parent
5ce15af6b1
commit
8e817af3ae
27 changed files with 55 additions and 241 deletions
|
@ -1,25 +1,17 @@
|
|||
#![crate_type = "lib"]
|
||||
#![deny(warnings)]
|
||||
#![doc(as_ptr)]
|
||||
//~^ ERROR unknown `doc` attribute
|
||||
//~^^ WARN
|
||||
|
||||
#[doc(as_ptr)]
|
||||
//~^ ERROR unknown `doc` attribute
|
||||
//~^^ WARN
|
||||
pub fn foo() {}
|
||||
|
||||
#[doc(123)]
|
||||
//~^ ERROR invalid `doc` attribute
|
||||
//~| WARN
|
||||
#[doc("hello", "bar")]
|
||||
//~^ ERROR invalid `doc` attribute
|
||||
//~| WARN
|
||||
//~| ERROR invalid `doc` attribute
|
||||
//~| WARN
|
||||
#[doc(foo::bar, crate::bar::baz = "bye")]
|
||||
//~^ ERROR unknown `doc` attribute
|
||||
//~| WARN
|
||||
//~| ERROR unknown `doc` attribute
|
||||
//~| WARN
|
||||
fn bar() {}
|
||||
|
|
|
@ -1,71 +1,46 @@
|
|||
error: unknown `doc` attribute `as_ptr`
|
||||
--> $DIR/doc-attr.rs:7:7
|
||||
--> $DIR/doc-attr.rs:5:7
|
||||
|
|
||||
LL | #[doc(as_ptr)]
|
||||
| ^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/doc-attr.rs:2:9
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
|
||||
= note: `#[deny(invalid_doc_attributes)]` on by default
|
||||
|
||||
error: invalid `doc` attribute
|
||||
--> $DIR/doc-attr.rs:12:7
|
||||
--> $DIR/doc-attr.rs:9:7
|
||||
|
|
||||
LL | #[doc(123)]
|
||||
| ^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: invalid `doc` attribute
|
||||
--> $DIR/doc-attr.rs:15:7
|
||||
--> $DIR/doc-attr.rs:11:7
|
||||
|
|
||||
LL | #[doc("hello", "bar")]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: invalid `doc` attribute
|
||||
--> $DIR/doc-attr.rs:15:16
|
||||
--> $DIR/doc-attr.rs:11:16
|
||||
|
|
||||
LL | #[doc("hello", "bar")]
|
||||
| ^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: unknown `doc` attribute `foo::bar`
|
||||
--> $DIR/doc-attr.rs:20:7
|
||||
--> $DIR/doc-attr.rs:14:7
|
||||
|
|
||||
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: unknown `doc` attribute `crate::bar::baz`
|
||||
--> $DIR/doc-attr.rs:20:17
|
||||
--> $DIR/doc-attr.rs:14:17
|
||||
|
|
||||
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: unknown `doc` attribute `as_ptr`
|
||||
--> $DIR/doc-attr.rs:3:8
|
||||
--> $DIR/doc-attr.rs:2:8
|
||||
|
|
||||
LL | #![doc(as_ptr)]
|
||||
| ^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
//@ run-rustfix
|
||||
#![deny(warnings)]
|
||||
#![feature(doc_notable_trait)]
|
||||
|
||||
#[doc(notable_trait)]
|
||||
//~^ ERROR unknown `doc` attribute `spotlight`
|
||||
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
trait MyTrait {}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
//@ run-rustfix
|
||||
#![deny(warnings)]
|
||||
#![feature(doc_notable_trait)]
|
||||
|
||||
#[doc(spotlight)]
|
||||
//~^ ERROR unknown `doc` attribute `spotlight`
|
||||
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
trait MyTrait {}
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
error: unknown `doc` attribute `spotlight`
|
||||
--> $DIR/doc-spotlight.rs:5:7
|
||||
--> $DIR/doc-spotlight.rs:4:7
|
||||
|
|
||||
LL | #[doc(spotlight)]
|
||||
| ^^^^^^^^^ help: use `notable_trait` instead
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: `doc(spotlight)` was renamed to `doc(notable_trait)`
|
||||
= note: `doc(spotlight)` is now a no-op
|
||||
note: the lint level is defined here
|
||||
--> $DIR/doc-spotlight.rs:2:9
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
|
||||
= note: `#[deny(invalid_doc_attributes)]` on by default
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
#![feature(doc_cfg_hide)]
|
||||
#![deny(warnings)]
|
||||
|
||||
#![doc(cfg_hide = "test")] //~ ERROR
|
||||
//~^ WARN
|
||||
#![doc(cfg_hide)] //~ ERROR
|
||||
//~^ WARN
|
||||
|
||||
#[doc(cfg_hide(doc))] //~ ERROR
|
||||
//~^ WARN
|
||||
pub fn foo() {}
|
||||
|
|
|
@ -1,40 +1,27 @@
|
|||
error: this attribute can only be applied at the crate level
|
||||
--> $DIR/doc_cfg_hide.rs:9:7
|
||||
--> $DIR/doc_cfg_hide.rs:6:7
|
||||
|
|
||||
LL | #[doc(cfg_hide(doc))]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
|
||||
note: the lint level is defined here
|
||||
--> $DIR/doc_cfg_hide.rs:2:9
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
|
||||
= note: `#[deny(invalid_doc_attributes)]` on by default
|
||||
help: to apply to the crate, use an inner attribute
|
||||
|
|
||||
LL | #![doc(cfg_hide(doc))]
|
||||
| +
|
||||
|
||||
error: `#[doc(cfg_hide(...))]` takes a list of attributes
|
||||
--> $DIR/doc_cfg_hide.rs:4:8
|
||||
--> $DIR/doc_cfg_hide.rs:3:8
|
||||
|
|
||||
LL | #![doc(cfg_hide = "test")]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: `#[doc(cfg_hide(...))]` takes a list of attributes
|
||||
--> $DIR/doc_cfg_hide.rs:6:8
|
||||
--> $DIR/doc_cfg_hide.rs:4:8
|
||||
|
|
||||
LL | #![doc(cfg_hide)]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -1,32 +1,25 @@
|
|||
#![crate_type = "lib"]
|
||||
#![deny(warnings)]
|
||||
#![feature(doc_masked)]
|
||||
|
||||
#![doc(masked)]
|
||||
//~^ ERROR this attribute can only be applied to an `extern crate` item
|
||||
//~| WARN is being phased out
|
||||
|
||||
#[doc(test(no_crate_inject))]
|
||||
//~^ ERROR can only be applied at the crate level
|
||||
//~| WARN is being phased out
|
||||
//~| HELP to apply to the crate, use an inner attribute
|
||||
//~| SUGGESTION !
|
||||
#[doc(inline)]
|
||||
//~^ ERROR can only be applied to a `use` item
|
||||
//~| WARN is being phased out
|
||||
pub fn foo() {}
|
||||
|
||||
pub mod bar {
|
||||
#![doc(test(no_crate_inject))]
|
||||
//~^ ERROR can only be applied at the crate level
|
||||
//~| WARN is being phased out
|
||||
|
||||
#[doc(test(no_crate_inject))]
|
||||
//~^ ERROR can only be applied at the crate level
|
||||
//~| WARN is being phased out
|
||||
#[doc(inline)]
|
||||
//~^ ERROR can only be applied to a `use` item
|
||||
//~| WARN is being phased out
|
||||
pub fn baz() {}
|
||||
}
|
||||
|
||||
|
@ -38,10 +31,8 @@ pub use bar::baz;
|
|||
|
||||
#[doc(masked)]
|
||||
//~^ ERROR this attribute can only be applied to an `extern crate` item
|
||||
//~| WARN is being phased out
|
||||
pub struct Masked;
|
||||
|
||||
#[doc(masked)]
|
||||
//~^ ERROR this attribute cannot be applied to an `extern crate self` item
|
||||
//~| WARN is being phased out
|
||||
pub extern crate self as reexport;
|
||||
|
|
|
@ -1,48 +1,37 @@
|
|||
error: this attribute can only be applied at the crate level
|
||||
--> $DIR/invalid-doc-attr.rs:9:7
|
||||
--> $DIR/invalid-doc-attr.rs:7:7
|
||||
|
|
||||
LL | #[doc(test(no_crate_inject))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
|
||||
note: the lint level is defined here
|
||||
--> $DIR/invalid-doc-attr.rs:2:9
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
|
||||
= note: `#[deny(invalid_doc_attributes)]` on by default
|
||||
help: to apply to the crate, use an inner attribute
|
||||
|
|
||||
LL | #![doc(test(no_crate_inject))]
|
||||
| +
|
||||
|
||||
error: this attribute can only be applied to a `use` item
|
||||
--> $DIR/invalid-doc-attr.rs:14:7
|
||||
--> $DIR/invalid-doc-attr.rs:11:7
|
||||
|
|
||||
LL | #[doc(inline)]
|
||||
| ^^^^^^ only applicable on `use` items
|
||||
...
|
||||
LL |
|
||||
LL | pub fn foo() {}
|
||||
| ------------ not a `use` item
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
|
||||
|
||||
error: this attribute can only be applied at the crate level
|
||||
--> $DIR/invalid-doc-attr.rs:20:12
|
||||
--> $DIR/invalid-doc-attr.rs:16:12
|
||||
|
|
||||
LL | #![doc(test(no_crate_inject))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
|
||||
|
||||
error: conflicting doc inlining attributes
|
||||
--> $DIR/invalid-doc-attr.rs:33:7
|
||||
--> $DIR/invalid-doc-attr.rs:26:7
|
||||
|
|
||||
LL | #[doc(inline)]
|
||||
| ^^^^^^ this attribute...
|
||||
|
@ -52,61 +41,50 @@ LL | #[doc(no_inline)]
|
|||
= help: remove one of the conflicting attributes
|
||||
|
||||
error: this attribute can only be applied to an `extern crate` item
|
||||
--> $DIR/invalid-doc-attr.rs:39:7
|
||||
--> $DIR/invalid-doc-attr.rs:32:7
|
||||
|
|
||||
LL | #[doc(masked)]
|
||||
| ^^^^^^ only applicable on `extern crate` items
|
||||
...
|
||||
LL |
|
||||
LL | pub struct Masked;
|
||||
| ----------------- not an `extern crate` item
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
|
||||
|
||||
error: this attribute cannot be applied to an `extern crate self` item
|
||||
--> $DIR/invalid-doc-attr.rs:44:7
|
||||
--> $DIR/invalid-doc-attr.rs:36:7
|
||||
|
|
||||
LL | #[doc(masked)]
|
||||
| ^^^^^^ not applicable on `extern crate self` items
|
||||
...
|
||||
LL |
|
||||
LL | pub extern crate self as reexport;
|
||||
| --------------------------------- `extern crate self` defined here
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
|
||||
error: this attribute can only be applied to an `extern crate` item
|
||||
--> $DIR/invalid-doc-attr.rs:5:8
|
||||
--> $DIR/invalid-doc-attr.rs:4:8
|
||||
|
|
||||
LL | #![doc(masked)]
|
||||
| ^^^^^^ only applicable on `extern crate` items
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
|
||||
|
||||
error: this attribute can only be applied at the crate level
|
||||
--> $DIR/invalid-doc-attr.rs:24:11
|
||||
--> $DIR/invalid-doc-attr.rs:19:11
|
||||
|
|
||||
LL | #[doc(test(no_crate_inject))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
|
||||
|
||||
error: this attribute can only be applied to a `use` item
|
||||
--> $DIR/invalid-doc-attr.rs:27:11
|
||||
--> $DIR/invalid-doc-attr.rs:21:11
|
||||
|
|
||||
LL | #[doc(inline)]
|
||||
| ^^^^^^ only applicable on `use` items
|
||||
...
|
||||
LL |
|
||||
LL | pub fn baz() {}
|
||||
| ------------ not a `use` item
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
|
||||
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue