Skip to content

Commit

Permalink
Auto merge of rust-lang#112198 - compiler-errors:rollup-o2xe4of, r=co…
Browse files Browse the repository at this point in the history
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#111670 (Require that const param tys implement `ConstParamTy`)
 - rust-lang#111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…)
 - rust-lang#112030 (Migrate `item_trait_alias` to Askama)
 - rust-lang#112150 (Support 128-bit atomics on all x86_64 Apple targets)
 - rust-lang#112174 (Fix broken link)
 - rust-lang#112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.)
 - rust-lang#112193 (Check tuple elements are `Sized` in `offset_of`)

Failed merges:

 - rust-lang#112071 (Group rfcs tests)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jun 2, 2023
2 parents ec2c615 + b4f074c commit 427a453
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion tests/ui/same_functions_in_if_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
clippy::uninlined_format_args
)]

use std::marker::ConstParamTy;

fn function() -> bool {
true
}
Expand Down Expand Up @@ -96,7 +98,7 @@ fn main() {
};
println!("{}", os);

#[derive(PartialEq, Eq)]
#[derive(PartialEq, Eq, ConstParamTy)]
enum E {
A,
B,
Expand Down
24 changes: 12 additions & 12 deletions tests/ui/same_functions_in_if_condition.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: this `if` has the same function call as a previous `if`
--> $DIR/same_functions_in_if_condition.rs:37:15
--> $DIR/same_functions_in_if_condition.rs:39:15
|
LL | } else if function() {
| ^^^^^^^^^^
|
note: same as this
--> $DIR/same_functions_in_if_condition.rs:36:8
--> $DIR/same_functions_in_if_condition.rs:38:8
|
LL | if function() {
| ^^^^^^^^^^
Expand All @@ -16,61 +16,61 @@ LL | #![deny(clippy::same_functions_in_if_condition)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this `if` has the same function call as a previous `if`
--> $DIR/same_functions_in_if_condition.rs:42:15
--> $DIR/same_functions_in_if_condition.rs:44:15
|
LL | } else if fn_arg(a) {
| ^^^^^^^^^
|
note: same as this
--> $DIR/same_functions_in_if_condition.rs:41:8
--> $DIR/same_functions_in_if_condition.rs:43:8
|
LL | if fn_arg(a) {
| ^^^^^^^^^

error: this `if` has the same function call as a previous `if`
--> $DIR/same_functions_in_if_condition.rs:47:15
--> $DIR/same_functions_in_if_condition.rs:49:15
|
LL | } else if obj.method() {
| ^^^^^^^^^^^^
|
note: same as this
--> $DIR/same_functions_in_if_condition.rs:46:8
--> $DIR/same_functions_in_if_condition.rs:48:8
|
LL | if obj.method() {
| ^^^^^^^^^^^^

error: this `if` has the same function call as a previous `if`
--> $DIR/same_functions_in_if_condition.rs:52:15
--> $DIR/same_functions_in_if_condition.rs:54:15
|
LL | } else if obj.method_arg(a) {
| ^^^^^^^^^^^^^^^^^
|
note: same as this
--> $DIR/same_functions_in_if_condition.rs:51:8
--> $DIR/same_functions_in_if_condition.rs:53:8
|
LL | if obj.method_arg(a) {
| ^^^^^^^^^^^^^^^^^

error: this `if` has the same function call as a previous `if`
--> $DIR/same_functions_in_if_condition.rs:59:15
--> $DIR/same_functions_in_if_condition.rs:61:15
|
LL | } else if v.pop().is_none() {
| ^^^^^^^^^^^^^^^^^
|
note: same as this
--> $DIR/same_functions_in_if_condition.rs:57:8
--> $DIR/same_functions_in_if_condition.rs:59:8
|
LL | if v.pop().is_none() {
| ^^^^^^^^^^^^^^^^^

error: this `if` has the same function call as a previous `if`
--> $DIR/same_functions_in_if_condition.rs:64:15
--> $DIR/same_functions_in_if_condition.rs:66:15
|
LL | } else if v.len() == 42 {
| ^^^^^^^^^^^^^
|
note: same as this
--> $DIR/same_functions_in_if_condition.rs:62:8
--> $DIR/same_functions_in_if_condition.rs:64:8
|
LL | if v.len() == 42 {
| ^^^^^^^^^^^^^
Expand Down

0 comments on commit 427a453

Please sign in to comment.