Address review comments
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
parent
e3516a128e
commit
33137ffdd5
3 changed files with 5 additions and 4 deletions
|
@ -227,14 +227,14 @@ impl OutputType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The type of diagnostics output to generate
|
/// The type of diagnostics output to generate.
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||||
pub enum ErrorOutputType {
|
pub enum ErrorOutputType {
|
||||||
/// Output meant for the consumption of humans.
|
/// Output meant for the consumption of humans.
|
||||||
HumanReadable(HumanReadableErrorType),
|
HumanReadable(HumanReadableErrorType),
|
||||||
/// Output that's consumed by other tools such as `rustfix` or the `RLS`.
|
/// Output that's consumed by other tools such as `rustfix` or the `RLS`.
|
||||||
Json {
|
Json {
|
||||||
/// Render the JSON in a human readable way (with indents and newlines)
|
/// Render the JSON in a human readable way (with indents and newlines).
|
||||||
pretty: bool,
|
pretty: bool,
|
||||||
/// The JSON output includes a `rendered` field that includes the rendered
|
/// The JSON output includes a `rendered` field that includes the rendered
|
||||||
/// human output.
|
/// human output.
|
||||||
|
|
|
@ -348,7 +348,7 @@ impl<'a> DiagnosticBuilder<'a> {
|
||||||
|
|
||||||
/// Convenience function for internal use, clients should use one of the
|
/// Convenience function for internal use, clients should use one of the
|
||||||
/// struct_* methods on Handler.
|
/// struct_* methods on Handler.
|
||||||
pub(crate) fn new_with_code(handler: &'a Handler,
|
crate fn new_with_code(handler: &'a Handler,
|
||||||
level: Level,
|
level: Level,
|
||||||
code: Option<DiagnosticId>,
|
code: Option<DiagnosticId>,
|
||||||
message: &str)
|
message: &str)
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
//! Diagnostics creation and emission for rustc
|
//! Diagnostics creation and emission for `rustc`.
|
||||||
//!
|
//!
|
||||||
//! This module contains the code for creating and emitting diagnostics.
|
//! This module contains the code for creating and emitting diagnostics.
|
||||||
|
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
|
#![feature(crate_visibility_modifier)]
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
#![cfg_attr(unix, feature(libc))]
|
#![cfg_attr(unix, feature(libc))]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue