about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/issues/issue-92741.fixed13
-rw-r--r--tests/ui/issues/issue-92741.rs13
-rw-r--r--tests/ui/issues/issue-92741.stderr18
3 files changed, 29 insertions, 15 deletions
diff --git a/tests/ui/issues/issue-92741.fixed b/tests/ui/issues/issue-92741.fixed
new file mode 100644
index 00000000000..d07aeb6c029
--- /dev/null
+++ b/tests/ui/issues/issue-92741.fixed
@@ -0,0 +1,13 @@
+// run-rustfix
+fn main() {}
+fn _foo() -> bool {
+    if true { true } else { false }
+}
+
+fn _bar() -> bool {
+    if true { true } else { false }
+}
+
+fn _baz() -> bool {
+    if true { true } else { false }
+}
diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/issues/issue-92741.rs
index 4e18918c1cf..413d5bf0478 100644
--- a/tests/ui/issues/issue-92741.rs
+++ b/tests/ui/issues/issue-92741.rs
@@ -1,16 +1,17 @@
+// run-rustfix
 fn main() {}
-fn foo() -> bool {
-    &  //~ ERROR 3:5: 5:36: mismatched types [E0308]
+fn _foo() -> bool {
+    &  //~ ERROR 4:5: 6:36: mismatched types [E0308]
     mut
     if true { true } else { false }
 }
 
-fn bar() -> bool {
-    &  //~ ERROR 9:5: 10:40: mismatched types [E0308]
+fn _bar() -> bool {
+    &  //~ ERROR 10:5: 11:40: mismatched types [E0308]
     mut if true { true } else { false }
 }
 
-fn baz() -> bool {
-    & mut //~ ERROR 14:5: 15:36: mismatched types [E0308]
+fn _baz() -> bool {
+    & mut //~ ERROR 15:5: 16:36: mismatched types [E0308]
     if true { true } else { false }
 }
diff --git a/tests/ui/issues/issue-92741.stderr b/tests/ui/issues/issue-92741.stderr
index 7716a10cde0..49315e7a8bf 100644
--- a/tests/ui/issues/issue-92741.stderr
+++ b/tests/ui/issues/issue-92741.stderr
@@ -1,8 +1,8 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:3:5
+  --> $DIR/issue-92741.rs:4:5
    |
-LL |   fn foo() -> bool {
-   |               ---- expected `bool` because of return type
+LL |   fn _foo() -> bool {
+   |                ---- expected `bool` because of return type
 LL | /     &
 LL | |     mut
 LL | |     if true { true } else { false }
@@ -15,10 +15,10 @@ LL -     mut
    |
 
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:9:5
+  --> $DIR/issue-92741.rs:10:5
    |
-LL |   fn bar() -> bool {
-   |               ---- expected `bool` because of return type
+LL |   fn _bar() -> bool {
+   |                ---- expected `bool` because of return type
 LL | /     &
 LL | |     mut if true { true } else { false }
    | |_______________________________________^ expected `bool`, found `&mut bool`
@@ -31,10 +31,10 @@ LL +     if true { true } else { false }
    |
 
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:14:5
+  --> $DIR/issue-92741.rs:15:5
    |
-LL |   fn baz() -> bool {
-   |               ---- expected `bool` because of return type
+LL |   fn _baz() -> bool {
+   |                ---- expected `bool` because of return type
 LL | /     & mut
 LL | |     if true { true } else { false }
    | |___________________________________^ expected `bool`, found `&mut bool`