mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 21:17:39 +00:00
15 lines
254 B
Rust
15 lines
254 B
Rust
![]() |
pub fn bad(x: &mut bool) {
|
||
|
if true
|
||
|
*x = true {}
|
||
|
//~^ ERROR cannot multiply `bool` by `&mut bool`
|
||
|
}
|
||
|
|
||
|
pub fn bad2(x: &mut bool) {
|
||
|
let y: bool;
|
||
|
y = true
|
||
|
*x = true;
|
||
|
//~^ ERROR cannot multiply `bool` by `&mut bool`
|
||
|
}
|
||
|
|
||
|
fn main() {}
|