mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Add UI test for issue #92741
This commit is contained in:
parent
3dd004470d
commit
9cdc07538d
@ -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")) {
|
||||
|
6
tests/ui/issues/issue-92741.rs
Normal file
6
tests/ui/issues/issue-92741.rs
Normal file
@ -0,0 +1,6 @@
|
||||
fn main() {}
|
||||
fn foo() -> bool {
|
||||
& //~ ERROR 3:5: 5:36: mismatched types [E0308]
|
||||
mut
|
||||
if true { true } else { false }
|
||||
}
|
19
tests/ui/issues/issue-92741.stderr
Normal file
19
tests/ui/issues/issue-92741.stderr
Normal 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`.
|
Loading…
Reference in New Issue
Block a user