fork/rust

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

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

master
364 B28 linesraw
1// run-rustfix
2
3//issue #106496
4
5struct S;
6
7trait X {}
8impl X for S {}
9
10fn foo<T: X>(_: &T) {}
11fn test_foo() {
12    let hello = &S;
13    foo(hello);
14    //~^ ERROR mismatched types
15}
16
17fn bar(_: &String) {}
18fn test_bar() {
19    let v = String::from("hello");
20    let s = &v;
21    bar(s);
22    //~^ ERROR mismatched types
23}
24
25fn main() {
26    test_foo();
27    test_bar();
28}