Skip to content

Commit 9cdc075

Browse files
committed
Add UI test for issue rust-lang#92741
1 parent 3dd0044 commit 9cdc075

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::path::Path;
1010
const ENTRY_LIMIT: usize = 1000;
1111
// FIXME: The following limits should be reduced eventually.
1212
const ROOT_ENTRY_LIMIT: usize = 939;
13-
const ISSUES_ENTRY_LIMIT: usize = 1998;
13+
const ISSUES_ENTRY_LIMIT: usize = 2000;
1414

1515
fn check_entries(path: &Path, bad: &mut bool) {
1616
for dir in Walk::new(&path.join("ui")) {

tests/ui/issues/issue-92741.rs

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

tests/ui/issues/issue-92741.stderr

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-92741.rs:3:5
3+
|
4+
LL | fn foo() -> bool {
5+
| ---- expected `bool` because of return type
6+
LL | / &
7+
LL | | mut
8+
LL | | if true { true } else { false }
9+
| |___________________________________^ expected `bool`, found `&mut bool`
10+
|
11+
help: consider removing the borrow
12+
|
13+
LL - &
14+
LL - mut
15+
|
16+
17+
error: aborting due to previous error
18+
19+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)