Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa7f7a8

Browse files
committedJan 9, 2024
Update ui tests
1 parent f1ead97 commit aa7f7a8

27 files changed

+55
-241
lines changed
 
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
// check-pass
2-
31
#[doc(include = "external-cross-doc.md")]
4-
//~^ WARNING unknown `doc` attribute `include`
2+
//~^ ERROR unknown `doc` attribute `include`
53
//~| HELP use `doc = include_str!` instead
64
// FIXME(#85497): make this a deny instead so it's more clear what's happening
75
//~| NOTE on by default
8-
//~| WARNING previously accepted
9-
//~| NOTE see issue #82730
106
pub struct NeedMoreDocs;
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
warning: unknown `doc` attribute `include`
2-
--> $DIR/doc-include-suggestion.rs:3:7
1+
error: unknown `doc` attribute `include`
2+
--> $DIR/doc-include-suggestion.rs:1:7
33
|
44
LL | #[doc(include = "external-cross-doc.md")]
55
| ------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- help: use `doc = include_str!` instead: `#[doc = include_str!("external-cross-doc.md")]`
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
9-
= note: `#[warn(invalid_doc_attributes)]` on by default
7+
= note: `#[deny(invalid_doc_attributes)]` on by default
108

11-
warning: 1 warning emitted
9+
error: aborting due to 1 previous error
1210

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
#![crate_type = "lib"]
2-
#![deny(invalid_doc_attributes)]
32

43
#![doc(test)]
54
//~^ ERROR `#[doc(test(...)]` takes a list of attributes
6-
//~^^ WARN this was previously accepted by the compiler
75
#![doc(test = "hello")]
86
//~^ ERROR `#[doc(test(...)]` takes a list of attributes
9-
//~^^ WARN this was previously accepted by the compiler
107
#![doc(test(a))]
118
//~^ ERROR unknown `doc(test)` attribute `a`
12-
//~^^ WARN this was previously accepted by the compiler
139

1410
pub fn foo() {}
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
11
error: `#[doc(test(...)]` takes a list of attributes
2-
--> $DIR/doc-test-attr.rs:4:8
2+
--> $DIR/doc-test-attr.rs:3:8
33
|
44
LL | #![doc(test)]
55
| ^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
9-
note: the lint level is defined here
10-
--> $DIR/doc-test-attr.rs:2:9
11-
|
12-
LL | #![deny(invalid_doc_attributes)]
13-
| ^^^^^^^^^^^^^^^^^^^^^^
7+
= note: `#[deny(invalid_doc_attributes)]` on by default
148

159
error: `#[doc(test(...)]` takes a list of attributes
16-
--> $DIR/doc-test-attr.rs:7:8
10+
--> $DIR/doc-test-attr.rs:5:8
1711
|
1812
LL | #![doc(test = "hello")]
1913
| ^^^^^^^^^^^^^^
20-
|
21-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
2314

2415
error: unknown `doc(test)` attribute `a`
25-
--> $DIR/doc-test-attr.rs:10:13
16+
--> $DIR/doc-test-attr.rs:7:13
2617
|
2718
LL | #![doc(test(a))]
2819
| ^
29-
|
30-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
3220

3321
error: aborting due to 3 previous errors
3422

‎tests/rustdoc-ui/lints/doc-attr.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
#![crate_type = "lib"]
2-
#![deny(warnings)]
32
#![doc(as_ptr)]
43
//~^ ERROR unknown `doc` attribute
5-
//~^^ WARN
64

75
#[doc(as_ptr)]
86
//~^ ERROR unknown `doc` attribute
9-
//~^^ WARN
107
pub fn foo() {}
118

