diff options
| author | bors <bors@rust-lang.org> | 2020-01-11 03:03:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-11 03:03:42 +0000 |
| commit | 88d1109600660d1acb471e85631e1ea349843fd9 (patch) | |
| tree | f661e1f13a4af426e1884d557299cf0f40319da4 /src/libstd/error.rs | |
| parent | e6217972644588a3be4fecb85b195f17b0220047 (diff) | |
| parent | 04a340f61f937b24262b517770afd08db783ac69 (diff) | |
| download | rust-88d1109600660d1acb471e85631e1ea349843fd9.tar.gz rust-88d1109600660d1acb471e85631e1ea349843fd9.zip | |
Auto merge of #68115 - Centril:rollup-e2fszdv, r=Centril
Rollup of 8 pull requests Successful merges: - #67666 (make use of pointer::is_null) - #67806 (Extract `rustc_ast_passes`, move gating, & refactor linting) - #68043 (Add some missing timers) - #68074 (Add `llvm-skip-rebuild` flag to `x.py`) - #68079 (Clarify suggestion for E0013) - #68084 (Do not ICE on unicode next point) - #68102 (Inline some conversion methods around OsStr) - #68106 (Fix issue with using `self` module via indirection) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd/error.rs')
| -rw-r--r-- | src/libstd/error.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 1407fe27715..b480581e21b 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -250,6 +250,7 @@ impl From<String> for Box<dyn Error + Send + Sync> { /// assert!( /// mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error)) /// ``` + #[inline] fn from(err: String) -> Box<dyn Error + Send + Sync> { struct StringError(String); @@ -317,6 +318,7 @@ impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> { /// assert!( /// mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error)) /// ``` + #[inline] fn from(err: &str) -> Box<dyn Error + Send + Sync + 'a> { From::from(String::from(err)) } |
