-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rewriting r#try! at root of chain generates bad code #7101
Copy link
Copy link
Open
Labels
A-ASTArea: Abstract Syntax Tree (AST) related thingsArea: Abstract Syntax Tree (AST) related thingsA-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEI-invalid-codeIssue: formatting causes compile-pass code to compile-failIssue: formatting causes compile-pass code to compile-failSO-use_try_shorthandStable option: use_try_shorthandStable option: use_try_shorthand
Description
Activity
Metadata
Metadata
Assignees
Labels
A-ASTArea: Abstract Syntax Tree (AST) related thingsArea: Abstract Syntax Tree (AST) related thingsA-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEI-invalid-codeIssue: formatting causes compile-pass code to compile-failIssue: formatting causes compile-pass code to compile-failSO-use_try_shorthandStable option: use_try_shorthandStable option: use_try_shorthand
Summary
Just recording something I ran into during my (ongoing) dive into chain formatting
I tried to format this code:
Expected behavior
It would be formatted to something like
Actual behavior
It was formatted to invalid code:
Configuration
Only needs the
use_try_shorthandoptionReproduction Steps
Meta
Also reproduced on
1141ee711fc87bf51ff8934c09a9d608b34e50bf(a recentHEADofmaster)