Created
May 31, 2020 18:23
-
-
Save daleharvey/2b58a7e572a231f0ebb064efbacff7d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dale@ubuntu:~/src/gecko$ /home/dale/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name xpcom xpcom/rust/xpcom/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C metadata=3eedb11fcf141f56 -C extra-filename=-3eedb11fcf141f56 --out-dir /home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/home/dale/src/gecko/build/cargo-linker -C incremental=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/release/deps --extern libc=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/liblibc-0024dbac27863b53.rmeta --extern nserror=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libnserror-a93449110c0a5b8c.rmeta --extern nsstring=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libnsstring-044ff5ce2030bee1.rmeta --extern thin_vec=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libthin_vec-d37687b6451e94c4.rmeta --extern threadbound=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libthreadbound-1a58ac9ade07f6db.rmeta --extern xpcom_macros=/home/dale/src/gecko/obj-x86_64-pc-linux-gnu/release/deps/libxpcom_macros-96f8d5ebc7cc7420.so -C opt-level=1 -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -Clto=off | |
{"message":"environment variable `MOZ_TOPOBJDIR` not defined","code":null,"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/idl.rs","byte_start":398,"byte_end":419,"line_start":12,"line_end":12,"column_start":18,"column_end":39,"is_primary":true,"text":[{"text":"include!(concat!(env!(\"MOZ_TOPOBJDIR\"), \"/dist/xpcrs/rt/all.rs\"));","highlight_start":18,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: environment variable `MOZ_TOPOBJDIR` not defined\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/idl.rs:12:18\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m12\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0minclude!(concat!(env!(\"MOZ_TOPOBJDIR\"), \"/dist/xpcrs/rt/all.rs\"));\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"} | |
{"message":"environment variable `MOZ_TOPOBJDIR` not defined","code":null,"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/services.rs","byte_start":370,"byte_end":391,"line_start":9,"line_end":9,"column_start":18,"column_end":39,"is_primary":true,"text":[{"text":"include!(concat!(env!(\"MOZ_TOPOBJDIR\"), \"/xpcom/build/services.rs\"));","highlight_start":18,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: environment variable `MOZ_TOPOBJDIR` not defined\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/services.rs:9:18\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0minclude!(concat!(env!(\"MOZ_TOPOBJDIR\"), \"/xpcom/build/services.rs\"));\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"} | |
{"message":"unresolved imports `interfaces::nsIInterfaceRequestor`, `interfaces::nsISupports`","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\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/base.rs","byte_start":223,"byte_end":244,"line_start":5,"line_end":5,"column_start":18,"column_end":39,"is_primary":true,"text":[{"text":"use interfaces::{nsIInterfaceRequestor, nsISupports};","highlight_start":18,"highlight_end":39}],"label":"no `nsIInterfaceRequestor` in `interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"xpcom/rust/xpcom/src/base.rs","byte_start":246,"byte_end":257,"line_start":5,"line_end":5,"column_start":41,"column_end":52,"is_primary":true,"text":[{"text":"use interfaces::{nsIInterfaceRequestor, nsISupports};","highlight_start":41,"highlight_end":52}],"label":"no `nsISupports` in `interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0432]\u001b[0m\u001b[0m\u001b[1m: unresolved imports `interfaces::nsIInterfaceRequestor`, `interfaces::nsISupports`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/base.rs:5:18\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse interfaces::{nsIInterfaceRequestor, nsISupports};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `nsISupports` in `interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `nsIInterfaceRequestor` in `interfaces`\u001b[0m\n\n"} | |
{"message":"unresolved import `interfaces::nsrefcnt`","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\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/refptr.rs","byte_start":423,"byte_end":443,"line_start":17,"line_end":17,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"use interfaces::nsrefcnt;","highlight_start":5,"highlight_end":25}],"label":"no `nsrefcnt` in `interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0432]\u001b[0m\u001b[0m\u001b[1m: unresolved import `interfaces::nsrefcnt`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/refptr.rs:17:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m17\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse interfaces::nsrefcnt;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `nsrefcnt` in `interfaces`\u001b[0m\n\n"} | |
{"message":"unresolved imports `interfaces::nsIComponentManager`, `interfaces::nsIComponentRegistrar`, `interfaces::nsIServiceManager`","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\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/statics.rs","byte_start":294,"byte_end":313,"line_start":9,"line_end":9,"column_start":18,"column_end":37,"is_primary":true,"text":[{"text":"use interfaces::{nsIComponentManager, nsIComponentRegistrar, nsIServiceManager};","highlight_start":18,"highlight_end":37}],"label":"no `nsIComponentManager` in `interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"xpcom/rust/xpcom/src/statics.rs","byte_start":315,"byte_end":336,"line_start":9,"line_end":9,"column_start":39,"column_end":60,"is_primary":true,"text":[{"text":"use interfaces::{nsIComponentManager, nsIComponentRegistrar, nsIServiceManager};","highlight_start":39,"highlight_end":60}],"label":"no `nsIComponentRegistrar` in `interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"xpcom/rust/xpcom/src/statics.rs","byte_start":338,"byte_end":355,"line_start":9,"line_end":9,"column_start":62,"column_end":79,"is_primary":true,"text":[{"text":"use interfaces::{nsIComponentManager, nsIComponentRegistrar, nsIServiceManager};","highlight_start":62,"highlight_end":79}],"label":"no `nsIServiceManager` in `interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0432]\u001b[0m\u001b[0m\u001b[1m: unresolved imports `interfaces::nsIComponentManager`, `interfaces::nsIComponentRegistrar`, `interfaces::nsIServiceManager`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/statics.rs:9:18\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse interfaces::{nsIComponentManager, nsIComponentRegistrar, nsIServiceManager};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `nsIServiceManager` in `interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `nsIComponentRegistrar` in `interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `nsIComponentManager` in `interfaces`\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupportsVTable` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":969,"byte_end":986,"line_start":22,"line_end":22,"column_start":49,"column_end":66,"is_primary":true,"text":[{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":49,"highlight_end":66}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1694,"byte_end":1844,"line_start":51,"line_end":59,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" Document,","highlight_start":1,"highlight_end":14},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0xce1f7627,","highlight_start":1,"highlight_end":20},{"text":" 0x7109,","highlight_start":1,"highlight_end":16},{"text":" 0x4977,","highlight_start":1,"highlight_end":16},{"text":" [0xba, 0x77, 0x49, 0x0f, 0xfd, 0xe0, 0x7a, 0xaa]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupportsVTable` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:22:49\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m22\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m _vtable: *const $crate::interfaces::nsISupportsVTable,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m51\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m52\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Document,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m53\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m54\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0xce1f7627,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m58\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m59\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupports` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1464,"byte_end":1475,"line_start":41,"line_end":41,"column_start":47,"column_end":58,"is_primary":true,"text":[{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":47,"highlight_end":58}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1694,"byte_end":1844,"line_start":51,"line_end":59,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" Document,","highlight_start":1,"highlight_end":14},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0xce1f7627,","highlight_start":1,"highlight_end":20},{"text":" 0x7109,","highlight_start":1,"highlight_end":16},{"text":" 0x4977,","highlight_start":1,"highlight_end":16},{"text":" [0xba, 0x77, 0x49, 0x0f, 0xfd, 0xe0, 0x7a, 0xaa]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupports` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:41:47\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m41\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m type Target = $crate::interfaces::nsISupports;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m51\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m52\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Document,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m53\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m54\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0xce1f7627,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m58\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m59\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupports` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1551,"byte_end":1562,"line_start":43,"line_end":43,"column_start":53,"column_end":64,"is_primary":true,"text":[{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":53,"highlight_end":64}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1694,"byte_end":1844,"line_start":51,"line_end":59,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" Document,","highlight_start":1,"highlight_end":14},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0xce1f7627,","highlight_start":1,"highlight_end":20},{"text":" 0x7109,","highlight_start":1,"highlight_end":16},{"text":" 0x4977,","highlight_start":1,"highlight_end":16},{"text":" [0xba, 0x77, 0x49, 0x0f, 0xfd, 0xe0, 0x7a, 0xaa]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupports` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:43:53\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m43\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m fn deref(&self) -> &$crate::interfaces::nsISupports {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m51\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m52\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Document,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m53\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m54\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0xce1f7627,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m58\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m59\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupportsVTable` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":969,"byte_end":986,"line_start":22,"line_end":22,"column_start":49,"column_end":66,"is_primary":true,"text":[{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":49,"highlight_end":66}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1885,"byte_end":2034,"line_start":62,"line_end":70,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" nsINode,","highlight_start":1,"highlight_end":13},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0x70ba4547,","highlight_start":1,"highlight_end":20},{"text":" 0x7699,","highlight_start":1,"highlight_end":16},{"text":" 0x44fc,","highlight_start":1,"highlight_end":16},{"text":" [0xb3, 0x20, 0x52, 0xdb, 0xe3, 0xd1, 0xf9, 0x0a]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupportsVTable` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:22:49\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m22\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m _vtable: *const $crate::interfaces::nsISupportsVTable,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m62\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m63\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsINode,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m64\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m65\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0x70ba4547,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m69\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m70\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupports` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1464,"byte_end":1475,"line_start":41,"line_end":41,"column_start":47,"column_end":58,"is_primary":true,"text":[{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":47,"highlight_end":58}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1885,"byte_end":2034,"line_start":62,"line_end":70,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" nsINode,","highlight_start":1,"highlight_end":13},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0x70ba4547,","highlight_start":1,"highlight_end":20},{"text":" 0x7699,","highlight_start":1,"highlight_end":16},{"text":" 0x44fc,","highlight_start":1,"highlight_end":16},{"text":" [0xb3, 0x20, 0x52, 0xdb, 0xe3, 0xd1, 0xf9, 0x0a]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupports` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:41:47\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m41\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m type Target = $crate::interfaces::nsISupports;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m62\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m63\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsINode,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m64\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m65\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0x70ba4547,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m69\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m70\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupports` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1551,"byte_end":1562,"line_start":43,"line_end":43,"column_start":53,"column_end":64,"is_primary":true,"text":[{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":53,"highlight_end":64}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1885,"byte_end":2034,"line_start":62,"line_end":70,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" nsINode,","highlight_start":1,"highlight_end":13},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0x70ba4547,","highlight_start":1,"highlight_end":20},{"text":" 0x7699,","highlight_start":1,"highlight_end":16},{"text":" 0x44fc,","highlight_start":1,"highlight_end":16},{"text":" [0xb3, 0x20, 0x52, 0xdb, 0xe3, 0xd1, 0xf9, 0x0a]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupports` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:43:53\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m43\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m fn deref(&self) -> &$crate::interfaces::nsISupports {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m62\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m63\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsINode,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m64\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m65\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0x70ba4547,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m69\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m70\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupportsVTable` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":969,"byte_end":986,"line_start":22,"line_end":22,"column_start":49,"column_end":66,"is_primary":true,"text":[{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":49,"highlight_end":66}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":2078,"byte_end":2230,"line_start":73,"line_end":81,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" nsIContent,","highlight_start":1,"highlight_end":16},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0x8e1bab9d,","highlight_start":1,"highlight_end":20},{"text":" 0x8815,","highlight_start":1,"highlight_end":16},{"text":" 0x4d2c,","highlight_start":1,"highlight_end":16},{"text":" [0xa2, 0x4d, 0x7a, 0xba, 0x52, 0x39, 0xdc, 0x22]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupportsVTable` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:22:49\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m22\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m _vtable: *const $crate::interfaces::nsISupportsVTable,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m73\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m74\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsIContent,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m75\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m76\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0x8e1bab9d,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m80\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m81\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupports` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1464,"byte_end":1475,"line_start":41,"line_end":41,"column_start":47,"column_end":58,"is_primary":true,"text":[{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":47,"highlight_end":58}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":2078,"byte_end":2230,"line_start":73,"line_end":81,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" nsIContent,","highlight_start":1,"highlight_end":16},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0x8e1bab9d,","highlight_start":1,"highlight_end":20},{"text":" 0x8815,","highlight_start":1,"highlight_end":16},{"text":" 0x4d2c,","highlight_start":1,"highlight_end":16},{"text":" [0xa2, 0x4d, 0x7a, 0xba, 0x52, 0x39, 0xdc, 0x22]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupports` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:41:47\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m41\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m type Target = $crate::interfaces::nsISupports;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m73\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m74\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsIContent,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m75\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m76\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0x8e1bab9d,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m80\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m81\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} | |
{"message":"cannot find type `nsISupports` in module `$crate::interfaces`","code":{"code":"E0412","explanation":"The type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":1551,"byte_end":1562,"line_start":43,"line_end":43,"column_start":53,"column_end":64,"is_primary":true,"text":[{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":53,"highlight_end":64}],"label":"not found in `$crate::interfaces`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":2078,"byte_end":2230,"line_start":73,"line_end":81,"column_start":1,"column_end":3,"is_primary":false,"text":[{"text":"nonidl!(","highlight_start":1,"highlight_end":9},{"text":" nsIContent,","highlight_start":1,"highlight_end":16},{"text":" nsID(","highlight_start":1,"highlight_end":10},{"text":" 0x8e1bab9d,","highlight_start":1,"highlight_end":20},{"text":" 0x8815,","highlight_start":1,"highlight_end":16},{"text":" 0x4d2c,","highlight_start":1,"highlight_end":16},{"text":" [0xa2, 0x4d, 0x7a, 0xba, 0x52, 0x39, 0xdc, 0x22]","highlight_start":1,"highlight_end":57},{"text":" )","highlight_start":1,"highlight_end":6},{"text":");","highlight_start":1,"highlight_end":3}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"nonidl!","def_site_span":{"file_name":"xpcom/rust/xpcom/src/interfaces/nonidl.rs","byte_start":689,"byte_end":1652,"line_start":16,"line_end":48,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! nonidl {","highlight_start":1,"highlight_end":22},{"text":" ($name:ident, $iid:expr) => {","highlight_start":1,"highlight_end":34},{"text":" /// This interface is referenced from idl files, but not defined in","highlight_start":1,"highlight_end":76},{"text":" /// them. It exports no methods to rust code.","highlight_start":1,"highlight_end":54},{"text":" #[repr(C)]","highlight_start":1,"highlight_end":19},{"text":" pub struct $name {","highlight_start":1,"highlight_end":27},{"text":" _vtable: *const $crate::interfaces::nsISupportsVTable,","highlight_start":1,"highlight_end":67},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::XpCom for $name {","highlight_start":1,"highlight_end":46},{"text":" const IID: $crate::nsIID = $iid;","highlight_start":1,"highlight_end":45},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" unsafe impl $crate::RefCounted for $name {","highlight_start":1,"highlight_end":51},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn addref(&self) {","highlight_start":1,"highlight_end":38},{"text":" self.AddRef();","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" unsafe fn release(&self) {","highlight_start":1,"highlight_end":39},{"text":" self.Release();","highlight_start":1,"highlight_end":32},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":"","highlight_start":1,"highlight_end":1},{"text":" impl ::std::ops::Deref for $name {","highlight_start":1,"highlight_end":43},{"text":" type Target = $crate::interfaces::nsISupports;","highlight_start":1,"highlight_end":59},{"text":" #[inline]","highlight_start":1,"highlight_end":22},{"text":" fn deref(&self) -> &$crate::interfaces::nsISupports {","highlight_start":1,"highlight_end":66},{"text":" unsafe { ::std::mem::transmute(self) }","highlight_start":1,"highlight_end":55},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `nsISupports` in module `$crate::interfaces`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mxpcom/rust/xpcom/src/interfaces/nonidl.rs:43:53\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m43\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m fn deref(&self) -> &$crate::interfaces::nsISupports {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `$crate::interfaces`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m73\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0mnonidl!(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m74\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsIContent,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m75\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m nsID(\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m76\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m 0x8e1bab9d,\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m80\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m )\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m81\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|__-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment