diff options
| author | Ahmed Charles <acharles@outlook.com> | 2016-08-27 02:21:36 -0700 |
|---|---|---|
| committer | Ahmed Charles <acharles@outlook.com> | 2016-09-11 16:00:50 -0700 |
| commit | 8391760bd846740ea13f9c415a00af10a0b735d1 (patch) | |
| tree | 3f8e4247d20cd820236eb31cd5e417503bd7e435 /src/librustc_errors | |
| parent | bfd123d1e9fce7b0cfb4462966b09a76e65b00d6 (diff) | |
| download | rust-8391760bd846740ea13f9c415a00af10a0b735d1.tar.gz rust-8391760bd846740ea13f9c415a00af10a0b735d1.zip | |
Use question_mark feature in librustc_errors.
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index dcdbe2a8525..1bdc9ef3088 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -882,45 +882,45 @@ impl Destination { match style { Style::FileNameStyle | Style::LineAndColumn => {} Style::LineNumber => { - try!(self.start_attr(term::Attr::Bold)); + self.start_attr(term::Attr::Bold)?; if cfg!(windows) { - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_CYAN))); + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_CYAN))?; } else { - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))); + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))?; } } Style::ErrorCode => { - try!(self.start_attr(term::Attr::Bold)); - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_MAGENTA))); + self.start_attr(term::Attr::Bold)?; + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_MAGENTA))?; } Style::Quotation => {} Style::OldSchoolNote => { - try!(self.start_attr(term::Attr::Bold)); - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_GREEN))); + self.start_attr(term::Attr::Bold)?; + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_GREEN))?; } Style::OldSchoolNoteText | Style::HeaderMsg => { - try!(self.start_attr(term::Attr::Bold)); + self.start_attr(term::Attr::Bold)?; if cfg!(windows) { - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_WHITE))); + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_WHITE))?; } } Style::UnderlinePrimary | Style::LabelPrimary => { - try!(self.start_attr(term::Attr::Bold)); - try!(self.start_attr(term::Attr::ForegroundColor(lvl.color()))); + self.start_attr(term::Attr::Bold)?; + self.start_attr(term::Attr::ForegroundColor(lvl.color()))?; } Style::UnderlineSecondary | Style::LabelSecondary => { - try!(self.start_attr(term::Attr::Bold)); + self.start_attr(term::Attr::Bold)?; if cfg!(windows) { - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_CYAN))); + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_CYAN))?; } else { - try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))); + self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))?; } } Style::NoStyle => {} Style::Level(l) => { - try!(self.start_attr(term::Attr::Bold)); - try!(self.start_attr(term::Attr::ForegroundColor(l.color()))); + self.start_attr(term::Attr::Bold)?; + self.start_attr(term::Attr::ForegroundColor(l.color()))?; } } Ok(()) @@ -960,4 +960,4 @@ impl Write for Destination { Raw(ref mut w) => w.flush(), } } -} \ No newline at end of file +} |
