Change ty_with_args to return Ty instead of Result
Although, we would like to avoid crashes whenever possible, and that's why I wanted to make this API fallible. It's looking pretty hard to do proper validation. I think many of our APIs will unfortunately depend on the user doing the correct thing since at the MIR level we are working on, we expect types to have been checked already.
This commit is contained in:
@@ -28,7 +28,7 @@ pub enum CompilerError<T> {
|
||||
}
|
||||
|
||||
/// A generic error to represent an API request that cannot be fulfilled.
|
||||
#[derive(Debug)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Error(pub(crate) String);
|
||||
|
||||
impl Error {
|
||||
|
||||
Reference in New Issue
Block a user