Files

6 lines
7.1 KiB
Plaintext

{"$message_type":"diagnostic","message":"failed to resolve: use of unresolved module or unlinked crate `uuid`","code":{"code":"E0433","explanation":"An undeclared crate, module, or type was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n\nIf you've expected to use a crate name:\n\n```compile_fail\nuse ferris_wheel::BigO;\n// error: failed to resolve: use of undeclared module or unlinked crate\n```\n\nMake sure the crate has been added as a dependency in `Cargo.toml`.\n\nTo use a module from your current crate, add the `crate::` prefix to the path.\n"},"level":"error","spans":[{"file_name":"chrs-exec/src/lib.rs","byte_start":2145,"byte_end":2149,"line_start":68,"line_end":68,"column_start":54,"column_end":58,"is_primary":true,"text":[{"text":" let container_name = format!(\"chrs-task-{}\", uuid::Uuid::new_v4());","highlight_start":54,"highlight_end":58}],"label":"use of unresolved module or unlinked crate `uuid`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if you wanted to use a crate named `uuid`, use `cargo add uuid` to add it to your `Cargo.toml`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0433]\u001b[0m\u001b[0m\u001b[1m: failed to resolve: use of unresolved module or unlinked crate `uuid`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mchrs-exec/src/lib.rs:68:54\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m68\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let container_name = format!(\"chrs-task-{}\", uuid::Uuid::new_v4());\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9muse of unresolved module or unlinked crate `uuid`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: if you wanted to use a crate named `uuid`, use `cargo add uuid` to add it to your `Cargo.toml`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"expected a type, found a trait","code":{"code":"E0782","explanation":"Trait objects must include the `dyn` keyword.\n\nErroneous code example:\n\n```edition2021,compile_fail,E0782\ntrait Foo {}\nfn test(arg: Box<Foo>) {} // error!\n```\n\nTrait objects are a way to call methods on types that are not known until\nruntime but conform to some trait.\n\nTrait objects should be formed with `Box<dyn Foo>`, but in the code above\n`dyn` is left off.\n\nThis makes it harder to see that `arg` is a trait object and not a\nsimply a heap allocated type called `Foo`.\n\nTo fix this issue, add `dyn` before the trait name.\n\n```edition2021\ntrait Foo {}\nfn test(arg: Box<dyn Foo>) {} // ok!\n```\n\nThis used to be allowed before edition 2021, but is now an error.\n"},"level":"error","spans":[{"file_name":"chrs-exec/src/lib.rs","byte_start":1962,"byte_end":1969,"line_start":62,"line_end":62,"column_start":69,"column_end":76,"is_primary":true,"text":[{"text":" Some(CreateImageOptions { from_image: image.as_str(), ..Default::empty() }),","highlight_start":69,"highlight_end":76}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"you can add the `dyn` keyword if you want a trait object","code":null,"level":"help","spans":[{"file_name":"chrs-exec/src/lib.rs","byte_start":1962,"byte_end":1962,"line_start":62,"line_end":62,"column_start":69,"column_end":69,"is_primary":true,"text":[{"text":" Some(CreateImageOptions { from_image: image.as_str(), ..Default::empty() }),","highlight_start":69,"highlight_end":69}],"label":null,"suggested_replacement":"<dyn ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"chrs-exec/src/lib.rs","byte_start":1969,"byte_end":1969,"line_start":62,"line_end":62,"column_start":76,"column_end":76,"is_primary":true,"text":[{"text":" Some(CreateImageOptions { from_image: image.as_str(), ..Default::empty() }),","highlight_start":76,"highlight_end":76}],"label":null,"suggested_replacement":">","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0782]\u001b[0m\u001b[0m\u001b[1m: expected a type, found a trait\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mchrs-exec/src/lib.rs:62:69\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m62\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Some(CreateImageOptions { from_image: image.as_str(), ..Default::empty() }),\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: you can add the `dyn` keyword if you want a trait object\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m62\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m Some(CreateImageOptions { from_image: image.as_str(), ..\u001b[0m\u001b[0m\u001b[38;5;10m<dyn \u001b[0m\u001b[0mDefault\u001b[0m\u001b[0m\u001b[38;5;10m>\u001b[0m\u001b[0m::empty() }),\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m++++\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0433, E0782.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0433, E0782.\u001b[0m\n"}
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0433`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about an error, try `rustc --explain E0433`.\u001b[0m\n"}