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
This commit is contained in:
parent
daa53a52a2
commit
79ef9718bb
1 changed files with 1 additions and 7 deletions
|
@ -21,6 +21,7 @@ pub fn is_min_const_fn(
|
||||||
| Predicate::RegionOutlives(_)
|
| Predicate::RegionOutlives(_)
|
||||||
| Predicate::TypeOutlives(_)
|
| Predicate::TypeOutlives(_)
|
||||||
| Predicate::WellFormed(_)
|
| Predicate::WellFormed(_)
|
||||||
|
| Predicate::Projection(_)
|
||||||
| Predicate::ConstEvaluatable(..) => continue,
|
| Predicate::ConstEvaluatable(..) => continue,
|
||||||
| Predicate::ObjectSafe(_) => {
|
| Predicate::ObjectSafe(_) => {
|
||||||
bug!("object safe predicate on function: {:#?}", predicate)
|
bug!("object safe predicate on function: {:#?}", predicate)
|
||||||
|
@ -29,13 +30,6 @@ pub fn is_min_const_fn(
|
||||||
bug!("closure kind predicate on function: {:#?}", predicate)
|
bug!("closure kind predicate on function: {:#?}", predicate)
|
||||||
}
|
}
|
||||||
Predicate::Subtype(_) => bug!("subtype 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) => {
|
Predicate::Trait(pred) => {
|
||||||
if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
|
if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue