]> git.proxmox.com Git - cargo.git/blame - src/cargo/core/compiler/future_incompat.rs
Auto merge of #9602 - ehuss:diesel-warning, r=alexcrichton
[cargo.git] / src / cargo / core / compiler / future_incompat.rs
CommitLineData
6177c658
AH
1use serde::{Deserialize, Serialize};
2
3/// The future incompatibility report, emitted by the compiler as a JSON message.
4#[derive(serde::Deserialize)]
5pub struct FutureIncompatReport {
6 pub future_incompat_report: Vec<FutureBreakageItem>,
7}
8
9#[derive(Serialize, Deserialize)]
10pub struct FutureBreakageItem {
11 /// The date at which this lint will become an error.
12 /// Currently unused
13 pub future_breakage_date: Option<String>,
14 /// The original diagnostic emitted by the compiler
15 pub diagnostic: Diagnostic,
16}
17
f03d47ce 18/// A diagnostic emitted by the compiler as a JSON message.
6177c658
AH
19/// We only care about the 'rendered' field
20#[derive(Serialize, Deserialize)]
21pub struct Diagnostic {
22 pub rendered: String,
23}
24
25/// The filename in the top-level `target` directory where we store
26/// the report
27pub const FUTURE_INCOMPAT_FILE: &str = ".future-incompat-report.json";
28
29#[derive(Serialize, Deserialize)]
30pub struct OnDiskReport {
31 // A Cargo-generated id used to detect when a report has been overwritten
32 pub id: String,
33 // Cannot be a &str, since Serde needs
34 // to be able to un-escape the JSON
35 pub report: String,
36}