Skip to content

Commit 9fcbbbb

Browse files
authored
Rollup merge of #86242 - BoxyUwU:rustdoc-const-evaluatable-ice, r=oli-obk
rustdoc- dont ICE on `ConstEvaluatable` predicates Fixes #77647 rustdoc doesn't need to be handling these as you cant write them, they just get added implicitly when you write a where clause containing an expression.
2 parents d476707 + 94de92d commit 9fcbbbb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/librustdoc/clean/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,12 @@ impl<'a> Clean<Option<WherePredicate>> for ty::Predicate<'a> {
350350
ty::PredicateKind::RegionOutlives(pred) => pred.clean(cx),
351351
ty::PredicateKind::TypeOutlives(pred) => pred.clean(cx),
352352
ty::PredicateKind::Projection(pred) => Some(pred.clean(cx)),
353+
ty::PredicateKind::ConstEvaluatable(..) => None,
353354

354355
ty::PredicateKind::Subtype(..)
355356
| ty::PredicateKind::WellFormed(..)
356357
| ty::PredicateKind::ObjectSafe(..)
357358
| ty::PredicateKind::ClosureKind(..)
358-
| ty::PredicateKind::ConstEvaluatable(..)
359359
| ty::PredicateKind::ConstEquate(..)
360360
| ty::PredicateKind::TypeWellFormedFromEnv(..) => panic!("not user writable"),
361361
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![crate_name = "foo"]
2+
#![feature(const_evaluatable_checked, const_generics)]
3+
#![allow(incomplete_features)]
4+
// make sure that `ConstEvaluatable` predicates dont cause rustdoc to ICE #77647
5+
// @has foo/struct.Ice.html '//pre[@class="rust struct"]' \
6+
// 'pub struct Ice<const N: usize> where [(); N + 1]: ;'
7+
pub struct Ice<const N: usize> where [(); N + 1]:;

0 commit comments

Comments
 (0)