129
#[doc(123)]
1310
//~^ ERROR invalid `doc` attribute
14-
//~| WARN
1511
#[doc("hello", "bar")]
1612
//~^ ERROR invalid `doc` attribute
17-
//~| WARN
1813
//~| ERROR invalid `doc` attribute
19-
//~| WARN
2014
#[doc(foo::bar, crate::bar::baz = "bye")]
2115
//~^ ERROR unknown `doc` attribute
22-
//~| WARN
2316
//~| ERROR unknown `doc` attribute
24-
//~| WARN
2517
fn bar() {}
Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,46 @@
11
error: unknown `doc` attribute `as_ptr`
2-
--> $DIR/doc-attr.rs:7:7
2+
--> $DIR/doc-attr.rs:5:7
33
|
44
LL | #[doc(as_ptr)]
55
| ^^^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
9-
note: the lint level is defined here
10-
--> $DIR/doc-attr.rs:2:9
11-
|
12-
LL | #![deny(warnings)]
13-
| ^^^^^^^^
14-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
7+
= note: `#[deny(invalid_doc_attributes)]` on by default
158

169
error: invalid `doc` attribute
17-
--> $DIR/doc-attr.rs:12:7
10+
--> $DIR/doc-attr.rs:9:7
1811
|
1912
LL | #[doc(123)]
2013
| ^^^
21-
|
22-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
2414

2515
error: invalid `doc` attribute
26-
--> $DIR/doc-attr.rs:15:7
16+
--> $DIR/doc-attr.rs:11:7
2717
|
2818
LL | #[doc("hello", "bar")]
2919
| ^^^^^^^
30-
|
31-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
3320

3421
error: invalid `doc` attribute
35-
--> $DIR/doc-attr.rs:15:16
22+
--> $DIR/doc-attr.rs:11:16
3623
|
3724
LL | #[doc("hello", "bar")]
3825
| ^^^^^
39-
|
40-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
4226

4327
error: unknown `doc` attribute `foo::bar`
44-
--> $DIR/doc-attr.rs:20:7
28+
--> $DIR/doc-attr.rs:14:7
4529
|
4630
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
4731
| ^^^^^^^^
48-
|
49-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
50-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
5132

5233
error: unknown `doc` attribute `crate::bar::baz`
53-
--> $DIR/doc-attr.rs:20:17
34+
--> $DIR/doc-attr.rs:14:17
5435
|
5536
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
5637
| ^^^^^^^^^^^^^^^^^^^^^^^
57-
|
58-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
59-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
6038

6139
error: unknown `doc` attribute `as_ptr`
62-
--> $DIR/doc-attr.rs:3:8
40+
--> $DIR/doc-attr.rs:2:8
6341
|
6442
LL | #![doc(as_ptr)]
6543
| ^^^^^^
66-
|
67-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
68-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
6944

7045
error: aborting due to 7 previous errors
7146

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// run-rustfix
2-
#![deny(warnings)]
32
#![feature(doc_notable_trait)]
43

54
#[doc(notable_trait)]
65
//~^ ERROR unknown `doc` attribute `spotlight`
7-
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
86
trait MyTrait {}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// run-rustfix
2-
#![deny(warnings)]
32
#![feature(doc_notable_trait)]
43

54
#[doc(spotlight)]
65
//~^ ERROR unknown `doc` attribute `spotlight`
7-
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
86
trait MyTrait {}
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
error: unknown `doc` attribute `spotlight`
2-
--> $DIR/doc-spotlight.rs:5:7
2+
--> $DIR/doc-spotlight.rs:4:7
33
|
44
LL | #[doc(spotlight)]
55
| ^^^^^^^^^ help: use `notable_trait` instead
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
97
= note: `doc(spotlight)` was renamed to `doc(notable_trait)`
108
= note: `doc(spotlight)` is now a no-op
11-
note: the lint level is defined here
12-
--> $DIR/doc-spotlight.rs:2:9
13-
|
14-
LL | #![deny(warnings)]
15-
| ^^^^^^^^
16-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
9+
= note: `#[deny(invalid_doc_attributes)]` on by default
1710

1811
error: aborting due to 1 previous error
1912

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#![feature(doc_cfg_hide)]
2-
#![deny(warnings)]
32

43
#![doc(cfg_hide = "test")] //~ ERROR
5-
//~^ WARN
64
#![doc(cfg_hide)] //~ ERROR
7-
//~^ WARN
85

96
#[doc(cfg_hide(doc))] //~ ERROR
10-
//~^ WARN
117
pub fn foo() {}
Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
11
error: this attribute can only be applied at the crate level
2-
--> $DIR/doc_cfg_hide.rs:9:7
2+
--> $DIR/doc_cfg_hide.rs:6:7
33
|
44
LL | #[doc(cfg_hide(doc))]
55
| ^^^^^^^^^^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
97
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
10-
note: the lint level is defined here
11-
--> $DIR/doc_cfg_hide.rs:2:9
12-
|
13-
LL | #![deny(warnings)]
14-
| ^^^^^^^^
15-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
8+
= note: `#[deny(invalid_doc_attributes)]` on by default
169
help: to apply to the crate, use an inner attribute
1710
|
1811
LL | #![doc(cfg_hide(doc))]
1912
| +
2013

2114
error: `#[doc(cfg_hide(...)]` takes a list of attributes
22-
--> $DIR/doc_cfg_hide.rs:4:8
15+
--> $DIR/doc_cfg_hide.rs:3:8
2316
|
2417
LL | #![doc(cfg_hide = "test")]
2518
| ^^^^^^^^^^^^^^^^^
26-
|
27-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
28-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
2919

3020
error: `#[doc(cfg_hide(...)]` takes a list of attributes
31-
--> $DIR/doc_cfg_hide.rs:6:8
21+
--> $DIR/doc_cfg_hide.rs:4:8
3222
|
3323
LL | #![doc(cfg_hide)]
3424
| ^^^^^^^^
35-
|
36-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
37-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
3825

3926
error: aborting due to 3 previous errors
4027

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
11
#![crate_type = "lib"]
2-
#![deny(warnings)]
32
#![feature(doc_masked)]
43

54
#![doc(masked)]
65
//~^ ERROR this attribute can only be applied to an `extern crate` item
7-
//~| WARN is being phased out
86

97
#[doc(test(no_crate_inject))]
108
//~^ ERROR can only be applied at the crate level
11-
//~| WARN is being phased out
129
//~| HELP to apply to the crate, use an inner attribute
1310
//~| SUGGESTION !
1411
#[doc(inline)]
1512
//~^ ERROR can only be applied to a `use` item
16-
//~| WARN is being phased out
1713
pub fn foo() {}
1814

1915
pub mod bar {
2016
#![doc(test(no_crate_inject))]
2117
//~^ ERROR can only be applied at the crate level
22-
//~| WARN is being phased out
2318

2419
#[doc(test(no_crate_inject))]
2520
//~^ ERROR can only be applied at the crate level
26-
//~| WARN is being phased out
2721
#[doc(inline)]
2822
//~^ ERROR can only be applied to a `use` item
29-
//~| WARN is being phased out
3023
pub fn baz() {}
3124
}
3225

@@ -38,10 +31,8 @@ pub use bar::baz;
3831

3932
#[doc(masked)]
4033
//~^ ERROR this attribute can only be applied to an `extern crate` item
41-
//~| WARN is being phased out
4234
pub struct Masked;
4335

4436
#[doc(masked)]
4537
//~^ ERROR this attribute cannot be applied to an `extern crate self` item
46-
//~| WARN is being phased out
4738
pub extern crate self as reexport;

‎tests/rustdoc-ui/lints/invalid-doc-attr.stderr

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,37 @@
11
error: this attribute can only be applied at the crate level
2-
--> $DIR/invalid-doc-attr.rs:9:7
2+
--> $DIR/invalid-doc-attr.rs:7:7
33
|
44
LL | #[doc(test(no_crate_inject))]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
97
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
10-
note: the lint level is defined here
11-
--> $DIR/invalid-doc-attr.rs:2:9
12-
|
13-
LL | #![deny(warnings)]
14-
| ^^^^^^^^
15-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
8+
= note: `#[deny(invalid_doc_attributes)]` on by default
169
help: to apply to the crate, use an inner attribute
1710
|
1811
LL | #![doc(test(no_crate_inject))]
1912
| +
2013

2114
error: this attribute can only be applied to a `use` item
22-
--> $DIR/invalid-doc-attr.rs:14:7
15+
--> $DIR/invalid-doc-attr.rs:11:7
2316
|
2417
LL | #[doc(inline)]
2518
| ^^^^^^ only applicable on `use` items
26-
...
19+
LL |
2720
LL | pub fn foo() {}
2821
| ------------ not a `use` item
2922
|
30-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
3223
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
3324

