Integrate ParseError to compiler-core::Error
This commit is contained in:
@@ -186,7 +186,7 @@ impl<'a> FStringParser<'a> {
|
||||
vec![self.expr(ExprKind::FormattedValue {
|
||||
value: Box::new(
|
||||
parse_fstring_expr(&expression)
|
||||
.map_err(|e| InvalidExpression(Box::new(e.error)))?,
|
||||
.map_err(|e| InvalidExpression(Box::new(e.into())))?,
|
||||
),
|
||||
conversion: conversion as _,
|
||||
format_spec: spec,
|
||||
@@ -204,7 +204,7 @@ impl<'a> FStringParser<'a> {
|
||||
self.expr(ExprKind::FormattedValue {
|
||||
value: Box::new(
|
||||
parse_fstring_expr(&expression)
|
||||
.map_err(|e| InvalidExpression(Box::new(e.error)))?,
|
||||
.map_err(|e| InvalidExpression(Box::new(e.into())))?,
|
||||
),
|
||||
conversion: (if conversion == ConversionFlag::None && spec.is_none()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user