rust/src/test/ui
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
..
block-result Readd backticks around () 2017-08-09 10:48:33 -07:00
borrowck Added tests for new loop borrow message 2017-07-27 02:43:11 +01:00
check_match rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
closure_context report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
codemap_tests Fix mispositioned error indicators 2017-09-07 10:26:27 +02:00
compare-method rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
const-eval trans::mir::constant - fix assignment error recovery 2017-07-31 18:09:02 +03:00
cross-crate-macro-backtrace Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
did_you_mean Auto merge of #43442 - zackmdavis:note_available_field_names_if_levenshtein_fails, r=nikomatsakis 2017-08-04 10:13:55 +00:00
dropck Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
fmt Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
generator Fix more UI tests 2017-08-17 22:52:04 -07:00
hello_world add UI testing framework 2016-05-13 15:22:45 -07:00
impl-trait remove the hacky selection impl in method::probe 2017-08-29 14:34:43 +03:00
interior-mutability report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
invalid-module-declaration Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-37311-type-length-limit Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-38875 rustc: evaluate fixed-length array length expressions lazily. 2017-09-11 08:41:16 +03:00
issue-40402-ref-hints reorder span labels 2017-07-18 00:07:37 +05:30
issue-41652 Add help for static method invalid use 2017-08-14 20:56:54 +02:00
lifetime-errors fix ui tests 2017-09-13 20:56:27 +05:30
lifetimes Stabilize rvalue promotion to 'static. 2017-08-16 20:30:56 +03:00
lint add a lowercase suggestion to unknown_lints 2017-08-31 22:18:12 +02:00
macros Rollup merge of #43447 - estebank:import-span, r=nikomatsakis 2017-07-26 06:15:02 -06:00
mismatched_types rustc: take TyCtxt and RegionMaps in CodeMap::span. 2017-09-01 11:17:03 +03:00
missing-items remove associated_consts feature gate 2017-07-06 11:52:25 -07:00
on-unimplemented implement improved on_unimplemented directives 2017-09-03 13:10:54 +03:00
print-fuel UI test for -Z print-fuel=foo 2017-04-11 14:36:08 +03:00
print_type_sizes Remove unnecessary unsafe in test/ui/print_type_sizes/nullable.rs 2017-07-22 20:38:40 +02:00
pub Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
reachable rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
resolve Merge remote-tracking branch 'origin/master' into gen 2017-08-21 10:41:56 -07:00
span Auto merge of #43017 - durka:stabilize-const-invocation, r=eddyb 2017-09-16 17:02:17 +00:00
suggestions add error message for the other case too 2017-09-03 13:10:54 +03:00
token Merge remote-tracking branch 'origin/master' into proc_macro_api 2017-07-05 08:42:13 -07:00
transmute compiletest: Support custom normalization rules. 2017-07-11 16:57:52 +08:00
type-check Adjust new suggestions to the suggestion guidelines 2017-07-21 13:59:17 +02:00
cast-to-unsized-trait-object-suggestion.rs Move some tests from compile-fail to ui 2017-07-17 08:38:54 +02:00
cast-to-unsized-trait-object-suggestion.stderr Change some helps to suggestions 2017-07-17 10:03:37 +02:00
coercion-missing-tail-expected-type.rs Add test for #24889 2017-06-18 14:30:33 +02:00
coercion-missing-tail-expected-type.stderr report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
deprecated-macro_escape-inner.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
deprecated-macro_escape-inner.stderr Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
deprecated-macro_escape.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
deprecated-macro_escape.stderr Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
deriving-meta-empty-trait-list.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
deriving-meta-empty-trait-list.stderr Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
enum-size-variance.rs compiletest: Support custom normalization rules. 2017-07-11 16:57:52 +08:00
enum-size-variance.stderr compiletest: Support custom normalization rules. 2017-07-11 16:57:52 +08:00
explain.rs Modify --explain to handle hidden code (# ...) and indented code blocks. 2017-06-23 15:31:53 +08:00
explain.stdout Modify --explain to handle hidden code (# ...) and indented code blocks. 2017-06-23 15:31:53 +08:00
extern-const.rs Better diagnostics and recovery for const in extern blocks 2017-08-10 00:52:50 +01:00
extern-const.stderr Reword error hint 2017-08-10 12:31:02 +01:00
issue-13483.rs Verify that an if condition block returns a value 2017-08-17 20:25:46 -07:00
issue-13483.stderr Verify that an if condition block returns a value 2017-08-17 20:25:46 -07:00
issue-19100.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
issue-19100.stderr Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
issue-22644.rs syntax: Apply recovery for casts to type ascription 2017-07-07 11:53:12 +03:00
issue-22644.stderr Auto merge of #43096 - estebank:ascription-help, r=nikomatsakis 2017-07-23 20:56:20 +00:00
issue-26548.rs remove layout_cache and fix -Z print-type-sizes 2017-06-01 13:31:11 -04:00
issue-26548.stderr report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
issue-33525.rs report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
issue-33525.stderr report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
issue-35675.rs resolve: Fix instability in import suggestions 2017-07-30 12:27:57 +03:00
issue-35675.stderr resolve: Fix instability in import suggestions 2017-07-30 12:27:57 +03:00
issue-35976.rs Tweak error message 2017-08-03 14:40:40 +02:00
issue-35976.stderr Tweak error message 2017-08-03 14:40:40 +02:00
issue-42954.rs syntax: Apply recovery for casts to type ascription 2017-07-07 11:53:12 +03:00
issue-42954.stderr Adjust new suggestions to the suggestion guidelines 2017-07-21 13:59:17 +02:00
issue-43806.rs Don't trigger unused_result on functions returning empty enums 2017-08-11 22:07:28 -07:00
issue-44023.rs Fix a byte/char confusion issue in the error emitter 2017-08-25 21:46:54 +02:00
issue-44023.stderr Fix a byte/char confusion issue in the error emitter 2017-08-25 21:46:54 +02:00
issue-44078.rs Fix a byte/char confusion issue in the error emitter 2017-08-25 21:46:54 +02:00
issue-44078.stderr Fix a byte/char confusion issue in the error emitter 2017-08-25 21:46:54 +02:00
loop-break-value-no-repeat.rs Stabilize the loop_break_value feature 2017-05-17 21:34:37 +02:00
loop-break-value-no-repeat.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
method-call-lifetime-args-lint.rs Add an extra note to late_bound_lifetime_arguments error/lint 2017-07-19 23:12:58 +03:00
method-call-lifetime-args-lint.stderr Add an extra note to late_bound_lifetime_arguments error/lint 2017-07-19 23:12:58 +03:00
method-call-lifetime-args.rs Add an extra note to late_bound_lifetime_arguments error/lint 2017-07-19 23:12:58 +03:00
method-call-lifetime-args.stderr Add an extra note to late_bound_lifetime_arguments error/lint 2017-07-19 23:12:58 +03:00
mut-ref.rs Better diagnostics and recovery for mut ref in patterns 2017-07-26 18:59:07 +03:00
mut-ref.stderr Better diagnostics and recovery for mut ref in patterns 2017-07-26 18:59:07 +03:00
path-lookahead.rs rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
path-lookahead.stderr rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
regions-fn-subtyping-return-static.rs make lifetimes that only appear in return type early-bound 2017-02-05 16:30:03 -05:00
regions-fn-subtyping-return-static.stderr Cleanup some remains of hr_lifetime_in_assoc_type compatibility lint 2017-07-29 17:50:42 +03:00
resolve-error.stderr Change some helps to suggestions 2017-07-17 10:03:37 +02:00
shadowed-type-parameter.rs Move type parameter shadowing test to ui 2017-06-28 15:11:05 -07:00
shadowed-type-parameter.stderr report the total number of errors on compilation failure 2017-07-02 16:16:44 +03:00
static-lifetime.rs Improve E0477 error message 2017-05-09 20:51:18 +02:00
static-lifetime.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
str-lit-type-mismatch.rs Suggest changing literals instead of calling methods (fixes #44307) 2017-09-06 10:09:25 +02:00
str-lit-type-mismatch.stderr Suggest changing literals instead of calling methods (fixes #44307) 2017-09-06 10:09:25 +02:00
test-should-panic-attr.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
test-should-panic-attr.stderr Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
trait-method-private.rs Improve error message when duplicate names for type and trait method 2017-08-08 21:17:33 +02:00
trait-method-private.stderr Improve error message when duplicate names for type and trait method 2017-08-08 21:17:33 +02:00
union-fields.rs Handle type aliases as well 2017-08-06 20:46:32 +02:00
union-fields.stderr Handle type aliases as well 2017-08-06 20:46:32 +02:00
union-sized-field.rs Handle structs, unions and enums unsized field/variant separately 2017-08-18 10:24:53 +02:00
union-sized-field.stderr Handle structs, unions and enums unsized field/variant separately 2017-08-18 10:24:53 +02:00
update-all-references.sh pacify the mercilous tidy 2016-05-16 16:48:48 -04:00
update-references.sh cleanup error reporting and add ui tests 2016-11-01 14:04:14 -04:00