25 lines
72 KiB
Plaintext
25 lines
72 KiB
Plaintext
{"$message_type":"diagnostic","message":"set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache","code":null,"level":"error","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26740,"byte_end":26833,"line_start":576,"line_end":576,"column_start":9,"column_end":102,"is_primary":true,"text":[{"text":" $crate::sqlx_macros::expand_query!(record = $out_struct, source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26740,"byte_end":26833,"line_start":576,"line_end":576,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::sqlx_macros::expand_query!(record = $out_struct, source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/client/mod.rs","byte_start":1614,"byte_end":2127,"line_start":62,"line_end":76,"column_start":22,"column_end":10,"is_primary":false,"text":[{"text":" let client = sqlx::query_as!(","highlight_start":22,"highlight_end":38},{"text":" Client,","highlight_start":1,"highlight_end":20},{"text":" r#\"","highlight_start":1,"highlight_end":16},{"text":" INSERT INTO clients (client_id, name, description, rate_limit_per_minute)","highlight_start":1,"highlight_end":86},{"text":" VALUES (?, ?, ?, ?)","highlight_start":1,"highlight_end":32},{"text":" RETURNING ","highlight_start":1,"highlight_end":23},{"text":" id, client_id, name, description,","highlight_start":1,"highlight_end":50},{"text":" created_at, updated_at, is_active,","highlight_start":1,"highlight_end":51},{"text":" rate_limit_per_minute, total_requests, total_tokens, total_cost","highlight_start":1,"highlight_end":80},{"text":" \"#,","highlight_start":1,"highlight_end":16},{"text":" request.client_id,","highlight_start":1,"highlight_end":31},{"text":" request.name,","highlight_start":1,"highlight_end":26},{"text":" request.description,","highlight_start":1,"highlight_end":33},{"text":" rate_limit","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"sqlx::query_as!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26518,"byte_end":26539,"line_start":571,"line_end":571,"column_start":1,"column_end":22,"is_primary":false,"text":[{"text":"macro_rules! query_as (","highlight_start":1,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::sqlx_macros::expand_query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-macros-0.8.6/src/lib.rs","byte_start":116,"byte_end":170,"line_start":9,"line_end":9,"column_start":1,"column_end":55,"is_primary":false,"text":[{"text":"pub fn expand_query(input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:62:22\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m62\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let client = sqlx::query_as!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m ______________________^\u001b[0m\n\u001b[1m\u001b[94m63\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m Client,\n\u001b[1m\u001b[94m64\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m r#\"\n\u001b[1m\u001b[94m65\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m INSERT INTO clients (client_id, name, description, rate_limit_per_minute)\n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[94m75\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m rate_limit\n\u001b[1m\u001b[94m76\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m )\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache","code":null,"level":"error","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26740,"byte_end":26833,"line_start":576,"line_end":576,"column_start":9,"column_end":102,"is_primary":true,"text":[{"text":" $crate::sqlx_macros::expand_query!(record = $out_struct, source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26740,"byte_end":26833,"line_start":576,"line_end":576,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::sqlx_macros::expand_query!(record = $out_struct, source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/client/mod.rs","byte_start":2415,"byte_end":2773,"line_start":86,"line_end":97,"column_start":22,"column_end":10,"is_primary":false,"text":[{"text":" let client = sqlx::query_as!(","highlight_start":22,"highlight_end":38},{"text":" Client,","highlight_start":1,"highlight_end":20},{"text":" r#\"","highlight_start":1,"highlight_end":16},{"text":" SELECT ","highlight_start":1,"highlight_end":20},{"text":" id, client_id, name, description,","highlight_start":1,"highlight_end":50},{"text":" created_at, updated_at, is_active,","highlight_start":1,"highlight_end":51},{"text":" rate_limit_per_minute, total_requests, total_tokens, total_cost","highlight_start":1,"highlight_end":80},{"text":" FROM clients","highlight_start":1,"highlight_end":25},{"text":" WHERE client_id = ?","highlight_start":1,"highlight_end":32},{"text":" \"#,","highlight_start":1,"highlight_end":16},{"text":" client_id","highlight_start":1,"highlight_end":22},{"text":" )","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"sqlx::query_as!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26518,"byte_end":26539,"line_start":571,"line_end":571,"column_start":1,"column_end":22,"is_primary":false,"text":[{"text":"macro_rules! query_as (","highlight_start":1,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::sqlx_macros::expand_query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-macros-0.8.6/src/lib.rs","byte_start":116,"byte_end":170,"line_start":9,"line_end":9,"column_start":1,"column_end":55,"is_primary":false,"text":[{"text":"pub fn expand_query(input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:86:22\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m86\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let client = sqlx::query_as!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m ______________________^\u001b[0m\n\u001b[1m\u001b[94m87\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m Client,\n\u001b[1m\u001b[94m88\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m r#\"\n\u001b[1m\u001b[94m89\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m SELECT \n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[94m96\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m client_id\n\u001b[1m\u001b[94m97\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m )\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache","code":null,"level":"error","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26740,"byte_end":26833,"line_start":576,"line_end":576,"column_start":9,"column_end":102,"is_primary":true,"text":[{"text":" $crate::sqlx_macros::expand_query!(record = $out_struct, source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26740,"byte_end":26833,"line_start":576,"line_end":576,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::sqlx_macros::expand_query!(record = $out_struct, source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/client/mod.rs","byte_start":5350,"byte_end":5758,"line_start":174,"line_end":187,"column_start":23,"column_end":10,"is_primary":false,"text":[{"text":" let clients = sqlx::query_as!(","highlight_start":23,"highlight_end":39},{"text":" Client,","highlight_start":1,"highlight_end":20},{"text":" r#\"","highlight_start":1,"highlight_end":16},{"text":" SELECT ","highlight_start":1,"highlight_end":20},{"text":" id, client_id, name, description,","highlight_start":1,"highlight_end":50},{"text":" created_at, updated_at, is_active,","highlight_start":1,"highlight_end":51},{"text":" rate_limit_per_minute, total_requests, total_tokens, total_cost","highlight_start":1,"highlight_end":80},{"text":" FROM clients","highlight_start":1,"highlight_end":25},{"text":" ORDER BY created_at DESC","highlight_start":1,"highlight_end":37},{"text":" LIMIT ? OFFSET ?","highlight_start":1,"highlight_end":29},{"text":" \"#,","highlight_start":1,"highlight_end":16},{"text":" limit,","highlight_start":1,"highlight_end":19},{"text":" offset","highlight_start":1,"highlight_end":19},{"text":" )","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"sqlx::query_as!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":26518,"byte_end":26539,"line_start":571,"line_end":571,"column_start":1,"column_end":22,"is_primary":false,"text":[{"text":"macro_rules! query_as (","highlight_start":1,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::sqlx_macros::expand_query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-macros-0.8.6/src/lib.rs","byte_start":116,"byte_end":170,"line_start":9,"line_end":9,"column_start":1,"column_end":55,"is_primary":false,"text":[{"text":"pub fn expand_query(input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:174:23\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m174\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let clients = sqlx::query_as!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m _______________________^\u001b[0m\n\u001b[1m\u001b[94m175\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m Client,\n\u001b[1m\u001b[94m176\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m r#\"\n\u001b[1m\u001b[94m177\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m SELECT \n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[94m186\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m offset\n\u001b[1m\u001b[94m187\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m )\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache","code":null,"level":"error","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":16544,"byte_end":16615,"line_start":328,"line_end":328,"column_start":9,"column_end":80,"is_primary":true,"text":[{"text":" $crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":16544,"byte_end":16615,"line_start":328,"line_end":328,"column_start":9,"column_end":80,"is_primary":false,"text":[{"text":" $crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/client/mod.rs","byte_start":5964,"byte_end":6064,"line_start":196,"line_end":199,"column_start":22,"column_end":10,"is_primary":false,"text":[{"text":" let result = sqlx::query!(","highlight_start":22,"highlight_end":35},{"text":" \"DELETE FROM clients WHERE client_id = ?\",","highlight_start":1,"highlight_end":55},{"text":" client_id","highlight_start":1,"highlight_end":22},{"text":" )","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"sqlx::query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":15636,"byte_end":15654,"line_start":314,"line_end":314,"column_start":1,"column_end":19,"is_primary":false,"text":[{"text":"macro_rules! query (","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::sqlx_macros::expand_query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-macros-0.8.6/src/lib.rs","byte_start":116,"byte_end":170,"line_start":9,"line_end":9,"column_start":1,"column_end":55,"is_primary":false,"text":[{"text":"pub fn expand_query(input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:196:22\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m196\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let result = sqlx::query!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m ______________________^\u001b[0m\n\u001b[1m\u001b[94m197\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \"DELETE FROM clients WHERE client_id = ?\",\n\u001b[1m\u001b[94m198\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m client_id\n\u001b[1m\u001b[94m199\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m )\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache","code":null,"level":"error","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":16544,"byte_end":16615,"line_start":328,"line_end":328,"column_start":9,"column_end":80,"is_primary":true,"text":[{"text":" $crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":16544,"byte_end":16615,"line_start":328,"line_end":328,"column_start":9,"column_end":80,"is_primary":false,"text":[{"text":" $crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/client/mod.rs","byte_start":6588,"byte_end":6974,"line_start":221,"line_end":234,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":" sqlx::query!(","highlight_start":9,"highlight_end":22},{"text":" r#\"","highlight_start":1,"highlight_end":16},{"text":" UPDATE clients ","highlight_start":1,"highlight_end":28},{"text":" SET ","highlight_start":1,"highlight_end":17},{"text":" total_requests = total_requests + 1,","highlight_start":1,"highlight_end":53},{"text":" total_tokens = total_tokens + ?,","highlight_start":1,"highlight_end":49},{"text":" total_cost = total_cost + ?,","highlight_start":1,"highlight_end":45},{"text":" updated_at = CURRENT_TIMESTAMP","highlight_start":1,"highlight_end":47},{"text":" WHERE client_id = ?","highlight_start":1,"highlight_end":32},{"text":" \"#,","highlight_start":1,"highlight_end":16},{"text":" tokens,","highlight_start":1,"highlight_end":20},{"text":" cost,","highlight_start":1,"highlight_end":18},{"text":" client_id","highlight_start":1,"highlight_end":22},{"text":" )","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"sqlx::query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":15636,"byte_end":15654,"line_start":314,"line_end":314,"column_start":1,"column_end":19,"is_primary":false,"text":[{"text":"macro_rules! query (","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::sqlx_macros::expand_query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-macros-0.8.6/src/lib.rs","byte_start":116,"byte_end":170,"line_start":9,"line_end":9,"column_start":1,"column_end":55,"is_primary":false,"text":[{"text":"pub fn expand_query(input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:221:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m221\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m/\u001b[0m sqlx::query!(\n\u001b[1m\u001b[94m222\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m r#\"\n\u001b[1m\u001b[94m223\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m UPDATE clients \n\u001b[1m\u001b[94m224\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m SET \n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[94m233\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m client_id\n\u001b[1m\u001b[94m234\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m )\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache","code":null,"level":"error","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":16544,"byte_end":16615,"line_start":328,"line_end":328,"column_start":9,"column_end":80,"is_primary":true,"text":[{"text":" $crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":16544,"byte_end":16615,"line_start":328,"line_end":328,"column_start":9,"column_end":80,"is_primary":false,"text":[{"text":" $crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])","highlight_start":9,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/client/mod.rs","byte_start":7206,"byte_end":7400,"line_start":243,"line_end":250,"column_start":21,"column_end":10,"is_primary":false,"text":[{"text":" let stats = sqlx::query!(","highlight_start":21,"highlight_end":34},{"text":" r#\"","highlight_start":1,"highlight_end":16},{"text":" SELECT total_requests, total_tokens, total_cost","highlight_start":1,"highlight_end":60},{"text":" FROM clients","highlight_start":1,"highlight_end":25},{"text":" WHERE client_id = ?","highlight_start":1,"highlight_end":32},{"text":" \"#,","highlight_start":1,"highlight_end":16},{"text":" client_id","highlight_start":1,"highlight_end":22},{"text":" )","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"sqlx::query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-0.8.6/src/macros/mod.rs","byte_start":15636,"byte_end":15654,"line_start":314,"line_end":314,"column_start":1,"column_end":19,"is_primary":false,"text":[{"text":"macro_rules! query (","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::sqlx_macros::expand_query!","def_site_span":{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-macros-0.8.6/src/lib.rs","byte_start":116,"byte_end":170,"line_start":9,"line_end":9,"column_start":1,"column_end":55,"is_primary":false,"text":[{"text":"pub fn expand_query(input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:243:21\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m243\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let stats = sqlx::query!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m _____________________^\u001b[0m\n\u001b[1m\u001b[94m244\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m r#\"\n\u001b[1m\u001b[94m245\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m SELECT total_requests, total_tokens, total_cost\n\u001b[1m\u001b[94m246\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m FROM clients\n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[94m249\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m client_id\n\u001b[1m\u001b[94m250\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m )\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused import: `Duration`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/rate_limiting/mod.rs","byte_start":318,"byte_end":326,"line_start":10,"line_end":10,"column_start":17,"column_end":25,"is_primary":true,"text":[{"text":"use std::time::{Duration, Instant};","highlight_start":17,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/rate_limiting/mod.rs","byte_start":318,"byte_end":328,"line_start":10,"line_end":10,"column_start":17,"column_end":27,"is_primary":true,"text":[{"text":"use std::time::{Duration, Instant};","highlight_start":17,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"src/rate_limiting/mod.rs","byte_start":317,"byte_end":318,"line_start":10,"line_end":10,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"use std::time::{Duration, Instant};","highlight_start":16,"highlight_end":17}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"src/rate_limiting/mod.rs","byte_start":335,"byte_end":336,"line_start":10,"line_end":10,"column_start":34,"column_end":35,"is_primary":true,"text":[{"text":"use std::time::{Duration, Instant};","highlight_start":34,"highlight_end":35}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `Duration`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/rate_limiting/mod.rs:10:17\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m10\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use std::time::{Duration, Instant};\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(unused_imports)]` (part of `#[warn(unused)]`) on by default\n\n"}
|
|
{"$message_type":"diagnostic","message":"the trait bound `for<'r> client::Client: FromRow<'r, _>` is not satisfied","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src/client/mod.rs","byte_start":4803,"byte_end":4809,"line_start":155,"line_end":155,"column_start":45,"column_end":51,"is_primary":true,"text":[{"text":" let mut query = sqlx::query_as::<_, Client>(&sql);","highlight_start":45,"highlight_end":51}],"label":"unsatisfied trait bound","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the trait `for<'r> FromRow<'r, _>` is not implemented for `client::Client`","code":null,"level":"help","spans":[{"file_name":"src/client/mod.rs","byte_start":383,"byte_end":400,"line_start":16,"line_end":16,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"pub struct Client {","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the following other types implement trait `FromRow<'r, R>`:\n ()\n (T1, T2)\n (T1, T2, T3)\n (T1, T2, T3, T4)\n (T1, T2, T3, T4, T5)\n (T1, T2, T3, T4, T5, T6)\n (T1, T2, T3, T4, T5, T6, T7)\n (T1, T2, T3, T4, T5, T6, T7, T8)\nand 9 others","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required by a bound in `sqlx::query_as`","code":null,"level":"note","spans":[{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-core-0.8.6/src/query_as.rs","byte_start":12358,"byte_end":12366,"line_start":342,"line_end":342,"column_start":8,"column_end":16,"is_primary":false,"text":[{"text":"pub fn query_as<'q, DB, O>(sql: &'q str) -> QueryAs<'q, DB, O, <DB as Database>::Arguments<'q>>","highlight_start":8,"highlight_end":16}],"label":"required by a bound in this function","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-core-0.8.6/src/query_as.rs","byte_start":12478,"byte_end":12506,"line_start":345,"line_end":345,"column_start":8,"column_end":36,"is_primary":true,"text":[{"text":" O: for<'r> FromRow<'r, DB::Row>,","highlight_start":8,"highlight_end":36}],"label":"required by this bound in `query_as`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: the trait bound `for<'r> client::Client: FromRow<'r, _>` is not satisfied\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:155:45\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m155\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let mut query = sqlx::query_as::<_, Client>(&sql);\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^\u001b[0m \u001b[1m\u001b[91munsatisfied trait bound\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: the trait `for<'r> FromRow<'r, _>` is not implemented for `client::Client`\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:16:1\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m16\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct Client {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[96m^^^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: the following other types implement trait `FromRow<'r, R>`:\n ()\n (T1, T2)\n (T1, T2, T3)\n (T1, T2, T3, T4)\n (T1, T2, T3, T4, T5)\n (T1, T2, T3, T4, T5, T6)\n (T1, T2, T3, T4, T5, T6, T7)\n (T1, T2, T3, T4, T5, T6, T7, T8)\n and 9 others\n\u001b[1m\u001b[92mnote\u001b[0m: required by a bound in `sqlx::query_as`\n \u001b[1m\u001b[94m--> \u001b[0m/home/newkirk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-core-0.8.6/src/query_as.rs:345:8\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m342\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub fn query_as<'q, DB, O>(sql: &'q str) -> QueryAs<'q, DB, O, <DB as Database>::Arguments<'q>>\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m--------\u001b[0m \u001b[1m\u001b[94mrequired by a bound in this function\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m345\u001b[0m \u001b[1m\u001b[94m|\u001b[0m O: for<'r> FromRow<'r, DB::Row>,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[92mrequired by this bound in `query_as`\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"the method `fetch_optional` exists for struct `QueryAs<'_, _, client::Client, _>`, but its trait bounds were not satisfied","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src/client/mod.rs","byte_start":4933,"byte_end":4947,"line_start":160,"line_end":160,"column_start":28,"column_end":42,"is_primary":true,"text":[{"text":" let client = query.fetch_optional(&self.db_pool).await?;","highlight_start":28,"highlight_end":42}],"label":"method cannot be called on `QueryAs<'_, _, client::Client, _>` due to unsatisfied trait bounds","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/client/mod.rs","byte_start":383,"byte_end":400,"line_start":16,"line_end":16,"column_start":1,"column_end":18,"is_primary":false,"text":[{"text":"pub struct Client {","highlight_start":1,"highlight_end":18}],"label":"doesn't satisfy `client::Client: FromRow<'r, _>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the following trait bounds were not satisfied:\n`client::Client: FromRow<'r, _>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0599]\u001b[0m\u001b[1m: the method `fetch_optional` exists for struct `QueryAs<'_, _, client::Client, _>`, but its trait bounds were not satisfied\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:160:28\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m16\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct Client {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m-----------------\u001b[0m \u001b[1m\u001b[94mdoesn't satisfy `client::Client: FromRow<'r, _>`\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m160\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let client = query.fetch_optional(&self.db_pool).await?;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mmethod cannot be called on `QueryAs<'_, _, client::Client, _>` due to unsatisfied trait bounds\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the following trait bounds were not satisfied:\n `client::Client: FromRow<'r, _>`\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/client/mod.rs","byte_start":4991,"byte_end":4997,"line_start":162,"line_end":162,"column_start":12,"column_end":18,"is_primary":false,"text":[{"text":" if client.is_some() {","highlight_start":12,"highlight_end":18}],"label":"type must be known at this point","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/client/mod.rs","byte_start":4918,"byte_end":4924,"line_start":160,"line_end":160,"column_start":13,"column_end":19,"is_primary":true,"text":[{"text":" let client = query.fetch_optional(&self.db_pool).await?;","highlight_start":13,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider giving `client` an explicit type","code":null,"level":"help","spans":[{"file_name":"src/client/mod.rs","byte_start":4924,"byte_end":4924,"line_start":160,"line_end":160,"column_start":19,"column_end":19,"is_primary":true,"text":[{"text":" let client = query.fetch_optional(&self.db_pool).await?;","highlight_start":19,"highlight_end":19}],"label":null,"suggested_replacement":": /* Type */","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:160:13\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m160\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let client = query.fetch_optional(&self.db_pool).await?;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^\u001b[0m\n\u001b[1m\u001b[94m161\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \n\u001b[1m\u001b[94m162\u001b[0m \u001b[1m\u001b[94m|\u001b[0m if client.is_some() {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m------\u001b[0m \u001b[1m\u001b[94mtype must be known at this point\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider giving `client` an explicit type\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m160\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let client\u001b[92m: /* Type */\u001b[0m = query.fetch_optional(&self.db_pool).await?;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++++++\u001b[0m\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/client/mod.rs","byte_start":6145,"byte_end":6151,"line_start":203,"line_end":203,"column_start":23,"column_end":29,"is_primary":false,"text":[{"text":" let deleted = result.rows_affected() > 0;","highlight_start":23,"highlight_end":29}],"label":"type must be known at this point","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/client/mod.rs","byte_start":5955,"byte_end":5961,"line_start":196,"line_end":196,"column_start":13,"column_end":19,"is_primary":true,"text":[{"text":" let result = sqlx::query!(","highlight_start":13,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider giving `result` an explicit type","code":null,"level":"help","spans":[{"file_name":"src/client/mod.rs","byte_start":5961,"byte_end":5961,"line_start":196,"line_end":196,"column_start":19,"column_end":19,"is_primary":true,"text":[{"text":" let result = sqlx::query!(","highlight_start":19,"highlight_end":19}],"label":null,"suggested_replacement":": /* Type */","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:196:13\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m196\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let result = sqlx::query!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m203\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let deleted = result.rows_affected() > 0;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m------\u001b[0m \u001b[1m\u001b[94mtype must be known at this point\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider giving `result` an explicit type\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m196\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let result\u001b[92m: /* Type */\u001b[0m = sqlx::query!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++++++\u001b[0m\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/client/mod.rs","byte_start":7477,"byte_end":7482,"line_start":254,"line_end":254,"column_start":12,"column_end":17,"is_primary":false,"text":[{"text":" Ok(stats.map(|s| (s.total_requests, s.total_tokens, s.total_cost)))","highlight_start":12,"highlight_end":17}],"label":"type must be known at this point","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/client/mod.rs","byte_start":7198,"byte_end":7203,"line_start":243,"line_end":243,"column_start":13,"column_end":18,"is_primary":true,"text":[{"text":" let stats = sqlx::query!(","highlight_start":13,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider giving `stats` an explicit type","code":null,"level":"help","spans":[{"file_name":"src/client/mod.rs","byte_start":7203,"byte_end":7203,"line_start":243,"line_end":243,"column_start":18,"column_end":18,"is_primary":true,"text":[{"text":" let stats = sqlx::query!(","highlight_start":18,"highlight_end":18}],"label":null,"suggested_replacement":": /* Type */","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/client/mod.rs:243:13\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m243\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let stats = sqlx::query!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m254\u001b[0m \u001b[1m\u001b[94m|\u001b[0m Ok(stats.map(|s| (s.total_requests, s.total_tokens, s.total_cost)))\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m-----\u001b[0m \u001b[1m\u001b[94mtype must be known at this point\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider giving `stats` an explicit type\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m243\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let stats\u001b[92m: /* Type */\u001b[0m = sqlx::query!(\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++++++\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"duplicate definitions with name `new`","code":{"code":"E0592","explanation":"This error occurs when you defined methods or associated functions with same\nname.\n\nErroneous code example:\n\n```compile_fail,E0592\nstruct Foo;\n\nimpl Foo {\n fn bar() {} // previous definition here\n}\n\nimpl Foo {\n fn bar() {} // duplicate definition here\n}\n```\n\nA similar error is E0201. The difference is whether there is one declaration\nblock or not. To avoid this error, you must give each `fn` a unique name.\n\n```\nstruct Foo;\n\nimpl Foo {\n fn bar() {}\n}\n\nimpl Foo {\n fn baz() {} // define with different name\n}\n```\n"},"level":"error","spans":[{"file_name":"src/state/mod.rs","byte_start":470,"byte_end":609,"line_start":19,"line_end":23,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":" pub fn new(","highlight_start":5,"highlight_end":16},{"text":" provider_manager: ProviderManager,","highlight_start":1,"highlight_end":43},{"text":" db_pool: DbPool,","highlight_start":1,"highlight_end":25},{"text":" rate_limit_manager: RateLimitManager,","highlight_start":1,"highlight_end":46},{"text":" ) -> Self {","highlight_start":1,"highlight_end":14}],"label":"duplicate definitions for `new`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/state/mod.rs","byte_start":988,"byte_end":1127,"line_start":38,"line_end":42,"column_start":5,"column_end":14,"is_primary":false,"text":[{"text":" pub fn new(","highlight_start":5,"highlight_end":16},{"text":" provider_manager: ProviderManager,","highlight_start":1,"highlight_end":43},{"text":" db_pool: DbPool,","highlight_start":1,"highlight_end":25},{"text":" rate_limit_manager: RateLimitManager,","highlight_start":1,"highlight_end":46},{"text":" ) -> Self {","highlight_start":1,"highlight_end":14}],"label":"other definition for `new`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0592]\u001b[0m\u001b[1m: duplicate definitions with name `new`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/state/mod.rs:19:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m19\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m/\u001b[0m pub fn new(\n\u001b[1m\u001b[94m20\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m provider_manager: ProviderManager,\n\u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m db_pool: DbPool,\n\u001b[1m\u001b[94m22\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m rate_limit_manager: RateLimitManager,\n\u001b[1m\u001b[94m23\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m ) -> Self {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_____________^\u001b[0m \u001b[1m\u001b[91mduplicate definitions for `new`\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m38\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m/\u001b[0m pub fn new(\n\u001b[1m\u001b[94m39\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m provider_manager: ProviderManager,\n\u001b[1m\u001b[94m40\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m db_pool: DbPool,\n\u001b[1m\u001b[94m41\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m rate_limit_manager: RateLimitManager,\n\u001b[1m\u001b[94m42\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Self {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|_____________-\u001b[0m \u001b[1m\u001b[94mother definition for `new`\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":"missing field `client_manager` in initializer of `AppState`","code":{"code":"E0063","explanation":"A struct's or struct-like enum variant's field was not provided.\n\nErroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n x: i32,\n y: i32,\n}\n\nfn main() {\n let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"src/state/mod.rs","byte_start":1215,"byte_end":1219,"line_start":45,"line_end":45,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" Self {","highlight_start":9,"highlight_end":13}],"label":"missing `client_manager`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0063]\u001b[0m\u001b[1m: missing field `client_manager` in initializer of `AppState`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/state/mod.rs:45:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m45\u001b[0m \u001b[1m\u001b[94m|\u001b[0m Self {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91mmissing `client_manager`\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"multiple applicable items in scope","code":{"code":"E0034","explanation":"The compiler doesn't know what method to call because more than one method\nhas the same prototype.\n\nErroneous code example:\n\n```compile_fail,E0034\nstruct Test;\n\ntrait Trait1 {\n fn foo();\n}\n\ntrait Trait2 {\n fn foo();\n}\n\nimpl Trait1 for Test { fn foo() {} }\nimpl Trait2 for Test { fn foo() {} }\n\nfn main() {\n Test::foo() // error, which foo() to call?\n}\n```\n\nTo avoid this error, you have to keep only one of them and remove the others.\nSo let's take our example and fix it:\n\n```\nstruct Test;\n\ntrait Trait1 {\n fn foo();\n}\n\nimpl Trait1 for Test { fn foo() {} }\n\nfn main() {\n Test::foo() // and now that's good!\n}\n```\n\nHowever, a better solution would be using fully explicit naming of type and\ntrait:\n\n```\nstruct Test;\n\ntrait Trait1 {\n fn foo();\n}\n\ntrait Trait2 {\n fn foo();\n}\n\nimpl Trait1 for Test { fn foo() {} }\nimpl Trait2 for Test { fn foo() {} }\n\nfn main() {\n <Test as Trait1>::foo()\n}\n```\n\nOne last example:\n\n```\ntrait F {\n fn m(&self);\n}\n\ntrait G {\n fn m(&self);\n}\n\nstruct X;\n\nimpl F for X { fn m(&self) { println!(\"I am F\"); } }\nimpl G for X { fn m(&self) { println!(\"I am G\"); } }\n\nfn main() {\n let f = X;\n\n F::m(&f); // it displays \"I am F\"\n G::m(&f); // it displays \"I am G\"\n}\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":2941,"byte_end":2944,"line_start":90,"line_end":90,"column_start":27,"column_end":30,"is_primary":true,"text":[{"text":" let state = AppState::new(provider_manager, db_pool, rate_limit_manager);","highlight_start":27,"highlight_end":30}],"label":"multiple `new` found","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"candidate #1 is defined in an impl for the type `AppState`","code":null,"level":"note","spans":[{"file_name":"src/state/mod.rs","byte_start":470,"byte_end":609,"line_start":19,"line_end":23,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":" pub fn new(","highlight_start":5,"highlight_end":16},{"text":" provider_manager: ProviderManager,","highlight_start":1,"highlight_end":43},{"text":" db_pool: DbPool,","highlight_start":1,"highlight_end":25},{"text":" rate_limit_manager: RateLimitManager,","highlight_start":1,"highlight_end":46},{"text":" ) -> Self {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"candidate #2 is defined in an impl for the type `AppState`","code":null,"level":"note","spans":[{"file_name":"src/state/mod.rs","byte_start":988,"byte_end":1127,"line_start":38,"line_end":42,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":" pub fn new(","highlight_start":5,"highlight_end":16},{"text":" provider_manager: ProviderManager,","highlight_start":1,"highlight_end":43},{"text":" db_pool: DbPool,","highlight_start":1,"highlight_end":25},{"text":" rate_limit_manager: RateLimitManager,","highlight_start":1,"highlight_end":46},{"text":" ) -> Self {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0034]\u001b[0m\u001b[1m: multiple applicable items in scope\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:90:27\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m90\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let state = AppState::new(provider_manager, db_pool, rate_limit_manager);\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^\u001b[0m \u001b[1m\u001b[91mmultiple `new` found\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: candidate #1 is defined in an impl for the type `AppState`\n \u001b[1m\u001b[94m--> \u001b[0msrc/state/mod.rs:19:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m19\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m/\u001b[0m pub fn new(\n\u001b[1m\u001b[94m20\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m provider_manager: ProviderManager,\n\u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m db_pool: DbPool,\n\u001b[1m\u001b[94m22\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m rate_limit_manager: RateLimitManager,\n\u001b[1m\u001b[94m23\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m ) -> Self {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|_____________^\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: candidate #2 is defined in an impl for the type `AppState`\n \u001b[1m\u001b[94m--> \u001b[0msrc/state/mod.rs:38:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m38\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m/\u001b[0m pub fn new(\n\u001b[1m\u001b[94m39\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m provider_manager: ProviderManager,\n\u001b[1m\u001b[94m40\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m db_pool: DbPool,\n\u001b[1m\u001b[94m41\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m rate_limit_manager: RateLimitManager,\n\u001b[1m\u001b[94m42\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m ) -> Self {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|_____________^\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":7112,"byte_end":7130,"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":7112,"byte_end":7130,"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 14 previous errors; 7 warnings emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 14 previous errors; 7 warnings emitted\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0034, E0063, E0277, E0282, E0592, E0599.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mSome errors have detailed explanations: E0034, E0063, E0277, E0282, E0592, E0599.\u001b[0m\n"}
|
|
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0034`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about an error, try `rustc --explain E0034`.\u001b[0m\n"}
|