Skip to content

Teloxide docs fail to build on nightly #139116

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

Closed
shdwchn10 opened this issue Mar 29, 2025 · 8 comments
Closed

Teloxide docs fail to build on nightly #139116

shdwchn10 opened this issue Mar 29, 2025 · 8 comments
Labels
C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc 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

@shdwchn10
Copy link

While releasing teloxide 0.14.0 we encountered docs build failure on docs.rs: https://docs.rs/crate/teloxide/0.14.0/builds/1924379 (rust-lang/docs.rs#2780).

Bisecting this issue led to these findings:

  • teloxide docs build fine on nightly-2025-02-16 (rust version 1.86.0-nightly (9cd60bd 2025-02-15))
  • starting with nightly-2025-02-17 (rust version 1.87.0-nightly (5bc6231 2025-02-16) docs build fails with:
    error: unresolved link to `adaptors::AutoSend`
      --> crates/teloxide-core/src/lib.rs:51:19
       |
    51 | //! [`AutoSend`]: adaptors::AutoSend
       |                   ^^^^^^^^^^^^^^^^^^ no item named `AutoSend` in module `adaptors`
       |
    note: the lint level is defined here
      --> crates/teloxide-core/src/lib.rs:80:49
       |
    80 | #![cfg_attr(all(feature = "full", docsrs), deny(rustdoc::broken_intra_doc_links))]
       |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error: could not document `teloxide-core`
    
  • starting with nightly-2025-03-12 (rust version 1.87.0-nightly (6650252 2025-03-11)) docs build fails with: https://pastebin.com/TV4JcCD4
  • issue persists on nightly-2025-03-29
@shdwchn10 shdwchn10 added the C-bug Category: This is a bug. label Mar 29, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 29, 2025
@Noratrieb Noratrieb added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 29, 2025
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 29, 2025
@Noratrieb
Copy link
Member

Thank you for the report! It would be useful to more precisely bisect the regression using cargo-bisect-rustc to make it easier to figure out where exactly it regressed and ping the relevant people.
@rustbot label E-needs-bisection

@rustbot rustbot added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Mar 29, 2025
@shdwchn10
Copy link
Author

test.sh: (cargo docs isn't a typo, but alias with correct feature flags enabled)

#!/bin/sh

OUTPUT=`cargo docs 2>&1`
COUNT=`echo "$OUTPUT" | grep -c "mismatched types"`
test $COUNT -eq 0

cargo bisect-rustc --start=2025-03-11 --end=2025-03-12 --script ./test.sh:

searched nightlies: from nightly-2025-03-11 to nightly-2025-03-12
regressed nightly: nightly-2025-03-12
searched commit range: 9fb94b3...6650252
regressed commit: 6650252

bisected with cargo-bisect-rustc v0.6.9

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start=2025-03-11 --end=2025-03-12 --script ./test.sh 

cargo bisect-rustc --start=2025-02-16 --end=2025-02-17 -- docs (probably not relevant, since the first error seems to have been fixed):

searched nightlies: from nightly-2025-02-16 to nightly-2025-02-17
regressed nightly: nightly-2025-02-17
searched commit range: 9cd60bd...5bc6231
regressed commit: 23032f3

bisected with cargo-bisect-rustc v0.6.9

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start=2025-02-16 --end=2025-02-17 -- docs 

@Noratrieb
Copy link
Member

#136363 sounds relevant. @notriddle @GuillaumeGomez

@notriddle
Copy link
Contributor

The adaptors module doesn't seem to have an AutoSend item in it (no re-export of the type itself, and no wildcard exports).

@shdwchn10
Copy link
Author

shdwchn10 commented Mar 29, 2025

The adaptors module doesn't seem to have an AutoSend item in it (no re-export of the type itself, and no wildcard exports).

Thanks! AutoSend removal from docs fixes first error, but second is still here.
cargo bisect-rustc --start=2025-03-11 --end=2025-03-12 -- docs:

searched nightlies: from nightly-2025-03-11 to nightly-2025-03-12
regressed nightly: nightly-2025-03-12
searched commit range: 9fb94b3...6650252
regressed commit: 6650252

bisected with cargo-bisect-rustc v0.6.9

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start=2025-03-11 --end=2025-03-12 -- docs 

@workingjubilee
Copy link
Member

cc @oli-obk ?

@fmease
Copy link
Member

fmease commented Mar 30, 2025

but second is still here.

not a bug. You now need to slap #[define_opaque(Opaque)] onto fns etc. defining the opaque type Opaque

@shdwchn10
Copy link
Author

but second is still here.

not a bug. You now need to slap #[define_opaque(Opaque)] onto fns etc. defining the opaque type Opaque

Thank you, now docs compile without issues!

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc 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

No branches or pull requests

7 participants