mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 03:14:30 +00:00
move syntax error to parser
This commit is contained in:
parent
61992dc1cd
commit
882c47f187
6 changed files with 24 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::fmt;
|
||||
|
||||
use crate::{TextRange, TextUnit};
|
||||
use crate::{TextRange, TextUnit, parsing::ParseError};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct SyntaxError {
|
||||
|
@ -95,9 +95,6 @@ pub enum SyntaxErrorKind {
|
|||
InvalidMatchInnerAttr,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct ParseError(pub String);
|
||||
|
||||
impl fmt::Display for SyntaxErrorKind {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::SyntaxErrorKind::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue