Display expected patterns/tokens in parse error when applicable.
We've never been using those 'expected' tokens captured during
parsing, which is lame because they contain useful information!
This is much better than merely showing our infamous
"Try removing it!"
This commit is contained in:
@@ -324,7 +324,7 @@ impl Diagnostic for Error {
|
||||
"Try moving the shared code to a separate module that the others can depend on\n- {}",
|
||||
modules.join("\n- ")
|
||||
))),
|
||||
Error::Parse { error, .. } => error.kind.help(),
|
||||
Error::Parse { error, .. } => error.help(),
|
||||
Error::Type { error, .. } => error.help(),
|
||||
Error::StandardIo(_) => None,
|
||||
Error::MissingManifest { .. } => Some(Box::new(
|
||||
|
||||
Reference in New Issue
Block a user