Unstable book `lang_items` example is outdated
Open
Nobody has claimed this yet.
A-docs
A-lang-item
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
Summary
The example uses #[rustc_box], which was removed in #135046. Unfortunately, the new intrinsic is at alloc::boxed::box_new and adding extern crate alloc to use it causes the real Box to conflict with the custom Box.
@rustbot label A-lang-item
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/doc/unstable-book/src/language-features/lang-items.md and review the removal noted in #135046. Check how the example uses #[rustc_box], the alloc::boxed::box_new replacement, and the custom Box conflict; done means the unstable-book example no longer relies on the removed attribute and remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100