]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #88711 - Mark-Simulacrum:fix-dfs-bug, r=jackh726
authorManish Goregaokar <manishsmail@gmail.com>
Sun, 12 Sep 2021 10:44:57 +0000 (03:44 -0700)
committerGitHub <noreply@github.com>
Sun, 12 Sep 2021 10:44:57 +0000 (03:44 -0700)
commitb87d0d0d94bf12c007bc7a074d056737bf2c945c
tree10fe8fe4084a2e5052d8acf682a1d64cd1275c50
parentf5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423
parentc9d46eb2244d49215e0a1ccf8bd4b7e700b252e7
Rollup merge of #88711 - Mark-Simulacrum:fix-dfs-bug, r=jackh726

Rework DepthFirstSearch API

This expands the API to be more flexible, allowing for more visitation patterns
on graphs. This will be useful to avoid extra datasets (and allocations) in
cases where the expanded DFS API is sufficient.

This also fixes a bug with the previous DFS constructor, which left the start
node not marked as visited (even though it was immediately returned).

Commit written by ```@nikomatsakis``` originally, cherry picked from several commits in work on never type stabilization, but stands alone.