-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Deserialize Msrv
directly in Conf
#11683
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @Manishearth (rustbot has picked a reviewer for you, use r? to override) |
e291bb9
to
f36f59c
Compare
@bors r+ |
Deserialize `Msrv` directly in `Conf` Gives the error a span pointing to the invalid config value Also puts `Conf` itself in the `OnceLock` rather than just the `Msrv` for [the `register_late_mod_pass` work](rust-lang/rust#116731) since it will be used from two different callbacks changelog: none
💔 Test failed - checks-action_test |
f36f59c
to
1528c1d
Compare
@@ -100,7 +100,7 @@ Suppress lints whenever the suggested change would cause breakage for other crat | |||
## `msrv` | |||
The minimum rust version that the project supports | |||
|
|||
**Default Value:** `None` (`Option<String>`) | |||
**Default Value:** `Msrv { stack: [] }` (`crate::Msrv`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, why is the default value of MSRV an empty stack? 🤔
EDIT: Ah I see why now. But this might be confusing to the user. I'm not sure what to do about this though, so I don't want to block this PR on this. I really like the code improvements and the pointing to the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah damn I didn't think about that, I think we need to change that in general since other config values also show internal type names which isn't helpful for public documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I don't think this has to be done in this PR though. So feel free to r=me here now. But if you feel like doing it in this PR, I won't stop you 🙃
@bors r=Manishearth,flip1995 I'll think about the config thing separately, I think it would need website changes as well |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Gives the error a span pointing to the invalid config value
Also puts
Conf
itself in theOnceLock
rather than just theMsrv
for theregister_late_mod_pass
work since it will be used from two different callbackschangelog: none