Skip to content

Commit

Permalink
Remove delay_span_bug from qualify_min_const_fn
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
phansch committed Jan 18, 2019
1 parent daa53a5 commit 79ef971
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/librustc_mir/transform/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub fn is_min_const_fn(
| Predicate::RegionOutlives(_)
| Predicate::TypeOutlives(_)
| Predicate::WellFormed(_)
| Predicate::Projection(_)
| Predicate::ConstEvaluatable(..) => continue,
| Predicate::ObjectSafe(_) => {
bug!("object safe predicate on function: {:#?}", predicate)
Expand All @@ -29,13 +30,6 @@ pub fn is_min_const_fn(
bug!("closure kind predicate on function: {:#?}", predicate)
}
Predicate::Subtype(_) => bug!("subtype predicate on function: {:#?}", predicate),
Predicate::Projection(_) => {
let span = tcx.def_span(current);
// we'll hit a `Predicate::Trait` later which will report an error
tcx.sess
.delay_span_bug(span, "projection without trait bound");
continue;
}
Predicate::Trait(pred) => {
if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
continue;
Expand Down

0 comments on commit 79ef971

Please sign in to comment.