- Add TTF text rendering for subtitles and YOLO labels - Implement ASR subtitle display with background - Add YOLO bbox rendering with class labels - Add zoom in/out (+/-) and reset (Backquote) - Add frame/time info display - Fix YOLO metadata parsing for actual file format - Add Shift+Arrow for 1-second seek
16 lines
40 KiB
Plaintext
16 lines
40 KiB
Plaintext
{"$message_type":"diagnostic","message":"expected identifier, found `0`","code":null,"level":"error","spans":[{"file_name":"src/main.rs","byte_start":9983,"byte_end":9984,"line_start":235,"line_end":235,"column_start":54,"column_end":55,"is_primary":true,"text":[{"text":" sdl2::keyboard::Keycode::0 => {","highlight_start":54,"highlight_end":55}],"label":"expected identifier","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: expected identifier, found `0`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:235:54\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m235\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m sdl2::keyboard::Keycode::0 => {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mexpected identifier\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"unresolved import `sdl2::ttf`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":221,"byte_end":230,"line_start":9,"line_end":9,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":"use sdl2::ttf;","highlight_start":5,"highlight_end":14}],"label":"no `ttf` in the root","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"found an item that was configured out","code":null,"level":"note","spans":[{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/lib.rs","byte_start":2252,"byte_end":2267,"line_start":102,"line_end":102,"column_start":7,"column_end":22,"is_primary":false,"text":[{"text":"#[cfg(feature = \"ttf\")]","highlight_start":7,"highlight_end":22}],"label":"the item is gated behind the `ttf` feature","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/lib.rs","byte_start":2278,"byte_end":2281,"line_start":103,"line_end":103,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":"pub mod ttf;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `sdl2::ttf`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:9:5\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m9\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use sdl2::ttf;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mno `ttf` in the root\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: found an item that was configured out\n \u001b[1m\u001b[94m--> \u001b[0m/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/lib.rs:103:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m102\u001b[0m \u001b[1m\u001b[94m|\u001b[0m #[cfg(feature = \"ttf\")]\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---------------\u001b[0m \u001b[1m\u001b[94mthe item is gated behind the `ttf` feature\u001b[0m\n\u001b[1m\u001b[94m103\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub mod ttf;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused import: `sdl2::pixels::PixelFormatEnum`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/player/renderer.rs","byte_start":50,"byte_end":79,"line_start":4,"line_end":4,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"use sdl2::pixels::PixelFormatEnum;","highlight_start":5,"highlight_end":34}],"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":"src/player/renderer.rs","byte_start":46,"byte_end":81,"line_start":4,"line_end":5,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use sdl2::pixels::PixelFormatEnum;","highlight_start":1,"highlight_end":35},{"text":"use sdl2::rect::Rect;","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: `sdl2::pixels::PixelFormatEnum`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/player/renderer.rs:4:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use sdl2::pixels::PixelFormatEnum;\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 imports: `PlaybackState` and `PlayerState`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/player/mod.rs","byte_start":154,"byte_end":167,"line_start":10,"line_end":10,"column_start":17,"column_end":30,"is_primary":true,"text":[{"text":"pub use state::{PlaybackState, PlayerState};","highlight_start":17,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/player/mod.rs","byte_start":169,"byte_end":180,"line_start":10,"line_end":10,"column_start":32,"column_end":43,"is_primary":true,"text":[{"text":"pub use state::{PlaybackState, PlayerState};","highlight_start":32,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/player/mod.rs","byte_start":138,"byte_end":183,"line_start":10,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"pub use state::{PlaybackState, PlayerState};","highlight_start":1,"highlight_end":45},{"text":"pub use video::VideoPlayer;","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 imports: `PlaybackState` and `PlayerState`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/player/mod.rs:10:17\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m10\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub use state::{PlaybackState, PlayerState};\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused import: `video::VideoPlayer`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/player/mod.rs","byte_start":191,"byte_end":209,"line_start":11,"line_end":11,"column_start":9,"column_end":27,"is_primary":true,"text":[{"text":"pub use video::VideoPlayer;","highlight_start":9,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/player/mod.rs","byte_start":183,"byte_end":211,"line_start":11,"line_end":11,"column_start":1,"column_end":29,"is_primary":true,"text":[{"text":"pub use video::VideoPlayer;","highlight_start":1,"highlight_end":29}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `video::VideoPlayer`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/player/mod.rs:11:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m11\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub use video::VideoPlayer;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused import: `bridge::WebBridge`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/web/mod.rs","byte_start":60,"byte_end":77,"line_start":5,"line_end":5,"column_start":9,"column_end":26,"is_primary":true,"text":[{"text":"pub use bridge::WebBridge;","highlight_start":9,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/web/mod.rs","byte_start":52,"byte_end":79,"line_start":5,"line_end":5,"column_start":1,"column_end":28,"is_primary":true,"text":[{"text":"pub use bridge::WebBridge;","highlight_start":1,"highlight_end":28}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `bridge::WebBridge`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/web/mod.rs:5:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m5\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub use bridge::WebBridge;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":4355,"byte_end":4394,"line_start":139,"line_end":139,"column_start":53,"column_end":92,"is_primary":true,"text":[{"text":" let shift = keymod.contains(sdl2::keyboard::Scancode::LShift as u16)","highlight_start":53,"highlight_end":92}],"label":"expected `Mod`, found `u16`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":4346,"byte_end":4354,"line_start":139,"line_end":139,"column_start":44,"column_end":52,"is_primary":false,"text":[{"text":" let shift = keymod.contains(sdl2::keyboard::Scancode::LShift as u16)","highlight_start":44,"highlight_end":52}],"label":"arguments to this method are incorrect","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"method defined here","code":null,"level":"note","spans":[{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":19699,"byte_end":19707,"line_start":603,"line_end":603,"column_start":26,"column_end":34,"is_primary":true,"text":[{"text":" pub const fn contains(&self, other: Self) -> bool {","highlight_start":26,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":11525,"byte_end":11713,"line_start":368,"line_end":375,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":" __impl_bitflags! {","highlight_start":9,"highlight_end":27},{"text":" $BitFlags: $T {","highlight_start":1,"highlight_end":28},{"text":" $(","highlight_start":1,"highlight_end":19},{"text":" $(#[$inner $($args)*])*","highlight_start":1,"highlight_end":44},{"text":" $Flag = $value;","highlight_start":1,"highlight_end":36},{"text":" )*","highlight_start":1,"highlight_end":19},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/keyboard/mod.rs","byte_start":373,"byte_end":841,"line_start":19,"line_end":35,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"bitflags! {","highlight_start":1,"highlight_end":1},{"text":" pub struct Mod: u16 {","highlight_start":1,"highlight_end":1},{"text":" const NOMOD = 0x0000;","highlight_start":1,"highlight_end":1},{"text":" const LSHIFTMOD = 0x0001;","highlight_start":1,"highlight_end":1},{"text":" const RSHIFTMOD = 0x0002;","highlight_start":1,"highlight_end":1},{"text":" const LCTRLMOD = 0x0040;","highlight_start":1,"highlight_end":1},{"text":" const RCTRLMOD = 0x0080;","highlight_start":1,"highlight_end":1},{"text":" const LALTMOD = 0x0100;","highlight_start":1,"highlight_end":1},{"text":" const RALTMOD = 0x0200;","highlight_start":1,"highlight_end":1},{"text":" const LGUIMOD = 0x0400;","highlight_start":1,"highlight_end":1},{"text":" const RGUIMOD = 0x0800;","highlight_start":1,"highlight_end":1},{"text":" const NUMMOD = 0x1000;","highlight_start":1,"highlight_end":1},{"text":" const CAPSMOD = 0x2000;","highlight_start":1,"highlight_end":1},{"text":" const MODEMOD = 0x4000;","highlight_start":1,"highlight_end":1},{"text":" const RESERVEDMOD = 0x8000;","highlight_start":1,"highlight_end":1},{"text":" }","highlight_start":1,"highlight_end":1},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"bitflags!","def_site_span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":11087,"byte_end":11108,"line_start":350,"line_end":350,"column_start":1,"column_end":22,"is_primary":false,"text":[{"text":"macro_rules! bitflags {","highlight_start":1,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"__impl_bitflags!","def_site_span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":12812,"byte_end":12840,"line_start":424,"line_end":424,"column_start":1,"column_end":29,"is_primary":false,"text":[{"text":"macro_rules! __impl_bitflags {","highlight_start":1,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0308]\u001b[0m\u001b[1m: mismatched types\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:139:53\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m139\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let shift = keymod.contains(sdl2::keyboard::Scancode::LShift as u16)\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m--------\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mexpected `Mod`, found `u16`\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[94marguments to this method are incorrect\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: method defined here\n \u001b[1m\u001b[94m--> \u001b[0m/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/keyboard/mod.rs:19:1\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m19\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m/\u001b[0m bitflags! {\n \u001b[1m\u001b[94m20\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m pub struct Mod: u16 {\n \u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m const NOMOD = 0x0000;\n \u001b[1m\u001b[94m22\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m const LSHIFTMOD = 0x0001;\n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[92m|\u001b[0m\n \u001b[1m\u001b[94m35\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m }\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|_^\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":4443,"byte_end":4482,"line_start":140,"line_end":140,"column_start":48,"column_end":87,"is_primary":true,"text":[{"text":" || keymod.contains(sdl2::keyboard::Scancode::RShift as u16);","highlight_start":48,"highlight_end":87}],"label":"expected `Mod`, found `u16`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":4434,"byte_end":4442,"line_start":140,"line_end":140,"column_start":39,"column_end":47,"is_primary":false,"text":[{"text":" || keymod.contains(sdl2::keyboard::Scancode::RShift as u16);","highlight_start":39,"highlight_end":47}],"label":"arguments to this method are incorrect","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"method defined here","code":null,"level":"note","spans":[{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":19699,"byte_end":19707,"line_start":603,"line_end":603,"column_start":26,"column_end":34,"is_primary":true,"text":[{"text":" pub const fn contains(&self, other: Self) -> bool {","highlight_start":26,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":11525,"byte_end":11713,"line_start":368,"line_end":375,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":" __impl_bitflags! {","highlight_start":9,"highlight_end":27},{"text":" $BitFlags: $T {","highlight_start":1,"highlight_end":28},{"text":" $(","highlight_start":1,"highlight_end":19},{"text":" $(#[$inner $($args)*])*","highlight_start":1,"highlight_end":44},{"text":" $Flag = $value;","highlight_start":1,"highlight_end":36},{"text":" )*","highlight_start":1,"highlight_end":19},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/keyboard/mod.rs","byte_start":373,"byte_end":841,"line_start":19,"line_end":35,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"bitflags! {","highlight_start":1,"highlight_end":12},{"text":" pub struct Mod: u16 {","highlight_start":1,"highlight_end":26},{"text":" const NOMOD = 0x0000;","highlight_start":1,"highlight_end":30},{"text":" const LSHIFTMOD = 0x0001;","highlight_start":1,"highlight_end":34},{"text":" const RSHIFTMOD = 0x0002;","highlight_start":1,"highlight_end":34},{"text":" const LCTRLMOD = 0x0040;","highlight_start":1,"highlight_end":33},{"text":" const RCTRLMOD = 0x0080;","highlight_start":1,"highlight_end":33},{"text":" const LALTMOD = 0x0100;","highlight_start":1,"highlight_end":32},{"text":" const RALTMOD = 0x0200;","highlight_start":1,"highlight_end":32},{"text":" const LGUIMOD = 0x0400;","highlight_start":1,"highlight_end":32},{"text":" const RGUIMOD = 0x0800;","highlight_start":1,"highlight_end":32},{"text":" const NUMMOD = 0x1000;","highlight_start":1,"highlight_end":31},{"text":" const CAPSMOD = 0x2000;","highlight_start":1,"highlight_end":32},{"text":" const MODEMOD = 0x4000;","highlight_start":1,"highlight_end":32},{"text":" const RESERVEDMOD = 0x8000;","highlight_start":1,"highlight_end":36},{"text":" }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"bitflags!","def_site_span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":11087,"byte_end":11108,"line_start":350,"line_end":350,"column_start":1,"column_end":22,"is_primary":false,"text":[{"text":"macro_rules! bitflags {","highlight_start":1,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"__impl_bitflags!","def_site_span":{"file_name":"/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-1.3.2/src/lib.rs","byte_start":12812,"byte_end":12840,"line_start":424,"line_end":424,"column_start":1,"column_end":29,"is_primary":false,"text":[{"text":"macro_rules! __impl_bitflags {","highlight_start":1,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0308]\u001b[0m\u001b[1m: mismatched types\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:140:48\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m140\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0m || keymod.contains(sdl2::keyboard::Scancode::RShift as u16);\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m--------\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mexpected `Mod`, found `u16`\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[94marguments to this method are incorrect\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: method defined here\n \u001b[1m\u001b[94m--> \u001b[0m/Users/accusys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sdl2-0.38.0/src/sdl2/keyboard/mod.rs:19:1\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m19\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m/\u001b[0m bitflags! {\n \u001b[1m\u001b[94m20\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m pub struct Mod: u16 {\n \u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m const NOMOD = 0x0000;\n \u001b[1m\u001b[94m22\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m const LSHIFTMOD = 0x0001;\n\u001b[1m\u001b[94m...\u001b[0m \u001b[1m\u001b[92m|\u001b[0m\n \u001b[1m\u001b[94m35\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|\u001b[0m }\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m|_^\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
|
|
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":13910,"byte_end":13914,"line_start":322,"line_end":322,"column_start":46,"column_end":50,"is_primary":true,"text":[{"text":" if let Ok(surface) = font","highlight_start":46,"highlight_end":50}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:322:46\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m322\u001b[0m \u001b[1m\u001b[94m|\u001b[0m if let Ok(surface) = font\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91mcannot infer type\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":14846,"byte_end":14850,"line_start":343,"line_end":343,"column_start":46,"column_end":50,"is_primary":true,"text":[{"text":" if let Ok(surface) = font","highlight_start":46,"highlight_end":50}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:343:46\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m343\u001b[0m \u001b[1m\u001b[94m|\u001b[0m if let Ok(surface) = font\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91mcannot infer type\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":17254,"byte_end":17258,"line_start":399,"line_end":399,"column_start":42,"column_end":46,"is_primary":true,"text":[{"text":" if let Ok(surface) = font","highlight_start":42,"highlight_end":46}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:399:42\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m399\u001b[0m \u001b[1m\u001b[94m|\u001b[0m if let Ok(surface) = font\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^\u001b[0m \u001b[1m\u001b[91mcannot infer type\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":17569,"byte_end":17576,"line_start":404,"line_end":404,"column_start":82,"column_end":89,"is_primary":false,"text":[{"text":" let rect = Rect::new(10, y_offset + (i as i32 * 26), surface.width(), surface.height());","highlight_start":82,"highlight_end":89}],"label":"type must be known at this point","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":17448,"byte_end":17475,"line_start":403,"line_end":403,"column_start":58,"column_end":85,"is_primary":true,"text":[{"text":" if let Ok(tex) = texture_creator.create_texture_from_surface(&surface) {","highlight_start":58,"highlight_end":85}],"label":"cannot infer type of the type parameter `S` declared on the method `create_texture_from_surface`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider specifying the generic argument","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":17475,"byte_end":17475,"line_start":403,"line_end":403,"column_start":85,"column_end":85,"is_primary":true,"text":[{"text":" if let Ok(tex) = texture_creator.create_texture_from_surface(&surface) {","highlight_start":85,"highlight_end":85}],"label":null,"suggested_replacement":"::<&_>","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:403:58\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m403\u001b[0m \u001b[1m\u001b[94m|\u001b[0m if let Ok(tex) = texture_creator.create_texture_from_surface(&surface) {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mcannot infer type of the type parameter `S` declared on the method `create_texture_from_surface`\u001b[0m\n\u001b[1m\u001b[94m404\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let rect = Rect::new(10, y_offset + (i as i32 * 26), surface.width(), surface.height());\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m-------\u001b[0m \u001b[1m\u001b[94mtype must be known at this point\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider specifying the generic argument\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m403\u001b[0m \u001b[1m\u001b[94m| \u001b[0m if let Ok(tex) = texture_creator.create_texture_from_surface\u001b[92m::<&_>\u001b[0m(&surface) {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"aborting due to 8 previous errors; 4 warnings emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 8 previous errors; 4 warnings emitted\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0282, E0308, E0432.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mSome errors have detailed explanations: E0282, E0308, E0432.\u001b[0m\n"}
|
|
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0282`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about an error, try `rustc --explain E0282`.\u001b[0m\n"}
|