summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-108470.rs
blob: bda39085d4db5d4ad68ce599eae27812e437042e (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 //~ ERROR mismatched types
    };
}

struct Bar {
    t: bool
}

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

fn main() {}