diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-19 19:41:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-19 19:41:24 +0100 |
| commit | d27224e0d877891ac1ff175bd35f8fd09d3640d9 (patch) | |
| tree | 4477060a4a5ca252156f4547e3b89a0cf57ea267 | |
| parent | 5b9e02a39ca0ffca56ce11f64db37876ca9c93ab (diff) | |
| parent | 79ef9718bb8e7b1fe45770a1ca43fb79bebbbbf0 (diff) | |
| download | rust-d27224e0d877891ac1ff175bd35f8fd09d3640d9.tar.gz rust-d27224e0d877891ac1ff175bd35f8fd09d3640d9.zip | |
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 https://github.com/rust-lang/rust-clippy/pull/3648#discussion_r247927450 r? @oli-obk
| -rw-r--r-- | src/librustc_mir/transform/qualify_min_const_fn.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/librustc_mir/transform/qualify_min_const_fn.rs b/src/librustc_mir/transform/qualify_min_const_fn.rs index 059b88a4d70..85bf1e70ebf 100644 --- a/src/librustc_mir/transform/qualify_min_const_fn.rs +++ b/src/librustc_mir/transform/qualify_min_const_fn.rs @@ -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) @@ -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; |
