Output
$ rustc LicensePlates2.rs
error: unknown format trait `s`
--> LicensePlates2.rs:43:38
|
43 | println!("{}", format!("Syntax: {0:s} pattern", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> LicensePlates2.rs:26:20
|
26 | let isLast:bool = Utils.isEmpty(remainingPattern);
| ^^^^^ not found in this scope
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:40:5
|
40 | if args.len() == 2 {
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:41:15
|
41 | pattern = &(args[1]);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find function `exit` in this scope
--> LicensePlates2.rs:44:3
|
44 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::process::exit;
|
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:14:5
|
14 | if find(letters,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
14 - if find(letters,which) != string::npos {
14 + if letters.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:14:28
|
14 | if find(letters,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0308]: mismatched types
--> LicensePlates2.rs:15:10
|
13 | fn getChoices(which:&str) -> String {
| ------ expected `String` because of return type
14 | if find(letters,which) != string::npos {
15 | return letters;
| ^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `&str`
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:16:12
|
16 | } else if find(digits,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
16 - } else if find(digits,which) != string::npos {
16 + } else if digits.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:16:34
|
16 | } else if find(digits,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0425]: cannot find function `substr` in this scope
--> LicensePlates2.rs:24:35
|
24 | let choices:String = getChoices(&substr(pattern,0,1));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `right_tail` in this scope
--> LicensePlates2.rs:25:32
|
25 | let remainingPattern:String = right_tail(pattern,1);
| ^^^^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> LicensePlates2.rs:28:49
|
28 | let newPrefix:String = String::from(prefix) + c;
| ^ expected `&str`, found `char`
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0308, E0425, E0433.
For more information about an error, try `rustc --explain E0308`.
$ rustc LicensePlates2.rs
error: unknown format trait `s`
--> LicensePlates2.rs:43:38
|
43 | println!("{}", format!("Syntax: {0:s} pattern", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> LicensePlates2.rs:26:20
|
26 | let isLast:bool = Utils.isEmpty(remainingPattern);
| ^^^^^ not found in this scope
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:40:5
|
40 | if args.len() == 2 {
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:41:15
|
41 | pattern = &(args[1]);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find function `exit` in this scope
--> LicensePlates2.rs:44:3
|
44 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::process::exit;
|
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:14:5
|
14 | if find(letters,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
14 - if find(letters,which) != string::npos {
14 + if letters.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:14:28
|
14 | if find(letters,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0308]: mismatched types
--> LicensePlates2.rs:15:10
|
13 | fn getChoices(which:&str) -> String {
| ------ expected `String` because of return type
14 | if find(letters,which) != string::npos {
15 | return letters;
| ^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `&str`
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:16:12
|
16 | } else if find(digits,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
16 - } else if find(digits,which) != string::npos {
16 + } else if digits.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:16:34
|
16 | } else if find(digits,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0425]: cannot find function `substr` in this scope
--> LicensePlates2.rs:24:35
|
24 | let choices:String = getChoices(&substr(pattern,0,1));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `right_tail` in this scope
--> LicensePlates2.rs:25:32
|
25 | let remainingPattern:String = right_tail(pattern,1);
| ^^^^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> LicensePlates2.rs:28:49
|
28 | let newPrefix:String = String::from(prefix) + c;
| ^ expected `&str`, found `char`
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0308, E0425, E0433.
For more information about an error, try `rustc --explain E0308`.
$ rustc LicensePlates2.rs
error: unknown format trait `s`
--> LicensePlates2.rs:43:38
|
43 | println!("{}", format!("Syntax: {0:s} pattern", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> LicensePlates2.rs:26:20
|
26 | let isLast:bool = Utils.isEmpty(remainingPattern);
| ^^^^^ not found in this scope
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:40:5
|
40 | if args.len() == 2 {
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:41:15
|
41 | pattern = &(args[1]);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find function `exit` in this scope
--> LicensePlates2.rs:44:3
|
44 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::process::exit;
|
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:14:5
|
14 | if find(letters,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
14 - if find(letters,which) != string::npos {
14 + if letters.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:14:28
|
14 | if find(letters,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0308]: mismatched types
--> LicensePlates2.rs:15:10
|
13 | fn getChoices(which:&str) -> String {
| ------ expected `String` because of return type
14 | if find(letters,which) != string::npos {
15 | return letters;
| ^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `&str`
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:16:12
|
16 | } else if find(digits,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
16 - } else if find(digits,which) != string::npos {
16 + } else if digits.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:16:34
|
16 | } else if find(digits,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0425]: cannot find function `substr` in this scope
--> LicensePlates2.rs:24:35
|
24 | let choices:String = getChoices(&substr(pattern,0,1));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `right_tail` in this scope
--> LicensePlates2.rs:25:32
|
25 | let remainingPattern:String = right_tail(pattern,1);
| ^^^^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> LicensePlates2.rs:28:49
|
28 | let newPrefix:String = String::from(prefix) + c;
| ^ expected `&str`, found `char`
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0308, E0425, E0433.
For more information about an error, try `rustc --explain E0308`.
$ rustc LicensePlates2.rs
error: unknown format trait `s`
--> LicensePlates2.rs:43:38
|
43 | println!("{}", format!("Syntax: {0:s} pattern", utils::program_name().expect("program name should not be empty!")));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> LicensePlates2.rs:26:20
|
26 | let isLast:bool = Utils.isEmpty(remainingPattern);
| ^^^^^ not found in this scope
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:40:5
|
40 | if args.len() == 2 {
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find value `args` in this scope
--> LicensePlates2.rs:41:15
|
41 | pattern = &(args[1]);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::env::args;
|
error[E0425]: cannot find function `exit` in this scope
--> LicensePlates2.rs:44:3
|
44 | exit(1);
| ^^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::process::exit;
|
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:14:5
|
14 | if find(letters,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
14 - if find(letters,which) != string::npos {
14 + if letters.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:14:28
|
14 | if find(letters,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0308]: mismatched types
--> LicensePlates2.rs:15:10
|
13 | fn getChoices(which:&str) -> String {
| ------ expected `String` because of return type
14 | if find(letters,which) != string::npos {
15 | return letters;
| ^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `&str`
error[E0425]: cannot find function `find` in this scope
--> LicensePlates2.rs:16:12
|
16 | } else if find(digits,which) != string::npos {
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `find` on `&str`
|
16 - } else if find(digits,which) != string::npos {
16 + } else if digits.find(which) != string::npos {
|
error[E0433]: failed to resolve: use of undeclared crate or module `string`
--> LicensePlates2.rs:16:34
|
16 | } else if find(digits,which) != string::npos {
| ^^^^^^
| |
| use of undeclared crate or module `string`
| help: a struct with a similar name exists (notice the capitalization): `String`
error[E0425]: cannot find function `substr` in this scope
--> LicensePlates2.rs:24:35
|
24 | let choices:String = getChoices(&substr(pattern,0,1));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `right_tail` in this scope
--> LicensePlates2.rs:25:32
|
25 | let remainingPattern:String = right_tail(pattern,1);
| ^^^^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> LicensePlates2.rs:28:49
|
28 | let newPrefix:String = String::from(prefix) + c;
| ^ expected `&str`, found `char`
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0308, E0425, E0433.
For more information about an error, try `rustc --explain E0308`.