Skip to content

Commit e16b131

Browse files
committed
Auto merge of #27641 - nikomatsakis:soundness-rfc-1214, r=nrc
This PR implements the majority of RFC 1214. In particular, it implements: - the new outlives relation - comprehensive WF checking For the most part, new code receives warnings, not errors, though 3 regressions were found via a crater run. There are some deviations from RFC 1214. Most notably: - we still consider implied bounds from fn ret; this intersects other soundness issues that I intend to address in detail in a follow-up RFC. Fixing this without breaking a lot of code probably requires rewriting compare-method somewhat (which is probably a good thing). - object types do not check trait bounds for fear of encountering `Self`; this was left as an unresolved question in RFC 1214, but ultimately feels inconsistent. Both of those two issues are highlighted in the tracking issue, rust-lang/rust#27579. #27579 also includes a testing matrix with new tests that I wrote -- these probably duplicate some existing tests, I tried to check but wasn't quite sure what to look for. I tried to be thorough in testing the WF relation, at least, but would welcome suggestions for missing tests. r? @nrc (or perhaps someone else?)
2 parents a85e5d1 + 341596c commit e16b131

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ pub type Edges<'a,E> = Cow<'a,[E]>;
561561
/// `Cow<[T]>` to leave implementers the freedom to create
562562
/// entirely new vectors or to pass back slices into internally owned
563563
/// vectors.
564-
pub trait GraphWalk<'a, N, E> {
564+
pub trait GraphWalk<'a, N: Clone, E: Clone> {
565565
/// Returns all the nodes in this graph.
566566
fn nodes(&'a self) -> Nodes<'a, N>;
567567
/// Returns all of the edges in this graph.

0 commit comments

Comments
 (0)