Remove ShellError::FlagNotFound (#11119)

# Description

`ShellError::FlagNotFound` had a note that said it may be removable so
this PR removes it instead of updating it to named fields per #10700

I can't see this error being used since it was introduced with #4364. I
can't find why or where it was used before that date, though. There was
a large merge with that PR but I can't penetrate the secrets of git to
find out where its earlier history went.

# 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 00:23:09 -08:00 committed by GitHub
parent 8ad5d8bb6a
commit 1b54dd5418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -703,12 +703,6 @@ pub enum ShellError {
#[diagnostic(code(nu::shell::alias_not_found))]
AliasNotFound(#[label("alias not found")] Span),
/// A flag was not found.
#[error("Flag not found")]
#[diagnostic(code(nu::shell::flag_not_found))]
// NOTE: Seems to be unused. Removable?
FlagNotFound(String, #[label("{0} not found")] Span),
/// Failed to find a file during a nushell operation.
///
/// ## Resolution