Stream: t-compiler

Topic: extern types and `Freeze`


oli (Nov 08 2018 at 14:08, on Zulip):

Should extern types not implement Freeze? We can't really know what's in them. Right now they might implement Freeze, i'm not quite sure how auto traits work with extern types: https://github.com/rust-lang/rust/blob/45088b11f55e57a65fa1ebcf6e3b6014152eb516/src/libcore/marker.rs#L598

mw (Nov 08 2018 at 14:55, on Zulip):

I thought that Freeze was removed pre 1.0 :)

nagisa (Nov 08 2018 at 14:59, on Zulip):

There definitely is a #[lang="freeze"] still

nagisa (Nov 08 2018 at 14:59, on Zulip):

in fact I believe it reappeared sometime after 1.8 or so. #{no_core] crates didn’t need to define the Freeze lang-trait after 1.0 untli some time later.

kennytm (Nov 08 2018 at 15:42, on Zulip):

extern type doesn't implement any auto trait, and thus not Freeze (nor Send nor Sync)

nikomatsakis (Nov 08 2018 at 16:17, on Zulip):

Freeze is used to implement some of the checks for statics iirc

nikomatsakis (Nov 08 2018 at 16:17, on Zulip):

but it's not used exposed right now

RalfJ (Nov 14 2018 at 11:02, on Zulip):

extern type doesn't implement any auto trait, and thus not Freeze (nor Send nor Sync)

that's great

Last update: Nov 16 2019 at 02:35UTC