Remove push/pop_local_changes from FileProvider trait
[hiphop-php.git] / hphp / hack / src / rupro / hackrs / errors.rs
blob9540428169df01f446df711b4505c06dc496b40a
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 //
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
5 use crate::parsing_error::ParsingError;
6 use ty::local_error::TypingError;
7 use ty::reason::Reason;
9 #[derive(Debug)]
10 pub enum HackError<R: Reason> {
11     Parsing(ParsingError),
12     Typing(TypingError<R>),
15 impl<R: Reason> From<ParsingError> for HackError<R> {
16     fn from(e: ParsingError) -> Self {
17         Self::Parsing(e)
18     }
21 impl<R: Reason> From<TypingError<R>> for HackError<R> {
22     fn from(e: TypingError<R>) -> Self {
23         Self::Typing(e)
24     }