Hi Josh, We tried to run servo with our modified devices crate.
Now we are getting the following errors, error[E0277]: the size for values of type `(dyn device::adapter::BluetoothAdapter + 'static)` cannot be known at compilation time --> components/bluetooth/lib.rs:193:5 | 193 | adapter: Option<BluetoothAdapter>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `(dyn device::adapter::BluetoothAdapter + 'static)` = note: required by `std::option::Option` ///// error[E0277]: the size for values of type `(dyn device::adapter::BluetoothAdapter + 'static)` cannot be known at compilation time --> components/bluetooth/lib.rs:338:5 | 338 | / fn get_adapter(&mut self) -> BluetoothResult<BluetoothAdapter> { 339 | | match self.get_or_create_adapter() { 340 | | Some(adapter) => { 341 | | if !adapter.is_powered().unwrap_or(false) { ... | 347 | | } 348 | | } | |_____^ doesn't have a size known at compile-time | error: aborting due to 4 previous errors I tried to replace Option<BluetoothAdapter> with Option<Box<BluetoothAdapter> which only gave out more errors. -Niveditha Shankar On Thu, Apr 25, 2019 at 4:53 PM Niveditha Shankar <nshan...@ncsu.edu> wrote: > Hi Josh, > > We tried to run servo with our modified devices crate. > > Now we are getting the following errors, > > *error[E0277]**: the size for values of type `(dyn > device::adapter::BluetoothAdapter + 'static)` cannot be known at > compilation time* > > *--> *components/bluetooth/lib.rs:193:5 > > *|* > > *193* *| * adapter: Option<BluetoothAdapter>, > > *| * *^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^* *doesn't have a size > known at compile-time* > > *|* > > *= **help*: the trait `std::marker::Sized` is not implemented for > `(dyn device::adapter::BluetoothAdapter + 'static)` > > *= **note*: to learn more, visit < > <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> > https://doc.rust-lang.org/ > book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> > > *= **note*: required by `std::option::Option` > > > ///// > > > *error[E0277]**: the size for values of type `(dyn > device::adapter::BluetoothAdapter + 'static)` cannot be known at > compilation time* > > *--> *components/bluetooth/lib.rs:338:5 > > *|* > > *338* *| **/* fn get_adapter(&mut self) -> > BluetoothResult<BluetoothAdapter> { > > *339* *| **|* match self.get_or_create_adapter() { > > *340* *| **|* Some(adapter) => { > > *341* *| **|* if !adapter.is_powered().unwrap_or(false) { > > *...* *|* > > *347* *| **|* } > > *348* *| **|* } > > *| **|_____^* *doesn't have a size known at compile-time* > > *|* > > > > *error**: aborting due to 4 previous errors* > > > > I tried to replace Option<BluetoothAdapter> with > Option<Box<BluetoothAdapter> which only gave out more errors. > > > > -Niveditha Shankar > > > On Thu, Apr 25, 2019 at 4:49 PM Niveditha Shankar <nshan...@ncsu.edu> > wrote: > >> Hi Josh, >> >> We tried to run servo with our modified devices crate. We then realized >> we had to make one small change in fn new() for mac and android. So I will >> go ahead and commit that change. >> >> >> Now we are getting the following errors, >> >> *error[E0277]**: the size for values of type `(dyn >> device::adapter::BluetoothAdapter + 'static)` cannot be known at >> compilation time* >> >> *--> *components/bluetooth/lib.rs:193:5 >> >> *|* >> >> *193* *| * adapter: Option<BluetoothAdapter>, >> >> *| * *^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^* *doesn't have a size >> known at compile-time* >> >> *|* >> >> *= **help*: the trait `std::marker::Sized` is not implemented for >> `(dyn device::adapter::BluetoothAdapter + 'static)` >> >> *= **note*: to learn more, visit < >> <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> https://doc.rust-lang.org/ >> book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> >> *= **note*: required by `std::option::Option` >> >> >> *error[E0277]**: the size for values of type `(dyn >> device::adapter::BluetoothAdapter + 'static)` cannot be known at >> compilation time* >> >> *--> *components/bluetooth/lib.rs:207:5 >> >> *|* >> >> *207* *| **/* pub fn new( >> >> *208* *| **|* receiver: IpcReceiver<BluetoothRequest>, >> >> *209* *| **|* adapter: Option<BluetoothAdapter>, >> >> *210* *| **|* embedder_proxy: EmbedderProxy, >> >> *...* *|* >> >> *225* *| **|* } >> >> *226* *| **|* } >> >> *| **|_____^* *doesn't have a size known at compile-time* >> >> *|* >> >> *= **help*: the trait `std::marker::Sized` is not implemented for >> `(dyn device::adapter::BluetoothAdapter + 'static)` >> >> *= **note*: to learn more, visit < >> <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> https://doc.rust-lang.org/ >> book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> >> *= **note*: required by `std::option::Option` >> >> >> *error[E0277]**: the size for values of type `(dyn >> device::adapter::BluetoothAdapter + 'static)` cannot be known at >> compilation time* >> >> *--> *components/bluetooth/lib.rs:320:5 >> >> *|* >> >> *320* *| **/* pub fn get_or_create_adapter(&mut self) -> >> Option<BluetoothAdapter> { >> >> *321* *| **|* let adapter_valid = self >> >> *322* *| **|* .adapter >> >> *323* *| **|* .as_ref() >> >> *...* *|* >> >> *335* *| **|* self.adapter.clone() >> >> *336* *| **|* } >> >> *| **|_____^* *doesn't have a size known at compile-time* >> >> *|* >> >> *= **help*: the trait `std::marker::Sized` is not implemented for >> `(dyn device::adapter::BluetoothAdapter + 'static)` >> >> *= **note*: to learn more, visit < >> <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> https://doc.rust-lang.org/ >> book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> >> *= **note*: required by `std::option::Option` >> >> >> *error[E0277]**: the size for values of type `(dyn >> device::adapter::BluetoothAdapter + 'static)` cannot be known at >> compilation time* >> >> *--> *components/bluetooth/lib.rs:338:5 >> >> *|* >> >> *338* *| **/* fn get_adapter(&mut self) -> >> BluetoothResult<BluetoothAdapter> { >> >> *339* *| **|* match self.get_or_create_adapter() { >> >> *340* *| **|* Some(adapter) => { >> >> *341* *| **|* if !adapter.is_powered().unwrap_or(false) { >> >> *...* *|* >> >> *347* *| **|* } >> >> *348* *| **|* } >> >> *| **|_____^* *doesn't have a size known at compile-time* >> >> *|* >> >> *= **help*: the trait `std::marker::Sized` is not implemented for >> `(dyn device::adapter::BluetoothAdapter + 'static)` >> >> *= **note*: to learn more, visit < >> <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> https://doc.rust-lang.org/ >> book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> >> >> *= **note*: required by `std::result::Result` >> >> >> *error**: aborting due to 4 previous errors* >> >> >> >> I tried to replace Option<BluetoothAdapter> with >> Option<Box<BluetoothAdapter> which only gave out more errors. >> >> >> >> -Niveditha Shankar >> >> >> >>>> >>>> _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo