fork/rust

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

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

master
655 B19 linesraw
1// run-rustfix
2#![allow(unused)]
3
4struct S {
5    f: String,
6}
7
8fn main() {
9    let ref _moved @ ref _from = String::from("foo"); //~ ERROR
10    let ref _moved @ ref _from = String::from("foo"); //~ ERROR
11    let ref _moved @ ref _from = String::from("foo"); //~ ERROR
12    //~^ ERROR
13    let ref _moved @ ref _from = String::from("foo"); // ok
14    let ref _moved @ S { ref f } = S { f: String::from("foo") }; //~ ERROR
15    let ref _moved @ S { ref f } = S { f: String::from("foo") }; //~ ERROR
16    //~^ ERROR
17    let ref _moved @ S { ref f } = S { f: String::from("foo") }; // ok
18    let ref _moved @ S { ref f } = S { f: String::from("foo") }; //~ ERROR
19}