fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
389 B29 linesraw
1// run-rustfix
2#![allow(dead_code)]
3
4struct Foo {
5    t: Thing
6}
7
8#[derive(Clone)]
9struct Thing;
10
11fn test_clone() {
12    let t = &Thing;
13    let _f = Foo {
14        t: t.clone() //~ ERROR mismatched types
15    };
16}
17
18struct Bar {
19    t: bool
20}
21
22fn test_is_some() {
23    let t = Option::<i32>::Some(1);
24    let _f = Bar {
25        t: t.is_some() //~ ERROR mismatched types
26    };
27}
28
29fn main() {}