Add UI test for issue #92741

This commit is contained in:
CastilloDel 2023-02-05 17:30:00 +01:00
parent 3dd004470d
commit 9cdc07538d
3 changed files with 26 additions and 1 deletions

View File

@ -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")) {

View File

@ -0,0 +1,6 @@
fn main() {}
fn foo() -> bool {
& //~ ERROR 3:5: 5:36: mismatched types [E0308]
mut
if true { true } else { false }
}

View File

@ -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`.