Skip to content

Doctest merging doesn't work at all on stable #137898

Closed
@notriddle

Description

@notriddle

I downloaded the current stable branch, and set up this sample crate to detect if the test is running in merged mode.

//! ```rust
//! let location = std::panic::Location::caller();
//! assert_eq!(location.line(), 11);
//! ```

If I run RUSTC_BOOTSTRAP=1 cargo +stable test it passes. If I drop the bootstrap env, it fails.

#![allow(unused_extern_crates)]
#![allow(internal_features)]
#![feature(test)]
#![feature(rustc_attrs)]

Meta

rustc --version --verbose:

rustc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: aarch64-apple-darwin
release: 1.85.0
LLVM version: 19.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocA-edition-2024Area: The 2024 editionC-bugCategory: This is a bug.I-edition-triagedIssue: This issue has been reviewed and triaged by the Edition team.I-slowIssue: Problems and improvements with respect to performance of generated code.P-criticalCritical priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions