Skip to content

1.97 beta rustdoc regression involving rustc_ attributes #157412

@theemathas

Description

@theemathas

Regression discovered by the 1.97 beta rustdoc crater run.


[INFO] [stdout] error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.38.4/src/backend/linux_raw/io/errno.rs:28:25
[INFO] [stdout]    |
[INFO] [stdout] 28 | #[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_start(0xf001))]
[INFO] [stdout]    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.38.4/src/backend/linux_raw/io/errno.rs:29:25
[INFO] [stdout]    |
[INFO] [stdout] 29 | #[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_end(0xffff))]
[INFO] [stdout]    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Checking quote v1.0.31
[INFO] [stderr]     Checking termcolor v1.2.0
[INFO] [stdout] error: cannot find attribute `rustc_layout_scalar_valid_range_start` in this scope
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.38.4/src/backend/linux_raw/io/errno.rs:28:25
[INFO] [stdout]    |
[INFO] [stdout] 28 | #[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_start(0xf001))]
[INFO] [stdout]    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find attribute `rustc_layout_scalar_valid_range_end` in this scope
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.38.4/src/backend/linux_raw/io/errno.rs:29:25
[INFO] [stdout]    |
[INFO] [stdout] 29 | #[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_end(0xffff))]
[INFO] [stdout]    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Affects 45 dependents of old versions of rustix (affects at least versions 0.36.7 - 0.38.4)


[INFO] [stdout] error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
[INFO] [stdout]    --> src/index.rs:149:41
[INFO] [stdout]     |
[INFO] [stdout] 149 |         #[cfg_attr(feature = "nightly", rustc_layout_scalar_valid_range_end($max))]
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 315 | base_index!(BaseIndex32(u32 <= 0xFFFF_FF00));
[INFO] [stdout]     | -------------------------------------------- in this macro invocation
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the macro `base_index` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find attribute `rustc_layout_scalar_valid_range_end` in this scope
[INFO] [stdout]    --> src/index.rs:149:41
[INFO] [stdout]     |
[INFO] [stdout] 149 |         #[cfg_attr(feature = "nightly", rustc_layout_scalar_valid_range_end($max))]
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 315 | base_index!(BaseIndex32(u32 <= 0xFFFF_FF00));
[INFO] [stdout]     | -------------------------------------------- in this macro invocation
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the macro `base_index` (in Nightly builds, run with -Z macro-backtrace for more info)

Affects solar-data-structures and its 3 dependendents:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions