rust-lang / rust-lang/rust

1.99 beta crater regression: unresolved import in doctest

Open
#162,112 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-cfg A-doctests C-bug I-lang-nominated I-prioritize P-lang-drag-0 regression-from-stable-to-beta S-has-bisection S-has-mcve T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

log: https://crater-reports.s3.amazonaws.com/beta-1.99-5/1.99.0-beta.1/reg/lfchring-0.1.3/log.txt
reduction:

/// ```rust
/// use x::A;
/// ```
#[cfg(any(feature = "a", doc))]
pub struct A;

with Cargo.toml:

[package]
name = "x"
edition = "2024"

[features]
a = []

another instance of this is https://crater-reports.s3.amazonaws.com/beta-1.99-5/1.99.0-beta.1/reg/kolibrios-syscalls-0.2.0/log.txt
and also https://crater-reports.s3.amazonaws.com/beta-1.99-5/1.99.0-beta.1/reg/memory_pages-0.1.0/log.txt

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 by reproducing the minimal Rust crate and doctest shown in the issue, then compare the crater logs for lfchring, kolibrios-syscalls, and memory_pages. Trace the compiler's doctest and cfg handling to identify the regression; done when the documented imports resolve for the reduction and the reported cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.