Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
59df6c8
Try commiting again
seanchen1991 Oct 22, 2021
6a59d0e
Have `pretty` and `show_backtrace` accept booleans
seanchen1991 Oct 22, 2021
c6de413
Change `source` field to `error`
seanchen1991 Oct 22, 2021
c0f14cb
Attempt to fix tidy errors
seanchen1991 Oct 27, 2021
aa853bd
Add `rust` annotation to doctest
seanchen1991 Oct 27, 2021
d2f49ee
Format doctest
seanchen1991 Oct 27, 2021
32bcb81
Fix broken doctest
seanchen1991 Oct 27, 2021
1386a15
Update std::error::Report based on feedback
yaahc Dec 14, 2021
4420cc3
Update report output and fix examples
yaahc Dec 16, 2021
078b112
add a panicking example
yaahc Dec 16, 2021
9be1cc9
more docs improvements
yaahc Dec 16, 2021
5b3902f
attempt to make Report usable with Box dyn Error and fn main
yaahc Dec 17, 2021
e9fbe79
Remove &self from PrintState::to_string
dtolnay Dec 28, 2021
65f7fbc
mangling_v0: Update tests for the rust-demangler tool
petrochenkov Dec 26, 2021
14cd80d
mangling_v0: Add a test for mangling of foreign types
petrochenkov Dec 27, 2021
6bbbaf9
mangling_v0: Skip extern blocks during mangling
petrochenkov Dec 27, 2021
3632f41
Stabilize `#[feature(available_parallelism)]`
yoshuawuyts Jan 7, 2022
5ebe97b
rustc_metadata: Stop passing `CrateMetadataRef` by reference
petrochenkov Dec 24, 2021
130ba47
Fix typo in `StableCrateId` docs
pierwill Jan 7, 2022
836addc
Consolidate checking for msvc when generating debuginfo
wesleywiser Dec 28, 2021
72cb1bd
silence tidy errors
yaahc Jan 7, 2022
38b04ef
Rollup merge of #91938 - yaahc:error-reporter, r=m-ou-se
matthiaskrgr Jan 8, 2022
3d6aef3
Rollup merge of #92277 - petrochenkov:cmrval2, r=jackh726
matthiaskrgr Jan 8, 2022
f3e9260
Rollup merge of #92316 - petrochenkov:extmangle, r=wesleywiser
matthiaskrgr Jan 8, 2022
581491e
Rollup merge of #92336 - dtolnay:printstateself, r=michaelwoerister
matthiaskrgr Jan 8, 2022
6715e53
Rollup merge of #92375 - wesleywiser:consolidate_debuginfo_msvc_check…
matthiaskrgr Jan 8, 2022
7c8ceda
Rollup merge of #92632 - yoshuawuyts:stabilize-available-parallelism,…
matthiaskrgr Jan 8, 2022
2d50a8c
Rollup merge of #92650 - pierwill:patch-2, r=michaelwoerister
matthiaskrgr Jan 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Have pretty and show_backtrace accept booleans
  • Loading branch information
seanchen1991 committed Oct 22, 2021
commit 6a59d0e3aa26543fc4d3eaae1fa4cd48522045d2
10 changes: 5 additions & 5 deletions library/std/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ impl dyn Error + Send + Sync {
///
/// fn main() {
/// let error = SuperError { side: SuperErrorSideKick };
/// let report = Report::new(&error).pretty();
/// let report = Report::new(&error).pretty(true);
///
/// println!("{}", report);
/// }
Expand All @@ -874,15 +874,15 @@ where

/// Enable pretty-printing the report.
#[unstable(feature = "error_reporter", issue = "90172")]
pub fn pretty(mut self) -> Self {
self.pretty = true;
pub fn pretty(mut self, pretty: bool) -> Self {
self.pretty = pretty;
self
}

/// Enable showing a backtrace for the report.
#[unstable(feature = "error_reporter", issue = "90172")]
pub fn show_backtrace(mut self) -> Self {
self.show_backtrace = true;
pub fn show_backtrace(mut self, show_backtrace: bool) -> Self {
self.show_backtrace = show_backtrace;
self
}

Expand Down