Add run-rustfix
to tests/ui/issues/issue-92741.rs
This commit is contained in:
parent
039f70e926
commit
f0830c0ade
@ -10,7 +10,7 @@
|
|||||||
const ENTRY_LIMIT: usize = 1000;
|
const ENTRY_LIMIT: usize = 1000;
|
||||||
// FIXME: The following limits should be reduced eventually.
|
// FIXME: The following limits should be reduced eventually.
|
||||||
const ROOT_ENTRY_LIMIT: usize = 939;
|
const ROOT_ENTRY_LIMIT: usize = 939;
|
||||||
const ISSUES_ENTRY_LIMIT: usize = 2000;
|
const ISSUES_ENTRY_LIMIT: usize = 2001;
|
||||||
|
|
||||||
fn check_entries(path: &Path, bad: &mut bool) {
|
fn check_entries(path: &Path, bad: &mut bool) {
|
||||||
for dir in Walk::new(&path.join("ui")) {
|
for dir in Walk::new(&path.join("ui")) {
|
||||||
|
13
tests/ui/issues/issue-92741.fixed
Normal file
13
tests/ui/issues/issue-92741.fixed
Normal file
@ -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 }
|
||||||
|
}
|
@ -1,16 +1,17 @@
|
|||||||
|
// run-rustfix
|
||||||
fn main() {}
|
fn main() {}
|
||||||
fn foo() -> bool {
|
fn _foo() -> bool {
|
||||||
& //~ ERROR 3:5: 5:36: mismatched types [E0308]
|
& //~ ERROR 4:5: 6:36: mismatched types [E0308]
|
||||||
mut
|
mut
|
||||||
if true { true } else { false }
|
if true { true } else { false }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bar() -> bool {
|
fn _bar() -> bool {
|
||||||
& //~ ERROR 9:5: 10:40: mismatched types [E0308]
|
& //~ ERROR 10:5: 11:40: mismatched types [E0308]
|
||||||
mut if true { true } else { false }
|
mut if true { true } else { false }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn baz() -> bool {
|
fn _baz() -> bool {
|
||||||
& mut //~ ERROR 14:5: 15:36: mismatched types [E0308]
|
& mut //~ ERROR 15:5: 16:36: mismatched types [E0308]
|
||||||
if true { true } else { false }
|
if true { true } else { false }
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/issue-92741.rs:3:5
|
--> $DIR/issue-92741.rs:4:5
|
||||||
|
|
|
|
||||||
LL | fn foo() -> bool {
|
LL | fn _foo() -> bool {
|
||||||
| ---- expected `bool` because of return type
|
| ---- expected `bool` because of return type
|
||||||
LL | / &
|
LL | / &
|
||||||
LL | | mut
|
LL | | mut
|
||||||
LL | | if true { true } else { false }
|
LL | | if true { true } else { false }
|
||||||
@ -15,10 +15,10 @@ LL - mut
|
|||||||
|
|
|
|
||||||
|
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/issue-92741.rs:9:5
|
--> $DIR/issue-92741.rs:10:5
|
||||||
|
|
|
|
||||||
LL | fn bar() -> bool {
|
LL | fn _bar() -> bool {
|
||||||
| ---- expected `bool` because of return type
|
| ---- expected `bool` because of return type
|
||||||
LL | / &
|
LL | / &
|
||||||
LL | | mut if true { true } else { false }
|
LL | | mut if true { true } else { false }
|
||||||
| |_______________________________________^ expected `bool`, found `&mut bool`
|
| |_______________________________________^ expected `bool`, found `&mut bool`
|
||||||
@ -31,10 +31,10 @@ LL + if true { true } else { false }
|
|||||||
|
|
|
|
||||||
|
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/issue-92741.rs:14:5
|
--> $DIR/issue-92741.rs:15:5
|
||||||
|
|
|
|
||||||
LL | fn baz() -> bool {
|
LL | fn _baz() -> bool {
|
||||||
| ---- expected `bool` because of return type
|
| ---- expected `bool` because of return type
|
||||||
LL | / & mut
|
LL | / & mut
|
||||||
LL | | if true { true } else { false }
|
LL | | if true { true } else { false }
|
||||||
| |___________________________________^ expected `bool`, found `&mut bool`
|
| |___________________________________^ expected `bool`, found `&mut bool`
|
||||||
|
Loading…
Reference in New Issue
Block a user