Re: [dev-servo] custom derive for Deref/DerefMut

2017-07-17 Thread Bobby Holley
I guess? It's certainly less nice than #[derive(Deref, DerefMut)] on the type, but maybe there are some downsides of derives that I'm not aware of. On Sat, Jul 15, 2017 at 10:27 AM, Jim Blandy wrote: > A macro_rules macro wouldn't serve here? > > On Fri, Jul 14, 2017 at 5:26 PM, Bobby Holley >

Re: [dev-servo] custom derive for Deref/DerefMut

2017-07-15 Thread Alex Webster
Unsubscribe On Jul 13, 2017 8:20 PM, "Bobby Holley" wrote: Sorry, wrong link. I meant: https://reviewboard.mozilla.org/r/157064/diff/3#index_header On Thu, Jul 13, 2017 at 5:13 PM, Bobby Holley wrote: > There's a lot of boilerplate involved just to make a newtype [1]. Is this > something we c

Re: [dev-servo] custom derive for Deref/DerefMut

2017-07-15 Thread Jim Blandy
A macro_rules macro wouldn't serve here? On Fri, Jul 14, 2017 at 5:26 PM, Bobby Holley wrote: > On Fri, Jul 14, 2017 at 2:24 AM, Anthony Ramine wrote: > > > > > > Le 14 juil. 2017 à 02:13, Bobby Holley a > écrit : > > > > > > There's a lot of boilerplate involved just to make a newtype [1]. Is

Re: [dev-servo] custom derive for Deref/DerefMut

2017-07-14 Thread Bobby Holley
On Fri, Jul 14, 2017 at 2:24 AM, Anthony Ramine wrote: > > > Le 14 juil. 2017 à 02:13, Bobby Holley a écrit : > > > > There's a lot of boilerplate involved just to make a newtype [1]. Is this > > something we could add a custom derive for? > > We don't use that many newtypes to justify writing a

Re: [dev-servo] custom derive for Deref/DerefMut

2017-07-14 Thread Anthony Ramine
> Le 14 juil. 2017 à 02:13, Bobby Holley a écrit : > > There's a lot of boilerplate involved just to make a newtype [1]. Is this > something we could add a custom derive for? We don't use that many newtypes to justify writing a custom derive for that IMO. Often we don't even bother and just do

Re: [dev-servo] custom derive for Deref/DerefMut

2017-07-13 Thread Bobby Holley
Sorry, wrong link. I meant: https://reviewboard.mozilla.org/r/157064/diff/3#index_header On Thu, Jul 13, 2017 at 5:13 PM, Bobby Holley wrote: > There's a lot of boilerplate involved just to make a newtype [1]. Is this > something we could add a custom derive for? > > [1] https://treeherder.mozil

[dev-servo] custom derive for Deref/DerefMut

2017-07-13 Thread Bobby Holley
There's a lot of boilerplate involved just to make a newtype [1]. Is this something we could add a custom derive for? [1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=9adf7a220ac8fa870f30a25a1ff8c71da65873fa ___ dev-servo mailing list dev-serv