Skip to content

Commit a7b7219

Browse files
authoredOct 6, 2020
Rollup merge of rust-lang#77534 - Mark-Simulacrum:issue-70819-disallow-override-forbid-in-same-scope, r=petrochenkov
Disallow overriding forbid in same scope Rebased rust-lang#73379. Fixes rust-lang#70819.
2 parents 29d43f6 + 5747c15 commit a7b7219

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed
 

‎tests/ui/attrs.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Test that the whole restriction group is not enabled
44
#![warn(clippy::restriction)]
55
#![deny(clippy::restriction)]
6-
#![forbid(clippy::restriction)]
76
#![allow(clippy::missing_docs_in_private_items, clippy::panic, clippy::unreachable)]
87

98
#[inline(always)]

‎tests/ui/attrs.stderr

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error: you have declared `#[inline(always)]` on `test_attr_lint`. This is usually a bad idea
2-
--> $DIR/attrs.rs:9:1
2+
--> $DIR/attrs.rs:8:1
33
|
44
LL | #[inline(always)]
55
| ^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::inline-always` implied by `-D warnings`
88

99
error: the since field must contain a semver-compliant version
10-
--> $DIR/attrs.rs:29:14
10+
--> $DIR/attrs.rs:28:14
1111
|
1212
LL | #[deprecated(since = "forever")]
1313
| ^^^^^^^^^^^^^^^^^
1414
|
1515
= note: `-D clippy::deprecated-semver` implied by `-D warnings`
1616

1717
error: the since field must contain a semver-compliant version
18-
--> $DIR/attrs.rs:32:14
18+
--> $DIR/attrs.rs:31:14
1919
|
2020
LL | #[deprecated(since = "1")]
2121
| ^^^^^^^^^^^
@@ -37,13 +37,5 @@ LL | #![deny(clippy::restriction)]
3737
|
3838
= help: try enabling only the lints you really need
3939

40-
error: restriction lints are not meant to be all enabled
41-
--> $DIR/attrs.rs:6:11
42-
|
43-
LL | #![forbid(clippy::restriction)]
44-
| ^^^^^^^^^^^^^^^^^^^
45-
|
46-
= help: try enabling only the lints you really need
47-
48-
error: aborting due to 6 previous errors
40+
error: aborting due to 5 previous errors
4941

0 commit comments

Comments
 (0)
Please sign in to comment.