{"reason":"compiler-message","package_id":"path+file:///home/thomas/Projects/bacon-ls-bug#bacon-ls@0.26.0","manifest_path":"/home/thomas/Projects/bacon-ls-bug/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"bacon_ls","src_path":"/home/thomas/Projects/bacon-ls-bug/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"`(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)` is not a future","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":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":28098,"byte_end":28144,"line_start":650,"line_end":650,"column_start":25,"column_end":71,"is_primary":true,"text":[{"text":" $crate::count_field!( futures_init.$($skip)* )","highlight_start":25,"highlight_end":71}],"label":"`(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)` is not a future","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":33218,"byte_end":33325,"line_start":760,"line_end":760,"column_start":9,"column_end":116,"is_primary":false,"text":[{"text":" $crate::select!(@{ start=$start; $($t)*; panic!(\"all branches are disabled and there is no else branch\") })","highlight_start":9,"highlight_end":116}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":34226,"byte_end":34319,"line_start":775,"line_end":775,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::select!(@{ start=$start; ($($s)* _) $($t)* ($($s)*) $p = $f, if true => $h, } $($r)*)","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":35046,"byte_end":35139,"line_start":787,"line_end":787,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::select!(@{ start=$start; ($($s)* _) $($t)* ($($s)*) $p = $f, if true => $h, } $($r)*)","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":35533,"byte_end":35628,"line_start":803,"line_end":803,"column_start":9,"column_end":104,"is_primary":false,"text":[{"text":" $crate::select!(@{ start={ $crate::macros::support::thread_rng_n(BRANCHES) }; () } $p = $($t)*)","highlight_start":9,"highlight_end":104}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":25953,"byte_end":26250,"line_start":708,"line_end":715,"column_start":22,"column_end":10,"is_primary":false,"text":[{"text":" let result = tokio::select! {","highlight_start":22,"highlight_end":38},{"text":" result = combined => result,","highlight_start":1,"highlight_end":42},{"text":" () = cancel_token.cancelled() => {","highlight_start":1,"highlight_end":47},{"text":" tracing::info!(\"cargo run cancelled by newer request\");","highlight_start":1,"highlight_end":72},{"text":" progress.finish_with_message(\"canceled by user\").await;","highlight_start":1,"highlight_end":72},{"text":" return;","highlight_start":1,"highlight_end":24},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" };","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"tokio::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":28024,"byte_end":28072,"line_start":649,"line_end":649,"column_start":35,"column_end":83,"is_primary":false,"text":[{"text":" let mut futures = ($( $crate::macros::support::IntoFuture::into_future(","highlight_start":35,"highlight_end":83}],"label":"required by a bound introduced by this call","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":33218,"byte_end":33325,"line_start":760,"line_end":760,"column_start":9,"column_end":116,"is_primary":false,"text":[{"text":" $crate::select!(@{ start=$start; $($t)*; panic!(\"all branches are disabled and there is no else branch\") })","highlight_start":9,"highlight_end":116}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":34226,"byte_end":34319,"line_start":775,"line_end":775,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::select!(@{ start=$start; ($($s)* _) $($t)* ($($s)*) $p = $f, if true => $h, } $($r)*)","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":35046,"byte_end":35139,"line_start":787,"line_end":787,"column_start":9,"column_end":102,"is_primary":false,"text":[{"text":" $crate::select!(@{ start=$start; ($($s)* _) $($t)* ($($s)*) $p = $f, if true => $h, } $($r)*)","highlight_start":9,"highlight_end":102}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":35533,"byte_end":35628,"line_start":803,"line_end":803,"column_start":9,"column_end":104,"is_primary":false,"text":[{"text":" $crate::select!(@{ start={ $crate::macros::support::thread_rng_n(BRANCHES) }; () } $p = $($t)*)","highlight_start":9,"highlight_end":104}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":25953,"byte_end":26250,"line_start":708,"line_end":715,"column_start":22,"column_end":10,"is_primary":false,"text":[{"text":" let result = tokio::select! {","highlight_start":22,"highlight_end":38},{"text":" result = combined => result,","highlight_start":1,"highlight_end":42},{"text":" () = cancel_token.cancelled() => {","highlight_start":1,"highlight_end":47},{"text":" tracing::info!(\"cargo run cancelled by newer request\");","highlight_start":1,"highlight_end":72},{"text":" progress.finish_with_message(\"canceled by user\").await;","highlight_start":1,"highlight_end":72},{"text":" return;","highlight_start":1,"highlight_end":24},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" };","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"tokio::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"$crate::select!","def_site_span":{"file_name":"/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/macros/select.rs","byte_start":24368,"byte_end":24387,"line_start":571,"line_end":571,"column_start":7,"column_end":26,"is_primary":false,"text":[{"text":"doc! {macro_rules! select {","highlight_start":7,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the trait `Future` is not implemented for `(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>) must be a future or must implement `IntoFuture` to be awaited","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for `(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)` to implement `IntoFuture`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)` is not a future\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:708:22\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m708\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let result = tokio::select! {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m ______________________^\u001b[0m\n\u001b[1m\u001b[94m709\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m result = combined => result,\n\u001b[1m\u001b[94m710\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m () = cancel_token.cancelled() => {\n\u001b[1m\u001b[94m711\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m tracing::info!(\"cargo run cancelled by newer request\");\n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n\u001b[1m\u001b[94m715\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 \u001b[1m\u001b[91m^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m \u001b[1m\u001b[91m|\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m|_________`(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)` is not a future\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91mrequired by a bound introduced by this call\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: the trait `Future` is not implemented for `(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)`\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: (Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>) must be a future or must implement `IntoFuture` to be awaited\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: required for `(Result<(), anyhow::Error>, HashMap<Uri, (Vec<ls_types::Diagnostic>, bool)>)` to implement `IntoFuture`\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `$crate::select` which comes from the expansion of the macro `tokio::select` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}}