forked from rust-lang/rust-clippy
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#7128 - Jarcho:const_fn_ice, r=flip1995
Fix ICE checking for feature gated const fn fixes: rust-lang#7126 changelog: Fix ICE in `missing_const_for_fn` when using a feature-gated `const fn`
- Loading branch information
Showing
2 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This test requires a feature gated const fn and will stop working in the future. | ||
|
||
#![feature(const_btree_new)] | ||
|
||
use std::collections::BTreeMap; | ||
|
||
struct Foo(BTreeMap<i32, i32>); | ||
impl Foo { | ||
fn new() -> Self { | ||
Self(BTreeMap::new()) | ||
} | ||
} | ||
|
||
fn main() {} |