Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#![feature(intra_doc_pointers)] checks the active crate for a feature gate, not the original #82284

Closed
jyn514 opened this issue Feb 19, 2021 · 2 comments · Fixed by #82295
Closed
Assignees
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Feb 19, 2021

This breaks e.g. serde: https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/serde.20doc.20runs.20broken

I tried this code:

pub use std::ptr::Pointee;

I expected to see this happen: No error occurs, because re-exporting items of the standard library should never break your crate.

Instead, this happened:

error[E0658]: linking to associated items of raw pointers is experimental
  --> /home/collector/rustc-perf/cache/0148b971c921a0831fbf3357e5936eec724e3566/lib/rustlib/src/rust/library/core/src/ptr/metadata.rs:51:23
   |
51 | /// [`to_raw_parts`]: *const::to_raw_parts
   |                       ^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #80896 <https://github.com/rust-lang/rust/issues/80896> for more information
   = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable
   = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does

Meta

Version: 386d02a

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name labels Feb 19, 2021
@jyn514
Copy link
Member Author

jyn514 commented Feb 19, 2021

As a workaround, we can remove the fancy link from Pointee until this is fixed.

bkchr added a commit to paritytech/substrate that referenced this issue Feb 19, 2021
Remove this job until upstream is fixed:
rust-lang/rust#82284
TriplEight added a commit to paritytech/substrate that referenced this issue Feb 19, 2021
* Fix warning in rustdoc job

* More fixes

* Remove `build-rust-doc` job

Remove this job until upstream is fixed:
rust-lang/rust#82284

* CI: temp. remove of the publishing job, no use of it w/o build

Co-authored-by: Denis P <[email protected]>
yvt added a commit to r3-os/r3 that referenced this issue Feb 19, 2021
Temporarily disabling the workflow until the following issue is fixed:
<rust-lang/rust#82284>
@jyn514 jyn514 self-assigned this Feb 19, 2021
@jyn514 jyn514 added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Feb 19, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Feb 19, 2021
@jyn514
Copy link
Member Author

jyn514 commented Feb 19, 2021

Assigning P-critical as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@jyn514 jyn514 added P-critical Critical priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Feb 19, 2021
@bors bors closed this as completed in 24bfcee Feb 22, 2021
jyn514 added a commit to jyn514/rust that referenced this issue Apr 8, 2021
 ## Why deprecate doc(include)?

This nightly feature is a strictly less general version of
`extended_key_value_attributes`, which looks like this:

 ```
 #[doc = include_str!("docs.md")]
 ```

In particular, that feature allows manipulating the filename and
included docs in a way that `doc(include)` cannot, due to eager
evaluation:

 ```
 #[doc = concat!(
    "These are my docs: ",
    include_str!(concat!(env!("OUT_DIR"), "generated_docs.md"))
  )]
 ```

For more about eager evaluation and how it impacts macro parsing,
see petrochenkov's excellent writeup: https://internals.rust-lang.org/t/macro-expansion-points-in-attributes/11455

Given that `#[doc(include)]` offers no features that
`extended_key_value_attributes` cannot, it makes no sense for the
language and rustdoc to maintain it indefinitely. This deprecates
`doc(include)` and adds a structured suggestion to switch to switch to
`doc = include_str!` instead.

 ## Implementation

Notably, this changes attribute cleaning to pass in whether an item is
local or not. This is necessary to avoid warning about `doc(include)` in
dependencies (see rust-lang#82284 for the
sort of trouble that can cause).
taqtiqa-mark pushed a commit to subversive-upstream/polkadot-sdk-substrate-frame-system that referenced this issue Sep 14, 2023
* Fix warning in rustdoc job

* More fixes

* Remove `build-rust-doc` job

Remove this job until upstream is fixed:
rust-lang/rust#82284

* CI: temp. remove of the publishing job, no use of it w/o build

Co-authored-by: Denis P <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants