diff options
| -rw-r--r-- | src/tools/tidy/src/ui_tests.rs | 2 | ||||
| -rw-r--r-- | tests/ui/issues/issue-92741.rs | 6 | ||||
| -rw-r--r-- | tests/ui/issues/issue-92741.stderr | 19 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 806e84025c4..ba20c77a7d1 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -10,7 +10,7 @@ use std::path::Path; const ENTRY_LIMIT: usize = 1000; // FIXME: The following limits should be reduced eventually. const ROOT_ENTRY_LIMIT: usize = 939; -const ISSUES_ENTRY_LIMIT: usize = 1998; +const ISSUES_ENTRY_LIMIT: usize = 2000; fn check_entries(path: &Path, bad: &mut bool) { for dir in Walk::new(&path.join("ui")) { diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/issues/issue-92741.rs new file mode 100644 index 00000000000..c42d4338fc1 --- /dev/null +++ b/tests/ui/issues/issue-92741.rs @@ -0,0 +1,6 @@ +fn main() {} +fn foo() -> bool { + & //~ ERROR 3:5: 5:36: mismatched types [E0308] + mut + if true { true } else { false } +} diff --git a/tests/ui/issues/issue-92741.stderr b/tests/ui/issues/issue-92741.stderr new file mode 100644 index 00000000000..9459757d38f --- /dev/null +++ b/tests/ui/issues/issue-92741.stderr @@ -0,0 +1,19 @@ +error[E0308]: mismatched types + --> $DIR/issue-92741.rs:3:5 + | +LL | fn foo() -> bool { + | ---- expected `bool` because of return type +LL | / & +LL | | mut +LL | | if true { true } else { false } + | |___________________________________^ expected `bool`, found `&mut bool` + | +help: consider removing the borrow + | +LL - & +LL - mut + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. |