3425
error: this attribute can only be applied at the crate level
35-
--> $DIR/invalid-doc-attr.rs:20:12
26+
--> $DIR/invalid-doc-attr.rs:16:12
3627
|
3728
LL | #![doc(test(no_crate_inject))]
3829
| ^^^^^^^^^^^^^^^^^^^^^
3930
|
40-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
4231
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
4332

4433
error: conflicting doc inlining attributes
45-
--> $DIR/invalid-doc-attr.rs:33:7
34+
--> $DIR/invalid-doc-attr.rs:26:7
4635
|
4736
LL | #[doc(inline)]
4837
| ^^^^^^ this attribute...
@@ -52,61 +41,50 @@ LL | #[doc(no_inline)]
5241
= help: remove one of the conflicting attributes
5342

5443
error: this attribute can only be applied to an `extern crate` item
55-
--> $DIR/invalid-doc-attr.rs:39:7
44+
--> $DIR/invalid-doc-attr.rs:32:7
5645
|
5746
LL | #[doc(masked)]
5847
| ^^^^^^ only applicable on `extern crate` items
59-
...
48+
LL |
6049
LL | pub struct Masked;
6150
| ----------------- not an `extern crate` item
6251
|
63-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
64-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
6552
= note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
6653

6754
error: this attribute cannot be applied to an `extern crate self` item
68-
--> $DIR/invalid-doc-attr.rs:44:7
55+
--> $DIR/invalid-doc-attr.rs:36:7
6956
|
7057
LL | #[doc(masked)]
7158
| ^^^^^^ not applicable on `extern crate self` items
72-
...
59+
LL |
7360
LL | pub extern crate self as reexport;
7461
| --------------------------------- `extern crate self` defined here
75-
|
76-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
77-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
7862

7963
error: this attribute can only be applied to an `extern crate` item
80-
--> $DIR/invalid-doc-attr.rs:5:8
64+
--> $DIR/invalid-doc-attr.rs:4:8
8165
|
8266
LL | #![doc(masked)]
8367
| ^^^^^^ only applicable on `extern crate` items
8468
|
85-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
86-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
8769
= note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
8870

8971
error: this attribute can only be applied at the crate level
90-
--> $DIR/invalid-doc-attr.rs:24:11
72+
--> $DIR/invalid-doc-attr.rs:19:11
9173
|
9274
LL | #[doc(test(no_crate_inject))]
9375
| ^^^^^^^^^^^^^^^^^^^^^
9476
|
95-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
96-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
9777
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
9878

9979
error: this attribute can only be applied to a `use` item
100-
--> $DIR/invalid-doc-attr.rs:27:11
80+
--> $DIR/invalid-doc-attr.rs:21:11
10181
|
10282
LL | #[doc(inline)]
10383
| ^^^^^^ only applicable on `use` items
104-
...
84+
LL |
10585
LL | pub fn baz() {}
10686
| ------------ not a `use` item
10787
|
108-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
109-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
11088
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
11189

11290
error: aborting due to 9 previous errors

‎tests/ui/attributes/doc-attr.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
#![crate_type = "lib"]
2-
#![deny(warnings)]
32
#![doc(as_ptr)]
43
//~^ ERROR unknown `doc` attribute
5-
//~^^ WARN
64

75
#[doc(as_ptr)]
86
//~^ ERROR unknown `doc` attribute
9-
//~^^ WARN
107
pub fn foo() {}
118

129
#[doc(123)]
1310
//~^ ERROR invalid `doc` attribute
14-
//~| WARN
1511
#[doc("hello", "bar")]
1612
//~^ ERROR invalid `doc` attribute
17-
//~| WARN
1813
//~| ERROR invalid `doc` attribute
19-
//~| WARN
2014
#[doc(foo::bar, crate::bar::baz = "bye")]
2115
//~^ ERROR unknown `doc` attribute
22-
//~| WARN
2316
//~| ERROR unknown `doc` attribute
24-
//~| WARN
2517
fn bar() {}

