Rollup merge of #133449 - joboet:io_const_error, r=tgross35
std: expose `const_io_error!` as `const_error!` ACP: https://github.com/rust-lang/libs-team/issues/205 Tracking issue: https://github.com/rust-lang/rust/issues/133448 Probably best reviewed commit-by-commit, the first one does the API change, the second does the mass-rename.
This commit is contained in:
commit
dcebc5eddd
54 changed files with 250 additions and 266 deletions
|
@ -3581,7 +3581,7 @@ impl Error for StripPrefixError {
|
|||
pub fn absolute<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
|
||||
let path = path.as_ref();
|
||||
if path.as_os_str().is_empty() {
|
||||
Err(io::const_io_error!(io::ErrorKind::InvalidInput, "cannot make an empty path absolute",))
|
||||
Err(io::const_error!(io::ErrorKind::InvalidInput, "cannot make an empty path absolute",))
|
||||
} else {
|
||||
sys::path::absolute(path)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue