diff options
| author | Christiaan Dirkx <christiaan@dirkx.email> | 2021-04-14 03:19:01 +0200 | 
|---|---|---|
| committer | Christiaan Dirkx <christiaan@dirkx.email> | 2021-04-20 20:53:07 +0200 | 
| commit | d45e1314f36ac249e8fb7d9564362ac8f94e49be (patch) | |
| tree | 25a3341090f572e93a857c4f8566f75168eb8ff5 /library/std/src/sys/sgx/os.rs | |
| parent | 389fef3b304bd4f196a337797591d9f8db998a62 (diff) | |
| download | rust-d45e1314f36ac249e8fb7d9564362ac8f94e49be.tar.gz rust-d45e1314f36ac249e8fb7d9564362ac8f94e49be.zip | |
Change uses of never type
Diffstat (limited to 'library/std/src/sys/sgx/os.rs')
| -rw-r--r-- | library/std/src/sys/sgx/os.rs | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/library/std/src/sys/sgx/os.rs b/library/std/src/sys/sgx/os.rs index ff1f9c368a3..144248d60c9 100644 --- a/library/std/src/sys/sgx/os.rs +++ b/library/std/src/sys/sgx/os.rs @@ -5,6 +5,7 @@ use crate::error::Error as StdError; use crate::ffi::{OsStr, OsString}; use crate::fmt; use crate::io; +use crate::marker::PhantomData; use crate::path::{self, PathBuf}; use crate::str; use crate::sync::atomic::{AtomicUsize, Ordering}; @@ -35,7 +36,7 @@ pub fn chdir(_: &path::Path) -> io::Result<()> { sgx_ineffective(()) } -pub struct SplitPaths<'a>(&'a !); +pub struct SplitPaths<'a>(!, PhantomData<&'a ()>); pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> { panic!("unsupported") @@ -44,7 +45,7 @@ pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> { impl<'a> Iterator for SplitPaths<'a> { type Item = PathBuf; fn next(&mut self) -> Option<PathBuf> { - match *self.0 {} + self.0 } } | 