‎tests/ui/attributes/doc-attr.stderr

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,46 @@
11
error: unknown `doc` attribute `as_ptr`
2-
--> $DIR/doc-attr.rs:7:7
2+
--> $DIR/doc-attr.rs:5:7
33
|
44
LL | #[doc(as_ptr)]
55
| ^^^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
9-
note: the lint level is defined here
10-
--> $DIR/doc-attr.rs:2:9
11-
|
12-
LL | #![deny(warnings)]
13-
| ^^^^^^^^
14-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
7+
= note: `#[deny(invalid_doc_attributes)]` on by default
158

169
error: invalid `doc` attribute
17-
--> $DIR/doc-attr.rs:12:7
10+
--> $DIR/doc-attr.rs:9:7
1811
|
1912
LL | #[doc(123)]
2013
| ^^^
21-
|
22-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
2414

2515
error: invalid `doc` attribute
26-
--> $DIR/doc-attr.rs:15:7
16+
--> $DIR/doc-attr.rs:11:7
2717
|
2818
LL | #[doc("hello", "bar")]
2919
| ^^^^^^^
30-
|
31-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
3320

3421
error: invalid `doc` attribute
35-
--> $DIR/doc-attr.rs:15:16
22+
--> $DIR/doc-attr.rs:11:16
3623
|
3724
LL | #[doc("hello", "bar")]
3825
| ^^^^^
39-
|
40-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
4226

4327
error: unknown `doc` attribute `foo::bar`
44-
--> $DIR/doc-attr.rs:20:7
28+
--> $DIR/doc-attr.rs:14:7
4529
|
4630
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
4731
| ^^^^^^^^
48-
|
49-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
50-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
5132

5233
error: unknown `doc` attribute `crate::bar::baz`
53-
--> $DIR/doc-attr.rs:20:17
34+
--> $DIR/doc-attr.rs:14:17
5435
|
5536
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
5637
| ^^^^^^^^^^^^^^^^^^^^^^^
57-
|
58-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
59-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
6038

6139
error: unknown `doc` attribute `as_ptr`
62-
--> $DIR/doc-attr.rs:3:8
40+
--> $DIR/doc-attr.rs:2:8
6341
|
6442
LL | #![doc(as_ptr)]
6543
| ^^^^^^
66-
|
67-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
68-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
6944

7045
error: aborting due to 7 previous errors
7146

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#![deny(warnings)]
2-
31
#![doc(test(""))]
42
//~^ ERROR `#![doc(test(...)]` does not take a literal
5-
//~^^ WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
63

74
fn main() {}
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
error: `#![doc(test(...)]` does not take a literal
2-
--> $DIR/doc-test-literal.rs:3:13
2+
--> $DIR/doc-test-literal.rs:1:13
33
|
44
LL | #![doc(test(""))]
55
| ^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
9-
note: the lint level is defined here
10-
--> $DIR/doc-test-literal.rs:1:9
11-
|
12-
LL | #![deny(warnings)]
13-
| ^^^^^^^^
14-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
7+
= note: `#[deny(invalid_doc_attributes)]` on by default
158

169
error: aborting due to 1 previous error
1710

‎tests/ui/future-incompatible-lint-group.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ trait Tr {
1111
pub mod submodule {
1212
// Error since this is a `future_incompatible` lint
1313
#![doc(test(some_test))]
14-
//~^ ERROR this attribute can only be applied at the crate level
15-
//~| WARN this was previously accepted by the compiler
14+
//~^ ERROR this attribute can only be applied at the crate level
1615
}
1716

1817
fn main() {}

‎tests/ui/future-incompatible-lint-group.stderr

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,8 @@ error: this attribute can only be applied at the crate level
1414
LL | #![doc(test(some_test))]
1515
| ^^^^^^^^^^^^^^^
1616
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1917
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
20-
note: the lint level is defined here
21-
--> $DIR/future-incompatible-lint-group.rs:3:9
22-
|
23-
LL | #![deny(future_incompatible)]
24-
| ^^^^^^^^^^^^^^^^^^^
25-
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(future_incompatible)]`
18+
= note: `#[deny(invalid_doc_attributes)]` on by default
2619

2720
error: aborting due to 1 previous error; 1 warning emitted
2821

‎tests/ui/repr/invalid_repr_list_help.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ pub enum OwO4 {
1717
}
1818

1919
#[repr(uwu)] //~ERROR: unrecognized representation hint
20-
#[doc(owo)] //~WARN: unknown `doc` attribute
21-
//~^ WARN: this was previously
20+
#[doc(owo)] //~ERROR: unknown `doc` attribute
2221
pub struct Owo5;

‎tests/ui/repr/invalid_repr_list_help.stderr

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ LL | #[repr(uwu, u8)]
3030
|
3131
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
3232

33-
warning: unknown `doc` attribute `owo`
33+
error: unknown `doc` attribute `owo`
3434
--> $DIR/invalid_repr_list_help.rs:20:7
3535
|
3636
LL | #[doc(owo)]
3737
| ^^^
3838
|
39-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
40-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
41-
= note: `#[warn(invalid_doc_attributes)]` on by default
39+
= note: `#[deny(invalid_doc_attributes)]` on by default
4240

4341
error[E0552]: unrecognized representation hint
4442
--> $DIR/invalid_repr_list_help.rs:19:8
@@ -48,6 +46,6 @@ LL | #[repr(uwu)]
4846
|
4947
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
5048

51-
error: aborting due to 5 previous errors; 1 warning emitted
49+
error: aborting due to 6 previous errors
5250

5351
For more information about this error, try `rustc --explain E0552`.

‎tests/ui/rustdoc/deny-invalid-doc-attrs.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
//~^ NOTE defined here
33
#![doc(x)]
44
//~^ ERROR unknown `doc` attribute `x`
5-
//~| WARNING will become a hard error
6-
//~| NOTE see issue #82730
75
fn main() {}

‎tests/ui/rustdoc/deny-invalid-doc-attrs.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ error: unknown `doc` attribute `x`
44
LL | #![doc(x)]
55
| ^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
97
note: the lint level is defined here
108
--> $DIR/deny-invalid-doc-attrs.rs:1:9
119
|

‎tests/ui/rustdoc/doc-primitive.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#[doc(primitive = "foo")]
44
//~^ ERROR unknown `doc` attribute `primitive`
5-
//~| WARN
65
mod bar {}
76

87
fn main() {}

‎tests/ui/rustdoc/doc-primitive.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ error: unknown `doc` attribute `primitive`
44
LL | #[doc(primitive = "foo")]
55
| ^^^^^^^^^^^^^^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
97
note: the lint level is defined here
108
--> $DIR/doc-primitive.rs:1:9
119
|

‎tests/ui/rustdoc/doc-test-attr.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33

44
#![doc(test)]
55
//~^ ERROR `#[doc(test(...)]` takes a list of attributes
6-
//~^^ WARN this was previously accepted by the compiler
76
#![doc(test = "hello")]
87
//~^ ERROR `#[doc(test(...)]` takes a list of attributes
9-
//~^^ WARN this was previously accepted by the compiler
108
#![doc(test(a))]
119
//~^ ERROR unknown `doc(test)` attribute `a`
12-
//~^^ WARN this was previously accepted by the compiler
1310

1411
pub fn foo() {}

‎tests/ui/rustdoc/doc-test-attr.stderr

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,23 @@ error: `#[doc(test(...)]` takes a list of attributes
44
LL | #![doc(test)]
55
| ^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
97
note: the lint level is defined here
108
--> $DIR/doc-test-attr.rs:2:9
119
|
1210
LL | #![deny(invalid_doc_attributes)]
1311
| ^^^^^^^^^^^^^^^^^^^^^^
1412

1513
error: `#[doc(test(...)]` takes a list of attributes
16-
--> $DIR/doc-test-attr.rs:7:8
14+
--> $DIR/doc-test-attr.rs:6:8
1715
|
1816
LL | #![doc(test = "hello")]
1917
| ^^^^^^^^^^^^^^
20-
|
21-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
2318

2419
error: unknown `doc(test)` attribute `a`
25-
--> $DIR/doc-test-attr.rs:10:13
20+
--> $DIR/doc-test-attr.rs:8:13
2621
|
2722
LL | #![doc(test(a))]
2823
| ^
29-
|
30-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31-
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
3224

3325
error: aborting due to 3 previous errors
3426

0 commit comments

Comments
 (0)
Please sign in to comment.