gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

Unknown lang item : `receiver`

Open P-E-P opened this issue 1 year ago • 3 comments

Lang item receiver is not implemented.

#[lang = "receiver"]
pub trait Receiver {
    // Empty.
}

611d0bdc55a

P-E-P avatar Apr 19 '24 16:04 P-E-P

I'm trying to find material to read on this lang item via https://rustc-dev-guide.rust-lang.org/lang-items.html and https://doc.rust-lang.org/beta/nightly-rustc/rustc_hir/lang_items/enum.LangItem.html#variant.Receiver but not much popped up. Do you have any pointers?

badumbatish avatar Apr 19 '24 18:04 badumbatish

It is from an unstable internal feature (Even the rust unstable book has nothing about this feature :laughing: ), hence why you couldn't find anything, we may have to support it in order to compile core properly.

Do you have any pointers?

https://github.com/rust-lang/rust/blob/1.49.0/compiler/rustc_hir/src/lang_items.rs#L241

P-E-P avatar Apr 22 '24 13:04 P-E-P

this is indeed used in 1.49 (https://github.com/rust-lang/rust/blob/1.49.0/library/core/src/ops/deref.rs#L186) and we'll need to support it, even if we don't support it in its entirety

CohenArthur avatar Apr 22 '24 14:04 CohenArthur