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

regression: ~const not implemented #105105

Closed
Mark-Simulacrum opened this issue Nov 30, 2022 · 5 comments
Closed

regression: ~const not implemented #105105

Mark-Simulacrum opened this issue Nov 30, 2022 · 5 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Nov 30, 2022

This is a regression (the code used to get documented on stable). It also seems surprising that we're leaking ~const into stable error messages (presumably a T-compiler problem).

[INFO] [stdout] error[E0277]: the trait bound `sundries::int64: std::convert::From<{integer}>` is not satisfied
[INFO] [stdout]    --> src/assembly.rs:107:11
[INFO] [stdout]     |
[INFO] [stdout] 107 |     r7 <- 1;
[INFO] [stdout]     |           ^ the trait `~const std::convert::From<{integer}>` is not implemented for `sundries::int64`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/sundries.rs:72:55
[INFO] [stdout]     |
[INFO] [stdout] 72  |             LoadImmediate{destination: $d, value: $s1.into()}; => $($stmt)*)
[INFO] [stdout]     |                                                       ---- required by a bound introduced by this call
[INFO] [stdout]     |
[INFO] [stdout] note: the trait `std::convert::From<{integer}>` is implemented for `sundries::int64`, but that implementation is not `const`
[INFO] [stdout]    --> src/assembly.rs:107:11
[INFO] [stdout]     |
[INFO] [stdout] 107 |     r7 <- 1;
[INFO] [stdout]     |           ^
[INFO] [stdout]     = note: required for `{integer}` to implement `~const std::convert::Into<sundries::int64>`
@Mark-Simulacrum Mark-Simulacrum added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Nov 30, 2022
@Mark-Simulacrum Mark-Simulacrum added this to the 1.66.0 milestone Nov 30, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Nov 30, 2022
@Mark-Simulacrum
Copy link
Member Author

cc @rust-lang/rustdoc

@GuillaumeGomez
Copy link
Member

Let's maybe involve @rust-lang/compiler as I don't remember rustdoc changing something for ~const.

@oli-obk
Copy link
Contributor

oli-obk commented Nov 30, 2022

I don't know how the first one (asm_sim) could possibly compile on stable. So if it now is not documenting anymore, but was before, did rustdoc change how it handles static items?

I'll need to look at the second one tomorrow.

The last two are using unstable feature gates opting into const traits, so I expect them to fail to compile with recent changes. Is rustdoc turning on all cargo features? That could explain why crates that otherwise work on stable start failing.

@Mark-Simulacrum
Copy link
Member Author

Oh, interesting. It looks like crater sets RUSTC_BOOTSTRAP=1 in rustdoc crater runs (https://github.com/rust-lang/crater/blob/53db254d5729b31a657c148a69fa6fbbf8d537e8/src/runner/test.rs#L423-L425) which makes these potentially not really stable/beta regressions (i.e. they are really just nightly only regressions). I think the ones with unstable feature gates can be discounted then, though that doesn't seem to be all of the ones in this issue.

@oli-obk
Copy link
Contributor

oli-obk commented Dec 1, 2022

I tested all of them.

The first two don't compile on stable at all and I don't believe they ever did (but they also don't use any feature gates ?!? did someone write code and it didn't work and then they abandoned it?). It looks like rustdoc crater counts things as regressions even if the crate doesn't compile at all.

The last two are definitely using nightly via a cargo feature.

@oli-obk oli-obk closed this as completed Dec 1, 2022
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. 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

5 participants