Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #81761

Merged
merged 25 commits into from
Feb 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b6b897b
introduce future-compatibility warning for forbidden lint groups
nikomatsakis Jan 30, 2021
4d1efb7
OsStr eq_ignore_ascii_case takes arg by value
TyPR124 Feb 3, 2021
d3d0fb7
add #[inline] to all the public IpAddr functions
saethlin Feb 3, 2021
2c8bf1d
Stabilize the Wake trait
yoshuawuyts Jan 22, 2021
3719247
move test to be with the others
mark-i-m Feb 3, 2021
8988238
Revert stabilizing integer::BITS.
m-ou-se Feb 3, 2021
a616f82
Add lint for `panic!(123)` which is not accepted in Rust 2021.
m-ou-se Feb 1, 2021
34d5ac2
Make panic/assert calls in rustc compatible with Rust 2021.
m-ou-se Feb 1, 2021
e9ad5be
Allow/fix non_fmt_panic in tests.
m-ou-se Feb 1, 2021
753b0b0
Update panic!() documentation about non-string panics.
m-ou-se Feb 2, 2021
3f3eb89
Fix/allow non_fmt_panic in clippy tests.
m-ou-se Feb 2, 2021
0870c15
Suggest panic!("{}", ..) instead of panic!(..) clippy::expect_fun_call.
m-ou-se Feb 3, 2021
5c056ed
Rename Iterator::fold_first to reduce.
m-ou-se Dec 7, 2020
26af55f
Improve documentation of Iterator::{fold, reduce}.
m-ou-se Dec 7, 2020
24e0940
Stabilize feature(iterator_fold_self): Iterator::reduce
m-ou-se Dec 7, 2020
f42e961
Stabilize poison API of Once, rename poisoned()
Kixunil Feb 4, 2021
d20d097
Rollup merge of #74304 - yoshuawuyts:stabilize-wake, r=KodrAus
m-ou-se Feb 4, 2021
5b0acfd
Rollup merge of #79805 - m-ou-se:iterator-reduce, r=KodrAus
m-ou-se Feb 4, 2021
c5990dd
Rollup merge of #81556 - nikomatsakis:forbidden-lint-groups-lint, r=p…
m-ou-se Feb 4, 2021
87b269a
Rollup merge of #81645 - m-ou-se:panic-lint, r=estebank,flip1995
m-ou-se Feb 4, 2021
21e5827
Rollup merge of #81710 - TyPR124:patch-2, r=m-ou-se
m-ou-se Feb 4, 2021
e0ddc05
Rollup merge of #81711 - saethlin:ipaddr-inline, r=m-ou-se
m-ou-se Feb 4, 2021
83e0fe3
Rollup merge of #81725 - mark-i-m:mv-test, r=Mark-Simulacrum
m-ou-se Feb 4, 2021
113e27f
Rollup merge of #81727 - m-ou-se:unstabilize-bits, r=Mark-Simulacrum
m-ou-se Feb 4, 2021
6f014cd
Rollup merge of #81745 - Kixunil:stabilize_once_poison, r=m-ou-se
m-ou-se Feb 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/tools/clippy/tests/missing-test-files.rs
Original file line number Diff line number Diff line change
@@ -9,14 +9,12 @@ fn test_missing_tests() {
if !missing_files.is_empty() {
assert!(
false,
format!(
"Didn't see a test file for the following files:\n\n{}\n",
missing_files
.iter()
.map(|s| format!("\t{}", s))
.collect::<Vec<_>>()
.join("\n")
)
"Didn't see a test file for the following files:\n\n{}\n",
missing_files
.iter()
.map(|s| format!("\t{}", s))
.collect::<Vec<_>>()
.join("\n")
);
}
}
2 changes: 2 additions & 0 deletions src/tools/clippy/tests/ui/assertions_on_constants.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(non_fmt_panic)]

macro_rules! assert_const {
($len:expr) => {
assert!($len > 0);
18 changes: 9 additions & 9 deletions src/tools/clippy/tests/ui/assertions_on_constants.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:9:5
--> $DIR/assertions_on_constants.rs:11:5
|
LL | assert!(true);
| ^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | assert!(true);
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(false)` should probably be replaced
--> $DIR/assertions_on_constants.rs:10:5
--> $DIR/assertions_on_constants.rs:12:5
|
LL | assert!(false);
| ^^^^^^^^^^^^^^^
@@ -18,7 +18,7 @@ LL | assert!(false);
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:11:5
--> $DIR/assertions_on_constants.rs:13:5
|
LL | assert!(true, "true message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -27,7 +27,7 @@ LL | assert!(true, "true message");
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(false, "false message")` should probably be replaced
--> $DIR/assertions_on_constants.rs:12:5
--> $DIR/assertions_on_constants.rs:14:5
|
LL | assert!(false, "false message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -36,7 +36,7 @@ LL | assert!(false, "false message");
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(false, msg.to_uppercase())` should probably be replaced
--> $DIR/assertions_on_constants.rs:15:5
--> $DIR/assertions_on_constants.rs:17:5
|
LL | assert!(false, msg.to_uppercase());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -45,7 +45,7 @@ LL | assert!(false, msg.to_uppercase());
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:18:5
--> $DIR/assertions_on_constants.rs:20:5
|
LL | assert!(B);
| ^^^^^^^^^^^
@@ -54,7 +54,7 @@ LL | assert!(B);
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(false)` should probably be replaced
--> $DIR/assertions_on_constants.rs:21:5
--> $DIR/assertions_on_constants.rs:23:5
|
LL | assert!(C);
| ^^^^^^^^^^^
@@ -63,7 +63,7 @@ LL | assert!(C);
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `assert!(false, "C message")` should probably be replaced
--> $DIR/assertions_on_constants.rs:22:5
--> $DIR/assertions_on_constants.rs:24:5
|
LL | assert!(C, "C message");
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ LL | assert!(C, "C message");
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: `debug_assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:24:5
--> $DIR/assertions_on_constants.rs:26:5
|
LL | debug_assert!(true);
| ^^^^^^^^^^^^^^^^^^^^
2 changes: 1 addition & 1 deletion src/tools/clippy/tests/ui/fallible_impl_from.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ impl From<Option<String>> for Invalid {
fn from(s: Option<String>) -> Invalid {
let s = s.unwrap();
if !s.is_empty() {
panic!(42);
panic!("42");
} else if s.parse::<u32>().unwrap() != 42 {
panic!("{:?}", s);
}
4 changes: 2 additions & 2 deletions src/tools/clippy/tests/ui/fallible_impl_from.stderr
Original file line number Diff line number Diff line change
@@ -59,8 +59,8 @@ note: potential failure(s)
LL | let s = s.unwrap();
| ^^^^^^^^^^
LL | if !s.is_empty() {
LL | panic!(42);
| ^^^^^^^^^^^
LL | panic!("42");
| ^^^^^^^^^^^^^
LL | } else if s.parse::<u32>().unwrap() != 42 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | panic!("{:?}", s);