Skip to content

Commit 2dc90af

Browse files
authored
Rollup merge of rust-lang#140380 - tmiasko:dfa, r=jswrenn
transmutability: uninit transition matches unit byte only The previous implementation was inconsistent about transitions that apply for an init byte. For example, when answering a query, an init byte could use corresponding init transition. Init byte could also use uninit transition, but only when the corresponding init transition was absent. This behaviour was incompatible with DFA union construction. Define an uninit transition to match an uninit byte only and update implementation accordingly. To describe that `Tree::uninit` is valid for any value, build an automaton that accepts any byte value. Additionally, represent byte ranges uniformly as a pair of integers to avoid special case for uninit byte. Fixes rust-lang#140337. Fixes rust-lang#140168 (comment). r? ```@jswrenn``` ```@joshlf```
2 parents 7188f45 + 88a8679 commit 2dc90af

File tree

9 files changed

+243
-352
lines changed

9 files changed

+243
-352
lines changed

compiler/rustc_transmute/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ edition = "2024"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
itertools = "0.12"
98
rustc_abi = { path = "../rustc_abi", optional = true }
109
rustc_data_structures = { path = "../rustc_data_structures" }
1110
rustc_hir = { path = "../rustc_hir", optional = true }
@@ -15,6 +14,11 @@ smallvec = "1.8.1"
1514
tracing = "0.1"
1615
# tidy-alphabetical-end
1716

17+
[dev-dependencies]
18+
# tidy-alphabetical-start
19+
itertools = "0.12"
20+
# tidy-alphabetical-end
21+
1822
[features]
1923
rustc = [
2024
"dep:rustc_abi",

0 commit comments

Comments
 (0)