Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown lang item : receiver #2954

Open
P-E-P opened this issue Apr 19, 2024 · 3 comments
Open

Unknown lang item : receiver #2954

P-E-P opened this issue Apr 19, 2024 · 3 comments

Comments

@P-E-P
Copy link
Member

P-E-P commented Apr 19, 2024

Lang item receiver is not implemented.

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

611d0bd

@badumbatish
Copy link
Contributor

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?

@P-E-P
Copy link
Member Author

P-E-P commented Apr 22, 2024

It is from an unstable internal feature (Even the rust unstable book has nothing about this feature 😆 ), 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

@CohenArthur
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants