rust/src/libsyntax
bors ae8efdc87d Auto merge of #43017 - durka:stabilize-const-invocation, r=eddyb
Individualize feature gates for const fn invocation

This PR changes the meaning of `#![feature(const_fn)]` so it is only required to declare a const fn but not to call one. Based on discussion at #24111. I was hoping we could have an FCP here in order to move that conversation forward.

This sets the stage for future stabilization of the constness of several functions in the standard library (listed below), so could someone please tag the lang team for review.

- `std::cell`
    - `Cell::new`
    - `RefCell::new`
    - `UnsafeCell::new`
- `std::mem`
    - `size_of`
    - `align_of`
- `std::ptr`
    - `null`
    - `null_mut`
- `std::sync`
    - `atomic`
        - `Atomic{Bool,Ptr,Isize,Usize}::new`
    - `once`
        - `Once::new`
- primitives
    - `{integer}::min_value`
    - `{integer}::max_value`

Some other functions are const but they are also unstable or hidden, e.g. `Unique::new` so they don't have to be considered at this time.

After this stabilization, the following `*_INIT` constants in the standard library can be deprecated. I wasn't sure whether to include those deprecations in the current PR.

- `std::sync`
    - `atomic`
        - `ATOMIC_{BOOL,ISIZE,USIZE}_INIT`
    - `once`
        - `ONCE_INIT`
2017-09-16 17:02:17 +00:00
..
diagnostics Make fields of Span private 2017-08-30 01:38:54 +03:00
ext Implement RFC 1925 2017-09-01 12:46:37 -05:00
parse Auto merge of #44484 - tirr-c:issue-44332, r=petrochenkov 2017-09-14 00:28:27 +00:00
print pprust: fix parenthesization of exprs 2017-09-06 10:26:51 -04:00
util pprust: increase precedence of block-like exprs 2017-09-07 10:28:31 -04:00
abi.rs add thiscall calling convention support 2017-05-24 16:40:03 -04:00
ast.rs Remove trailing white space 2017-09-05 18:46:21 -07:00
attr.rs honor #[rustc_const_unstable] attributes 2017-09-13 15:07:17 +00:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml fix the easy features in libsyntax 2017-05-07 01:20:15 -07:00
codemap.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
config.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
diagnostic_list.rs honor #[rustc_const_unstable] attributes 2017-09-13 15:07:17 +00:00
entry.rs Cleanup InternedString. 2016-11-21 09:00:56 +00:00
feature_gate.rs honor #[rustc_const_unstable] attributes 2017-09-13 15:07:17 +00:00
fold.rs Implement RFC 1925 2017-09-01 12:46:37 -05:00
json.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
lib.rs *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
ptr.rs Replace some matches with try. 2017-06-07 12:15:39 +09:00
show_span.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
std_inject.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
str.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
test.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
test_snippet.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
tokenstream.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
visit.rs Remove support for gen arg 2017-07-28 15:46:26 +02:00