Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove nightly from rustdoc v28 test matrix, since that's now v29. (Remove nightly from rustdoc v28 test matrix, since that's now v29. #332)
Rust 1.78 is no longer beta. (Rust 1.78 is no longer beta. #334)
Add enum discriminants
discriminant clone to lifetime annotation
complicate test examples
improved discriminant docs
hedge bets against placeholder representation
Co-authored-by: Predrag Gruevski [email protected]
finally got implicit discriminants working
remove sync structs
move to Cow<'a, str> for discriminants
Various clean-ups, still fighting closure bounds
sigh
error[E0521]: borrowed data escapes outside of closure
--> src/adapter/edges.rs:304:28
|
260 | pub(super) fn resolve_variant_edge<'a, V: AsVertex<Vertex<'a>> + 'a>(
| -- lifetime
'a
defined here...
302 | "discriminant" => resolve_neighbors_with(contexts, move |vertex: &'_ Vertex<'a>| {
| ------ - let's call the lifetime of this reference
'1
| |
|
vertex
is a reference that is only valid in the closure body303 | let origin = vertex.origin;
304 | let enum_var = vertex
| ____________________________^
305 | | .as_variant()
| | ^
| | |
| |_____________________________
vertex
escapes the closure body here| argument requires that
'1
must outlive'a
Actually clone Cow; same error as before, though...
Got the sucker.
Wrap up
Better dcocs for discriminant
Co-authored-by: Predrag Gruevski [email protected]
Finish up docs, improve tests
Add name back.
Co-authored-by: Predrag Gruevski [email protected]