diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-22 09:12:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-22 09:12:11 +0100 |
| commit | 87be70e2b441f52eaf6698fa32538c146e6deeea (patch) | |
| tree | cbbdca06bb06a403da4e60d52b702829c5a3d4bf /compiler/rustc_mir_dataflow/src | |
| parent | a2bcfae5c5d05dd7806a79194cda39108ed6cd7d (diff) | |
| parent | 1f2028f93013df476888b34fad78944ae9e4e837 (diff) | |
| download | rust-87be70e2b441f52eaf6698fa32538c146e6deeea.tar.gz rust-87be70e2b441f52eaf6698fa32538c146e6deeea.zip | |
Rollup merge of #134599 - dtolnay:fulldepsparser, r=fmease
Detect invalid exprs in parser used by pretty-printer tests This PR fixes a bug in https://github.com/rust-lang/rust/pull/133730 inherited from https://github.com/rust-lang/rust/pull/43742. Before this fix, the test might silently only operate on a prefix of some of the test cases in this table: https://github.com/rust-lang/rust/blob/13170cd787cb733ed24842ee825bcbd98dc01476/tests/ui-fulldeps/pprust-parenthesis-insertion.rs#L57 For example, adding the test case `1 .. 2 .. 3` (a syntactically invalid expression) into the table would unexpectedly succeed the test instead of crashing at this unwrap: https://github.com/rust-lang/rust/blob/13170cd787cb733ed24842ee825bcbd98dc01476/tests/ui-fulldeps/pprust-parenthesis-insertion.rs#L199-L200 because `parse_expr` would successfully parse just `1 .. 2` and disregard the last `.. 3`. This PR adds a check that `parse_expr` reaches `Eof`, ensuring all the test cases actually test the whole expression they look like they are supposed to.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src')
0 files changed, 0 insertions, 0 deletions
