summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-108470.fixed
blob: 9d15c4a8fcb9088579cb0b2f2accce92d56b495e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// run-rustfix
#![allow(dead_code)]

struct Foo {
    t: Thing
}

#[derive(Clone)]
struct Thing;

fn test_clone() {
    let t = &Thing;
    let _f = Foo {
        t: t.clone() //~ ERROR mismatched types
    };
}

struct Bar {
    t: bool
}

fn test_is_some() {
    let t = Option::<i32>::Some(1);
    let _f = Bar {
        t: t.is_some() //~ ERROR mismatched types
    };
}

fn main() {}