rust-lang / rust-lang/rust

Unstable book `lang_items` example is outdated

Open
#136,290 1 comment 0 reactions 0 assignees View on GitHub

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

https://github.com/rust-lang/rust/blob/master/src/doc/unstable-book/src/language-features/lang-items.md

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.