Skip to content

Commit 3ab5203

Browse files
authored
Rollup merge of #108033 - lcnr:coinductive-attr, r=compiler-errors
add an unstable `#[rustc_coinductive]` attribute useful to test coinduction, especially in the new solver. as this attribute should remain permanently unstable I don't think this needs any official approval. cc ``@rust-lang/types`` had to weaken the check for stable query results in the solver to prevent an ICE if there's a coinductive cycle with constraints. r? ``@compiler-errors``
2 parents b027c28 + 5245aca commit 3ab5203

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/marker.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
9797
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
9898
#[rustc_specialization_trait]
9999
#[rustc_deny_explicit_impl]
100+
#[cfg_attr(not(bootstrap), rustc_coinductive)]
100101
pub trait Sized {
101102
// Empty.
102103
}

0 commit comments

Comments
 (0)