]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #25609 - nikomatsakis:const-fn, r=pnkfelix
authorbors <bors@rust-lang.org>
Sun, 24 May 2015 11:12:34 +0000 (11:12 +0000)
committerbors <bors@rust-lang.org>
Sun, 24 May 2015 11:12:34 +0000 (11:12 +0000)
This is a port of @eddyb's `const-fn` branch. I rebased it, tweaked a few things, and added tests as well as a feature gate. The set of tests is still pretty rudimentary, I'd appreciate suggestions on new tests to write. Also, a double-check that the feature-gate covers all necessary cases.

One question: currently, the feature-gate allows the *use* of const functions from stable code, just not the definition. This seems to fit our usual strategy, and implies that we might (perhaps) allow some constant functions in libstd someday, even before stabilizing const-fn, if we were willing to commit to the existence of const fns but found some details of their impl unsatisfactory.

r? @pnkfelix

1  2 
src/librustc_lint/builtin.rs
src/libsyntax/ext/expand.rs
src/libsyntax/feature_gate.rs

Simple merge
Simple merge
Simple merge