{"$message_type":"diagnostic","message":"unused import: `ipu_target::ipu21::fabric::Topology`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"crates/ipu-codegen/src/tile.rs","byte_start":81,"byte_end":116,"line_start":3,"line_end":3,"column_start":5,"column_end":40,"is_primary":true,"text":[{"text":"use ipu_target::ipu21::fabric::Topology;","highlight_start":5,"highlight_end":40}],"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 whole `use` item","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/tile.rs","byte_start":77,"byte_end":118,"line_start":3,"line_end":4,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use ipu_target::ipu21::fabric::Topology;","highlight_start":1,"highlight_end":41},{"text":"use ipu_target::ipu21::instruction::{RETURN_M10_INSTRUCTION};","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `ipu_target::ipu21::fabric::Topology`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/tile.rs:3:5\n  \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m3\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ipu_target::ipu21::fabric::Topology;\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":"unused import: `RETURN_M10_INSTRUCTION`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"crates/ipu-codegen/src/tile.rs","byte_start":155,"byte_end":177,"line_start":4,"line_end":4,"column_start":38,"column_end":60,"is_primary":true,"text":[{"text":"use ipu_target::ipu21::instruction::{RETURN_M10_INSTRUCTION};","highlight_start":38,"highlight_end":60}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/tile.rs","byte_start":118,"byte_end":180,"line_start":4,"line_end":5,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use ipu_target::ipu21::instruction::{RETURN_M10_INSTRUCTION};","highlight_start":1,"highlight_end":62},{"text":"#[cfg(test)]","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `RETURN_M10_INSTRUCTION`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/tile.rs:4:38\n  \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ipu_target::ipu21::instruction::{RETURN_M10_INSTRUCTION};\n  \u001b[1m\u001b[94m|\u001b[0m                                      \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":972,"byte_end":1096,"line_start":27,"line_end":31,"column_start":20,"column_end":6,"is_primary":false,"text":[{"text":"    let topology = Topology::new(","highlight_start":20,"highlight_end":34},{"text":"        (0..tile_count)","highlight_start":1,"highlight_end":24},{"text":"            .map(ipu_target::c600::logical_to_physical)","highlight_start":1,"highlight_end":56},{"text":"            .collect(),","highlight_start":1,"highlight_end":24},{"text":"    )?;","highlight_start":1,"highlight_end":6}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":826,"byte_end":903,"line_start":25,"line_end":25,"column_start":6,"column_end":83,"is_primary":false,"text":[{"text":") -> Result<(ExchangeScheduleProblem, ExchangeScheduleRun), ExchangeLoweringError> {","highlight_start":6,"highlight_end":83}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":1096,"byte_end":1097,"line_start":31,"line_end":31,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"    )?;","highlight_start":6,"highlight_end":7}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":1096,"byte_end":1097,"line_start":31,"line_end":31,"column_start":6,"column_end":7,"is_primary":false,"text":[{"text":"    )?;","highlight_start":6,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange/replay.rs:31:6\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 25\u001b[0m \u001b[1m\u001b[94m|\u001b[0m   ) -> Result<(ExchangeScheduleProblem, ExchangeScheduleRun), ExchangeLoweringError> {\n    \u001b[1m\u001b[94m|\u001b[0m        \u001b[1m\u001b[94m-----------------------------------------------------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m 26\u001b[0m \u001b[1m\u001b[94m|\u001b[0m       validate_snapshot_tile_count(tile_count)?;\n\u001b[1m\u001b[94m 27\u001b[0m \u001b[1m\u001b[94m|\u001b[0m       let topology = Topology::new(\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m ____________________-\u001b[0m\n\u001b[1m\u001b[94m 28\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m         (0..tile_count)\n\u001b[1m\u001b[94m 29\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m             .map(ipu_target::c600::logical_to_physical)\n\u001b[1m\u001b[94m 30\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m             .collect(),\n\u001b[1m\u001b[94m 31\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     )?;\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     \u001b[1m\u001b[94m-\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|_____|\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m       \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n    \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":2362,"byte_end":2486,"line_start":71,"line_end":75,"column_start":20,"column_end":6,"is_primary":false,"text":[{"text":"    let topology = Topology::new(","highlight_start":20,"highlight_end":34},{"text":"        (0..tile_count)","highlight_start":1,"highlight_end":24},{"text":"            .map(ipu_target::c600::logical_to_physical)","highlight_start":1,"highlight_end":56},{"text":"            .collect(),","highlight_start":1,"highlight_end":24},{"text":"    )?;","highlight_start":1,"highlight_end":6}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":2243,"byte_end":2293,"line_start":69,"line_end":69,"column_start":6,"column_end":56,"is_primary":false,"text":[{"text":") -> Result<ExchangeScheduleRun, ExchangeLoweringError> {","highlight_start":6,"highlight_end":56}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":2486,"byte_end":2487,"line_start":75,"line_end":75,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"    )?;","highlight_start":6,"highlight_end":7}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange/replay.rs","byte_start":2486,"byte_end":2487,"line_start":75,"line_end":75,"column_start":6,"column_end":7,"is_primary":false,"text":[{"text":"    )?;","highlight_start":6,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange/replay.rs:75:6\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 69\u001b[0m \u001b[1m\u001b[94m|\u001b[0m   ) -> Result<ExchangeScheduleRun, ExchangeLoweringError> {\n    \u001b[1m\u001b[94m|\u001b[0m        \u001b[1m\u001b[94m--------------------------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m 70\u001b[0m \u001b[1m\u001b[94m|\u001b[0m       validate_snapshot_tile_count(tile_count)?;\n\u001b[1m\u001b[94m 71\u001b[0m \u001b[1m\u001b[94m|\u001b[0m       let topology = Topology::new(\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m ____________________-\u001b[0m\n\u001b[1m\u001b[94m 72\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m         (0..tile_count)\n\u001b[1m\u001b[94m 73\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m             .map(ipu_target::c600::logical_to_physical)\n\u001b[1m\u001b[94m 74\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m             .collect(),\n\u001b[1m\u001b[94m 75\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     )?;\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     \u001b[1m\u001b[94m-\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|_____|\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m       \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n    \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange/relocation.rs","byte_start":2647,"byte_end":2677,"line_start":62,"line_end":62,"column_start":33,"column_end":63,"is_primary":false,"text":[{"text":"                                encode_put_special_m(0xa7, 15)?;","highlight_start":33,"highlight_end":63}],"label":"this can't be annotated with `?` because it has type `Result<_, InstructionError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange/relocation.rs","byte_start":2677,"byte_end":2678,"line_start":62,"line_end":62,"column_start":63,"column_end":64,"is_primary":true,"text":[{"text":"                                encode_put_special_m(0xa7, 15)?;","highlight_start":63,"highlight_end":64}],"label":"the trait `From<InstructionError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange/relocation.rs","byte_start":2677,"byte_end":2678,"line_start":62,"line_end":62,"column_start":63,"column_end":64,"is_primary":false,"text":[{"text":"                                encode_put_special_m(0xa7, 15)?;","highlight_start":63,"highlight_end":64}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<InstructionError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange/relocation.rs:62:63\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 62\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m                   encode_put_special_m(0xa7, 15)?;\n    \u001b[1m\u001b[94m|\u001b[0m                       \u001b[1m\u001b[94m------------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<InstructionError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                       \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                       \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, InstructionError>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<InstructionError>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n    \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange/relocation.rs","byte_start":1982,"byte_end":2011,"line_start":49,"line_end":49,"column_start":30,"column_end":59,"is_primary":false,"text":[{"text":"                let moving = encode_put_special_m(0xa7, 6)?;","highlight_start":30,"highlight_end":59}],"label":"this can't be annotated with `?` because it has type `Result<_, InstructionError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange/relocation.rs","byte_start":2011,"byte_end":2012,"line_start":49,"line_end":49,"column_start":59,"column_end":60,"is_primary":true,"text":[{"text":"                let moving = encode_put_special_m(0xa7, 6)?;","highlight_start":59,"highlight_end":60}],"label":"the trait `From<InstructionError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange/relocation.rs","byte_start":2011,"byte_end":2012,"line_start":49,"line_end":49,"column_start":59,"column_end":60,"is_primary":false,"text":[{"text":"                let moving = encode_put_special_m(0xa7, 6)?;","highlight_start":59,"highlight_end":60}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<InstructionError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange/relocation.rs:49:59\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 49\u001b[0m \u001b[1m\u001b[94m|\u001b[0m                 let moving = encode_put_special_m(0xa7, 6)?;\n    \u001b[1m\u001b[94m|\u001b[0m                              \u001b[1m\u001b[94m-----------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<InstructionError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                              \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                              \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, InstructionError>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<InstructionError>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n    \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":33783,"byte_end":33814,"line_start":888,"line_end":888,"column_start":36,"column_end":67,"is_primary":false,"text":[{"text":"        let source_pair = topology.paired_logical(transfer.source)?;","highlight_start":36,"highlight_end":67}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":33431,"byte_end":33490,"line_start":881,"line_end":881,"column_start":6,"column_end":65,"is_primary":false,"text":[{"text":") -> Result<Vec<Option<PendingTransfer>>, ExchangeLoweringError> {","highlight_start":6,"highlight_end":65}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":33814,"byte_end":33815,"line_start":888,"line_end":888,"column_start":67,"column_end":68,"is_primary":true,"text":[{"text":"        let source_pair = topology.paired_logical(transfer.source)?;","highlight_start":67,"highlight_end":68}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":33814,"byte_end":33815,"line_start":888,"line_end":888,"column_start":67,"column_end":68,"is_primary":false,"text":[{"text":"        let source_pair = topology.paired_logical(transfer.source)?;","highlight_start":67,"highlight_end":68}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:888:67\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m881\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Result<Vec<Option<PendingTransfer>>, ExchangeLoweringError> {\n    \u001b[1m\u001b[94m|\u001b[0m      \u001b[1m\u001b[94m-----------------------------------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m888\u001b[0m \u001b[1m\u001b[94m|\u001b[0m         let source_pair = topology.paired_logical(transfer.source)?;\n    \u001b[1m\u001b[94m|\u001b[0m                                    \u001b[1m\u001b[94m-------------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                                    \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                                    \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n    \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":34102,"byte_end":34116,"line_start":897,"line_end":897,"column_start":33,"column_end":47,"is_primary":false,"text":[{"text":"                .entry(topology.physical(tile)? & !2)","highlight_start":33,"highlight_end":47}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":33431,"byte_end":33490,"line_start":881,"line_end":881,"column_start":6,"column_end":65,"is_primary":false,"text":[{"text":") -> Result<Vec<Option<PendingTransfer>>, ExchangeLoweringError> {","highlight_start":6,"highlight_end":65}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":34116,"byte_end":34117,"line_start":897,"line_end":897,"column_start":47,"column_end":48,"is_primary":true,"text":[{"text":"                .entry(topology.physical(tile)? & !2)","highlight_start":47,"highlight_end":48}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":34116,"byte_end":34117,"line_start":897,"line_end":897,"column_start":47,"column_end":48,"is_primary":false,"text":[{"text":"                .entry(topology.physical(tile)? & !2)","highlight_start":47,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:897:47\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m881\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Result<Vec<Option<PendingTransfer>>, ExchangeLoweringError> {\n    \u001b[1m\u001b[94m|\u001b[0m      \u001b[1m\u001b[94m-----------------------------------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m897\u001b[0m \u001b[1m\u001b[94m|\u001b[0m                 .entry(topology.physical(tile)? & !2)\n    \u001b[1m\u001b[94m|\u001b[0m                                 \u001b[1m\u001b[94m--------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                                 \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m                                 \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n    \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n    \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":41399,"byte_end":41430,"line_start":1064,"line_end":1064,"column_start":47,"column_end":78,"is_primary":false,"text":[{"text":"                        let paired = topology.paired_logical(transfer.source)?;","highlight_start":47,"highlight_end":78}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":41430,"byte_end":41431,"line_start":1064,"line_end":1064,"column_start":78,"column_end":79,"is_primary":true,"text":[{"text":"                        let paired = topology.paired_logical(transfer.source)?;","highlight_start":78,"highlight_end":79}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":41430,"byte_end":41431,"line_start":1064,"line_end":1064,"column_start":78,"column_end":79,"is_primary":false,"text":[{"text":"                        let paired = topology.paired_logical(transfer.source)?;","highlight_start":78,"highlight_end":79}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:1064:78\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m1064\u001b[0m \u001b[1m\u001b[94m|\u001b[0m                         let paired = topology.paired_logical(transfer.source)?;\n     \u001b[1m\u001b[94m|\u001b[0m                                               \u001b[1m\u001b[94m-------------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                                               \u001b[1m\u001b[94m|\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                                               \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n     \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n     \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n     \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m 192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m 193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n     \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":55615,"byte_end":55650,"line_start":1474,"line_end":1474,"column_start":10,"column_end":45,"is_primary":false,"text":[{"text":"        .collect::<Result<BTreeSet<_>, _>>()?;","highlight_start":10,"highlight_end":45}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":53247,"byte_end":53280,"line_start":1411,"line_end":1411,"column_start":6,"column_end":39,"is_primary":false,"text":[{"text":") -> Result<(), ExchangeLoweringError> {","highlight_start":6,"highlight_end":39}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":55650,"byte_end":55651,"line_start":1474,"line_end":1474,"column_start":45,"column_end":46,"is_primary":true,"text":[{"text":"        .collect::<Result<BTreeSet<_>, _>>()?;","highlight_start":45,"highlight_end":46}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":55650,"byte_end":55651,"line_start":1474,"line_end":1474,"column_start":45,"column_end":46,"is_primary":false,"text":[{"text":"        .collect::<Result<BTreeSet<_>, _>>()?;","highlight_start":45,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:1474:45\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m1411\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Result<(), ExchangeLoweringError> {\n     \u001b[1m\u001b[94m|\u001b[0m      \u001b[1m\u001b[94m---------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m1474\u001b[0m \u001b[1m\u001b[94m|\u001b[0m         .collect::<Result<BTreeSet<_>, _>>()?;\n     \u001b[1m\u001b[94m|\u001b[0m          \u001b[1m\u001b[94m-----------------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m          \u001b[1m\u001b[94m|\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m          \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n     \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n     \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n     \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m 192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m 193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n     \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":59294,"byte_end":59305,"line_start":1549,"line_end":1549,"column_start":26,"column_end":37,"is_primary":false,"text":[{"text":"                        .transpose()?;","highlight_start":26,"highlight_end":37}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":53247,"byte_end":53280,"line_start":1411,"line_end":1411,"column_start":6,"column_end":39,"is_primary":false,"text":[{"text":") -> Result<(), ExchangeLoweringError> {","highlight_start":6,"highlight_end":39}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":59305,"byte_end":59306,"line_start":1549,"line_end":1549,"column_start":37,"column_end":38,"is_primary":true,"text":[{"text":"                        .transpose()?;","highlight_start":37,"highlight_end":38}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":59305,"byte_end":59306,"line_start":1549,"line_end":1549,"column_start":37,"column_end":38,"is_primary":false,"text":[{"text":"                        .transpose()?;","highlight_start":37,"highlight_end":38}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:1549:37\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m1411\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Result<(), ExchangeLoweringError> {\n     \u001b[1m\u001b[94m|\u001b[0m      \u001b[1m\u001b[94m---------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m1549\u001b[0m \u001b[1m\u001b[94m|\u001b[0m                         .transpose()?;\n     \u001b[1m\u001b[94m|\u001b[0m                          \u001b[1m\u001b[94m-----------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                          \u001b[1m\u001b[94m|\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                          \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n     \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n     \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n     \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m 192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m 193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n     \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":99011,"byte_end":99033,"line_start":2603,"line_end":2603,"column_start":54,"column_end":76,"is_primary":false,"text":[{"text":"        ExchangeItemWidth::Paired64 => Some(topology.paired_logical(source)?),","highlight_start":54,"highlight_end":76}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":97924,"byte_end":97974,"line_start":2575,"line_end":2575,"column_start":6,"column_end":56,"is_primary":false,"text":[{"text":") -> Result<PhaseTransferTiming, ExchangeLoweringError> {","highlight_start":6,"highlight_end":56}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":99033,"byte_end":99034,"line_start":2603,"line_end":2603,"column_start":76,"column_end":77,"is_primary":true,"text":[{"text":"        ExchangeItemWidth::Paired64 => Some(topology.paired_logical(source)?),","highlight_start":76,"highlight_end":77}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":99033,"byte_end":99034,"line_start":2603,"line_end":2603,"column_start":76,"column_end":77,"is_primary":false,"text":[{"text":"        ExchangeItemWidth::Paired64 => Some(topology.paired_logical(source)?),","highlight_start":76,"highlight_end":77}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:2603:76\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2575\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Result<PhaseTransferTiming, ExchangeLoweringError> {\n     \u001b[1m\u001b[94m|\u001b[0m      \u001b[1m\u001b[94m--------------------------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m2603\u001b[0m \u001b[1m\u001b[94m|\u001b[0m         ExchangeItemWidth::Paired64 => Some(topology.paired_logical(source)?),\n     \u001b[1m\u001b[94m|\u001b[0m                                                      \u001b[1m\u001b[94m----------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                                                      \u001b[1m\u001b[94m|\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                                                      \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n     \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n     \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n     \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m 192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m 193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n     \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `exchange::ExchangeLoweringError`","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":"crates/ipu-codegen/src/exchange.rs","byte_start":99817,"byte_end":99833,"line_start":2620,"line_end":2620,"column_start":26,"column_end":42,"is_primary":false,"text":[{"text":"                topology.physical(source)?,","highlight_start":26,"highlight_end":42}],"label":"this can't be annotated with `?` because it has type `Result<_, TopologyError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":97924,"byte_end":97974,"line_start":2575,"line_end":2575,"column_start":6,"column_end":56,"is_primary":false,"text":[{"text":") -> Result<PhaseTransferTiming, ExchangeLoweringError> {","highlight_start":6,"highlight_end":56}],"label":"expected `exchange::ExchangeLoweringError` because of this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":99833,"byte_end":99834,"line_start":2620,"line_end":2620,"column_start":42,"column_end":43,"is_primary":true,"text":[{"text":"                topology.physical(source)?,","highlight_start":42,"highlight_end":43}],"label":"the trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":99833,"byte_end":99834,"line_start":2620,"line_end":2620,"column_start":42,"column_end":43,"is_primary":false,"text":[{"text":"                topology.physical(source)?,","highlight_start":42,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/ipu-codegen/src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`","code":null,"level":"note","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6471,"byte_end":6501,"line_start":189,"line_end":189,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"pub enum ExchangeLoweringError {","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`exchange::ExchangeLoweringError` implements trait `From<T>`","code":null,"level":"help","spans":[{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6545,"byte_end":6549,"line_start":191,"line_end":191,"column_start":16,"column_end":20,"is_primary":true,"text":[{"text":"    Exchange(#[from] ipu_exchange::ExchangeError),","highlight_start":16,"highlight_end":20}],"label":"`From<ExchangeError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/ipu-codegen/src/exchange.rs","byte_start":6621,"byte_end":6625,"line_start":193,"line_end":193,"column_start":15,"column_end":19,"is_primary":true,"text":[{"text":"    Storage(#[from] crate::StorageError),","highlight_start":15,"highlight_end":19}],"label":"`From<storage::StorageError>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error to `exchange::ExchangeLoweringError`\u001b[0m\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:2620:42\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2575\u001b[0m \u001b[1m\u001b[94m|\u001b[0m ) -> Result<PhaseTransferTiming, ExchangeLoweringError> {\n     \u001b[1m\u001b[94m|\u001b[0m      \u001b[1m\u001b[94m--------------------------------------------------\u001b[0m \u001b[1m\u001b[94mexpected `exchange::ExchangeLoweringError` because of this\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m2620\u001b[0m \u001b[1m\u001b[94m|\u001b[0m                 topology.physical(source)?,\n     \u001b[1m\u001b[94m|\u001b[0m                          \u001b[1m\u001b[94m----------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `From<TopologyError>` is not implemented for `exchange::ExchangeLoweringError`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                          \u001b[1m\u001b[94m|\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m                          \u001b[1m\u001b[94mthis can't be annotated with `?` because it has type `Result<_, TopologyError>`\u001b[0m\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: `exchange::ExchangeLoweringError` needs to implement `From<TopologyError>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:189:1\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 189\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum ExchangeLoweringError {\n     \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n     \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n\u001b[1m\u001b[96mhelp\u001b[0m: `exchange::ExchangeLoweringError` implements trait `From<T>`\n    \u001b[1m\u001b[94m--> \u001b[0mcrates/ipu-codegen/src/exchange.rs:191:16\n     \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 191\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Exchange(#[from] ipu_exchange::ExchangeError),\n     \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<ExchangeError>`\u001b[0m\n\u001b[1m\u001b[94m 192\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     #[error(transparent)]\n\u001b[1m\u001b[94m 193\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     Storage(#[from] crate::StorageError),\n     \u001b[1m\u001b[94m|\u001b[0m               \u001b[1m\u001b[96m^^^^\u001b[0m \u001b[1m\u001b[96m`From<storage::StorageError>`\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"aborting due to 11 previous errors; 2 warnings emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 11 previous errors; 2 warnings emitted\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"For more information about this error, try `rustc --explain E0277`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about this error, try `rustc --explain E0277`.\u001b[0m\n"}
