Convert FileNotFound to named fields (#11120)

# Description

Part of #10700

# User-Facing Changes

None

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A
This commit is contained in:
Eric Hodel
2023-11-21 01:08:10 -08:00
committed by GitHub
parent 0578cf85ac
commit a324a50bb7
8 changed files with 19 additions and 10 deletions

View File

@ -713,7 +713,10 @@ pub enum ShellError {
/// Does the file in the error message exist? Is it readable and accessible? Is the casing right?
#[error("File not found")]
#[diagnostic(code(nu::shell::file_not_found))]
FileNotFound(#[label("file not found")] Span),
FileNotFound {
#[label("file not found")]
span: Span,
},
/// Failed to find a file during a nushell operation.
///