Merge pull request #7560 from joshuawarner32/fix-pnc-apply-question-movement

Suppress TrySuffix movement around PncApply unless --migrate is passed
This commit is contained in:
Joshua Warner 2025-01-30 20:26:49 -08:00 committed by GitHub
commit 8c8b9418ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -19,5 +19,7 @@ jobs:
cargo +nightly-2024-02-03 install --locked cargo-fuzz
cd crates/compiler/test_syntax/fuzz && cargo +nightly-2024-02-03 fuzz run -j4 fuzz_expr --sanitizer=none -- -dict=dict.txt -max_total_time=60 || true
cd ..
for x in fuzz/artifacts/fuzz_expr/crash-*; do cargo run --bin minimize expr $x; done
if ls fuzz/artifacts/fuzz_expr/ | grep crash-; then exit 1; fi
if ls fuzz/artifacts/fuzz_expr/ | grep crash-; then
for x in fuzz/artifacts/fuzz_expr/crash-*; do cargo run --bin minimize expr $x; done
exit 1
fi

View file

@ -98,7 +98,9 @@ fn format_expr_only(
region,
},
loc_args,
) => {
) if buf.flags().parens_and_commas => {
// TODO: the conversion we do here is _wrong_ and should be removed in the near future
// For now this is helpful to fix up code that was incorrectly partially migrated
let arena = buf.text.bump();
let apply = arena.alloc(Expr::PncApply(
arena.alloc(Loc {