fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0425]: cannot find value `config` in this scope 2 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:7:16 3 | 4LL | config: String, 5 | -------------- a field by that name exists in `Self` 6... 7LL | Self { config } 8 | ^^^^^^ help: a local variable with a similar name exists: `cofig` 9 10error[E0425]: cannot find value `config` in this scope 11 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:11:20 12 | 13LL | config: String, 14 | -------------- a field by that name exists in `Self` 15... 16LL | println!("{config}"); 17 | ^^^^^^ help: a local variable with a similar name exists: `cofig` 18 19error[E0425]: cannot find value `config` in this scope 20 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:15:20 21 | 22LL | println!("{config}"); 23 | ^^^^^^ 24 | 25help: you might have meant to use the available field 26 | 27LL | println!("{self.config}"); 28 | +++++ 29help: a local variable with a similar name exists 30 | 31LL | println!("{cofig}"); 32 | ~~~~~ 33 34error[E0425]: cannot find value `bah` in this scope 35 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:33:9 36 | 37LL | bah; 38 | ^^^ 39... 40LL | fn ba() {} 41 | ------- similarly named function `ba` defined here 42 | 43help: you might have meant to refer to the associated function 44 | 45LL | Self::bah; 46 | ++++++ 47help: a function with a similar name exists 48 | 49LL | ba; 50 | ~~ 51 52error[E0425]: cannot find value `BAR` in this scope 53 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:35:9 54 | 55LL | BAR; 56 | ^^^ 57... 58LL | const BARR: u32 = 3; 59 | -------------------- similarly named constant `BARR` defined here 60 | 61help: you might have meant to use the associated `const` 62 | 63LL | Self::BAR; 64 | ++++++ 65help: a constant with a similar name exists 66 | 67LL | BARR; 68 | ~~~~ 69 70error[E0412]: cannot find type `Baz` in this scope 71 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:37:18 72 | 73LL | let foo: Baz = "".to_string(); 74 | ^^^ 75... 76LL | type Bar = String; 77 | ------------------ similarly named type alias `Bar` defined here 78 | 79help: you might have meant to use the associated type 80 | 81LL | let foo: Self::Baz = "".to_string(); 82 | ++++++ 83help: a type alias with a similar name exists 84 | 85LL | let foo: Bar = "".to_string(); 86 | ~~~ 87 88error[E0425]: cannot find function `baz` in this scope 89 --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:31:9 90 | 91LL | baz(); 92 | ^^^ 93... 94LL | fn ba() {} 95 | ------- similarly named function `ba` defined here 96 | 97help: you might have meant to call the method 98 | 99LL | self.baz(); 100 | +++++ 101help: a function with a similar name exists 102 | 103LL | ba(); 104 | ~~ 105 106error: aborting due to 7 previous errors 107 108Some errors have detailed explanations: E0412, E0425. 109For more information about an error, try `rustc --explain E0412`.