1
Fork 0

Address PR feedback

This commit is contained in:
Ryan Levick 2021-06-16 14:27:44 +02:00
parent 23176f60e7
commit 7b3940f44b
89 changed files with 307 additions and 315 deletions

View file

@ -149,16 +149,14 @@ pub struct FutureIncompatibleInfo {
/// be emitted in JSON messages to be displayed by Cargo
/// for upstream deps
pub future_breakage: Option<FutureBreakage>,
/// Provide a custom explanation message for diagnostics
/// if the default explanation message is not appropriate
pub custom_explanation: Option<&'static str>,
}
/// The reason for future incompatibility
#[derive(Copy, Clone, Debug)]
pub enum FutureIncompatibilityReason {
/// We're fixing a bug which will impact all editions
BugFix,
/// This will be an error in a future release
/// for all editions
FutureReleaseError,
/// Previously accepted code that will become an
/// error in the provided edition
EditionError(Edition),
@ -186,9 +184,8 @@ impl FutureIncompatibleInfo {
pub const fn default_fields_for_macro() -> Self {
FutureIncompatibleInfo {
reference: "",
reason: FutureIncompatibilityReason::BugFix,
reason: FutureIncompatibilityReason::FutureReleaseError,
future_breakage: None,
custom_explanation: None,
}
}
}