mirror of
https://github.com/RustPython/Parser.git
synced 2025-09-05 10:01:00 +00:00
Merge branch 'master' into TheAnyKey/p38_named_expression_completion_step2
This commit is contained in:
commit
26654d7404
1 changed files with 2 additions and 2 deletions
|
@ -591,7 +591,7 @@ impl<O: OutputStream> Compiler<O> {
|
|||
{
|
||||
return Err(self.error_loc(
|
||||
CompileErrorType::AsyncReturnValue,
|
||||
statement.location.clone(),
|
||||
statement.location,
|
||||
));
|
||||
}
|
||||
self.compile_expression(v)?;
|
||||
|
@ -2042,7 +2042,7 @@ impl<O: OutputStream> Compiler<O> {
|
|||
|
||||
let mut compile_element = |element| {
|
||||
self.compile_expression(element).map_err(|e| {
|
||||
if matches!(e.error, CompileErrorType::InvalidStarExpr) {
|
||||
if let CompileErrorType::InvalidStarExpr = e.error {
|
||||
self.error(CompileErrorType::SyntaxError(
|
||||
"iterable unpacking cannot be used in comprehension".to_owned(),
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue