-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add a text to unreachable!()
#4986
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
error[E0465]: multiple rlib candidates for `regex` found | ||
| | ||
= note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib | ||
= note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib | ||
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
error[E0425]: cannot find function `f` in this scope | ||
--> $DIR/for_loop_unfixable.rs:37:12 | ||
| | ||
LL | if f(&vec[i], &vec[i]) { | ||
| ^ help: a local variable with a similar name exists: `i` | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
error[E0465]: multiple rlib candidates for `regex` found | ||
| | ||
= note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib | ||
= note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib | ||
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks again. |
||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/option_map_unit_fn_unfixable.rs:17:5 | ||
| | ||
|
@@ -22,6 +27,6 @@ error[E0425]: cannot find value `x` in this scope | |
LL | x.field.map(|value| { do_nothing(value); do_nothing(value); }); | ||
| ^ not found in this scope | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 5 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,171 +1,26 @@ | ||
error: trivial regex | ||
--> $DIR/regex.rs:13:45 | ||
error[E0465]: multiple rlib candidates for `regex` found | ||
--> $DIR/regex.rs:4:1 | ||
| | ||
LL | let pipe_in_wrong_position = Regex::new("|"); | ||
| ^^^ | ||
LL | extern crate regex; | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::trivial-regex` implied by `-D warnings` | ||
= help: the regex is unlikely to be useful as it is | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:14:60 | ||
| | ||
LL | let pipe_in_wrong_position_builder = RegexBuilder::new("|"); | ||
| ^^^ | ||
| | ||
= help: the regex is unlikely to be useful as it is | ||
|
||
error: regex syntax error: invalid character class range, the start must be <= the end | ||
--> $DIR/regex.rs:15:42 | ||
| | ||
LL | let wrong_char_ranice = Regex::new("[z-a]"); | ||
| ^^^ | ||
| | ||
= note: `-D clippy::invalid-regex` implied by `-D warnings` | ||
|
||
error: regex syntax error: invalid character class range, the start must be <= the end | ||
--> $DIR/regex.rs:16:37 | ||
| | ||
LL | let some_unicode = Regex::new("[é-è]"); | ||
| ^^^ | ||
|
||
error: regex syntax error on position 0: unclosed group | ||
--> $DIR/regex.rs:18:33 | ||
| | ||
LL | let some_regex = Regex::new(OPENING_PAREN); | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:20:53 | ||
| | ||
LL | let binary_pipe_in_wrong_position = BRegex::new("|"); | ||
| ^^^ | ||
| | ||
= help: the regex is unlikely to be useful as it is | ||
|
||
error: regex syntax error on position 0: unclosed group | ||
--> $DIR/regex.rs:21:41 | ||
| | ||
LL | let some_binary_regex = BRegex::new(OPENING_PAREN); | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: regex syntax error on position 0: unclosed group | ||
--> $DIR/regex.rs:22:56 | ||
| | ||
LL | let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN); | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: regex syntax error on position 0: unclosed group | ||
--> $DIR/regex.rs:34:37 | ||
| | ||
LL | let set_error = RegexSet::new(&[OPENING_PAREN, r"[a-z]+/.(com|org|net)"]); | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: regex syntax error on position 0: unclosed group | ||
--> $DIR/regex.rs:35:39 | ||
| | ||
LL | let bset_error = BRegexSet::new(&[OPENING_PAREN, r"[a-z]+/.(com|org|net)"]); | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: regex syntax error: unrecognized escape sequence | ||
--> $DIR/regex.rs:37:45 | ||
| | ||
LL | let raw_string_error = Regex::new(r"[...//...]"); | ||
| ^^ | ||
|
||
error: regex syntax error: unrecognized escape sequence | ||
--> $DIR/regex.rs:38:46 | ||
| | ||
LL | let raw_string_error = Regex::new(r#"[...//...]"#); | ||
| ^^ | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:42:33 | ||
| | ||
LL | let trivial_eq = Regex::new("^foobar$"); | ||
| ^^^^^^^^^^ | ||
note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, it depends on your environment. Shouldn't be changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I usually do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review. I will fix this. |
||
--> $DIR/regex.rs:4:1 | ||
| | ||
= help: consider using `==` on `str`s | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:44:48 | ||
| | ||
LL | let trivial_eq_builder = RegexBuilder::new("^foobar$"); | ||
| ^^^^^^^^^^ | ||
| | ||
= help: consider using `==` on `str`s | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:46:42 | ||
| | ||
LL | let trivial_starts_with = Regex::new("^foobar"); | ||
| ^^^^^^^^^ | ||
| | ||
= help: consider using `str::starts_with` | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:48:40 | ||
| | ||
LL | let trivial_ends_with = Regex::new("foobar$"); | ||
| ^^^^^^^^^ | ||
| | ||
= help: consider using `str::ends_with` | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:50:39 | ||
| | ||
LL | let trivial_contains = Regex::new("foobar"); | ||
| ^^^^^^^^ | ||
| | ||
= help: consider using `str::contains` | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:52:39 | ||
| | ||
LL | let trivial_contains = Regex::new(NOT_A_REAL_REGEX); | ||
| ^^^^^^^^^^^^^^^^ | ||
LL | extern crate regex; | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib | ||
--> $DIR/regex.rs:4:1 | ||
| | ||
= help: consider using `str::contains` | ||
LL | extern crate regex; | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:54:40 | ||
| | ||
LL | let trivial_backslash = Regex::new("a/.b"); | ||
| ^^^^^^^ | ||
| | ||
= help: consider using `str::contains` | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:57:36 | ||
| | ||
LL | let trivial_empty = Regex::new(""); | ||
| ^^ | ||
| | ||
= help: the regex is unlikely to be useful as it is | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:59:36 | ||
| | ||
LL | let trivial_empty = Regex::new("^"); | ||
| ^^^ | ||
| | ||
= help: the regex is unlikely to be useful as it is | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:61:36 | ||
| | ||
LL | let trivial_empty = Regex::new("^$"); | ||
| ^^^^ | ||
| | ||
= help: consider using `str::is_empty` | ||
|
||
error: trivial regex | ||
--> $DIR/regex.rs:63:44 | ||
| | ||
LL | let binary_trivial_empty = BRegex::new("^$"); | ||
| ^^^^ | ||
error[E0463]: can't find crate for `regex` | ||
--> $DIR/regex.rs:4:1 | ||
| | ||
= help: consider using `str::is_empty` | ||
LL | extern crate regex; | ||
| ^^^^^^^^^^^^^^^^^^^ can't find crate | ||
|
||
error: aborting due to 23 previous errors | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0463`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
error[E0465]: multiple rlib candidates for `regex` found | ||
| | ||
= note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib | ||
= note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib | ||
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/result_map_unit_fn_unfixable.rs:17:5 | ||
| | ||
|
@@ -22,6 +27,6 @@ error[E0425]: cannot find value `x` in this scope | |
LL | x.field.map(|value| { do_nothing(value); do_nothing(value); }); | ||
| ^ not found in this scope | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 5 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was not, what the issue was talking about. Anyway, the requested lint already exists, so I don't think there is anything that needs to be done here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review and sorry for the misunderstanding. I will fix this.