12 lines
14 KiB
Plaintext
12 lines
14 KiB
Plaintext
{"$message_type":"diagnostic","message":"unresolved import `crate::database::Database`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":832,"byte_end":850,"line_start":39,"line_end":39,"column_start":9,"column_end":27,"is_primary":true,"text":[{"text":" database::Database,","highlight_start":9,"highlight_end":27}],"label":"no `Database` in `database`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider importing one of these items instead:\nsqlx::Database\nsqlx::Error::Database","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `crate::database::Database`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:39:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m39\u001b[0m \u001b[1m\u001b[94m|\u001b[0m database::Database,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mno `Database` in `database`\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: consider importing one of these items instead:\n sqlx::Database\n sqlx::Error::Database\n\n"}
|
|
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":1020,"byte_end":1064,"line_start":45,"line_end":46,"column_start":24,"column_end":19,"is_primary":true,"text":[{"text":" let database = Database::new(\":memory:\")","highlight_start":24,"highlight_end":49},{"text":" .await","highlight_start":1,"highlight_end":19}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:45:24\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m45\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let database = Database::new(\":memory:\")\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m ________________________^\u001b[0m\n\u001b[1m\u001b[94m46\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m .await\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|__________________^\u001b[0m \u001b[1m\u001b[91mcannot infer type\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`","code":{"code":"deprecated","explanation":null},"level":"warning","spans":[{"file_name":"src/providers/openai.rs","byte_start":4023,"byte_end":4042,"line_start":100,"line_end":100,"column_start":29,"column_end":48,"is_primary":true,"text":[{"text":" function_call: None,","highlight_start":29,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(deprecated)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/providers/openai.rs:100:29\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m100\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m function_call: None,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(deprecated)]` on by default\n\n"}
|
|
{"$message_type":"diagnostic","message":"use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`","code":{"code":"deprecated","explanation":null},"level":"warning","spans":[{"file_name":"src/providers/openai.rs","byte_start":9062,"byte_end":9081,"line_start":222,"line_end":222,"column_start":29,"column_end":48,"is_primary":true,"text":[{"text":" function_call: None,","highlight_start":29,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/providers/openai.rs:222:29\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m222\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m function_call: None,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`","code":{"code":"deprecated","explanation":null},"level":"warning","spans":[{"file_name":"src/providers/deepseek.rs","byte_start":3739,"byte_end":3758,"line_start":93,"line_end":93,"column_start":29,"column_end":48,"is_primary":true,"text":[{"text":" function_call: None,","highlight_start":29,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/providers/deepseek.rs:93:29\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m93\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m function_call: None,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`","code":{"code":"deprecated","explanation":null},"level":"warning","spans":[{"file_name":"src/providers/deepseek.rs","byte_start":8801,"byte_end":8820,"line_start":215,"line_end":215,"column_start":29,"column_end":48,"is_primary":true,"text":[{"text":" function_call: None,","highlight_start":29,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: use of deprecated field `async_openai::types::chat::ChatCompletionRequestAssistantMessage::function_call`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/providers/deepseek.rs:215:29\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m215\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m function_call: None,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused variable: `request`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/providers/gemini.rs","byte_start":6571,"byte_end":6578,"line_start":216,"line_end":216,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":" request: UnifiedRequest,","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/providers/gemini.rs","byte_start":6571,"byte_end":6578,"line_start":216,"line_end":216,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":" request: UnifiedRequest,","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":"_request","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused variable: `request`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/providers/gemini.rs:216:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m216\u001b[0m \u001b[1m\u001b[94m|\u001b[0m request: UnifiedRequest,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^\u001b[0m \u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_request`\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused variable: `client_refill_rate`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/rate_limiting/mod.rs","byte_start":7100,"byte_end":7118,"line_start":222,"line_end":222,"column_start":13,"column_end":31,"is_primary":true,"text":[{"text":" let client_refill_rate = config.requests_per_minute as f64 / 60.0;","highlight_start":13,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/rate_limiting/mod.rs","byte_start":7100,"byte_end":7118,"line_start":222,"line_end":222,"column_start":13,"column_end":31,"is_primary":true,"text":[{"text":" let client_refill_rate = config.requests_per_minute as f64 / 60.0;","highlight_start":13,"highlight_end":31}],"label":null,"suggested_replacement":"_client_refill_rate","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused variable: `client_refill_rate`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/rate_limiting/mod.rs:222:13\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m222\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let client_refill_rate = config.requests_per_minute as f64 / 60.0;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_client_refill_rate`\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"aborting due to 2 previous errors; 6 warnings emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 2 previous errors; 6 warnings emitted\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0282, E0432.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mSome errors have detailed explanations: E0282, E0432.\u001b[0m\n"}
|
|
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0282`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about an error, try `rustc --explain E0282`.\u001b[0m\n"}
|