Skip to content

Commit d27224e

Browse files
authored
Rollup merge of #57736 - phansch:remove_delay, r=oli-obk
Remove delay_span_bug from qualify_min_const_fn This is causing issues with a new Clippy lint that will be able to detect possible const functions. As per rust-lang/rust-clippy#3648 (comment) r? @oli-obk
2 parents 5b9e02a + 79ef971 commit d27224e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/librustc_mir/transform/qualify_min_const_fn.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub fn is_min_const_fn(
2121
| Predicate::RegionOutlives(_)
2222
| Predicate::TypeOutlives(_)
2323
| Predicate::WellFormed(_)
24+
| Predicate::Projection(_)
2425
| Predicate::ConstEvaluatable(..) => continue,
2526
| Predicate::ObjectSafe(_) => {
2627
bug!("object safe predicate on function: {:#?}", predicate)
@@ -29,13 +30,6 @@ pub fn is_min_const_fn(
2930
bug!("closure kind predicate on function: {:#?}", predicate)
3031
}
3132
Predicate::Subtype(_) => bug!("subtype predicate on function: {:#?}", predicate),
32-
Predicate::Projection(_) => {
33-
let span = tcx.def_span(current);
34-
// we'll hit a `Predicate::Trait` later which will report an error
35-
tcx.sess
36-
.delay_span_bug(span, "projection without trait bound");
37-
continue;
38-
}
3933
Predicate::Trait(pred) => {
4034
if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
4135
continue;

0 commit comments

Comments
 (0)