about summary refs log tree commit diff
path: root/src/test/ui/consts
AgeCommit message (Collapse)AuthorLines
2018-11-30Add a test for various const let featuresOliver Scherer-0/+468
2018-11-30Remove a bunch of now-unnecessary `const_let` feature gatesOliver Scherer-3/+0
2018-11-30Stabilize `const_let` inside const functionsOliver Scherer-118/+7
2018-11-30Fix const_fn ICE with non-const function pointerPhilipp Hansch-0/+28
2018-11-26Auto merge of #56070 - oli-obk:const_let, r=eddybbors-15/+278
Allow assignments in const contexts fixes https://github.com/rust-lang/rust/issues/54098 fixes https://github.com/rust-lang/rust/issues/51251 fixes https://github.com/rust-lang/rust/issues/52613
2018-11-25Rollup merge of #56207 - SimonSapin:int_to_from_bytes, r=nagisaPietro Albini-1/+1
Stabilize the int_to_from_bytes feature Fixes #52963 FCP to merge completed: https://github.com/rust-lang/rust/issues/52963#issuecomment-416548327
2018-11-25Rollup merge of #56024 - oli-obk:const_fn_collect_inner, r=michaelwoeristerPietro Albini-1/+29
Don't auto-inline const functions fixes #53451
2018-11-25Stabilize the int_to_from_bytes featureSimon Sapin-1/+1
Fixes #52963
2018-11-24Clean up array/slice of primitive validationOliver Scherer-0/+16
2018-11-24Remove stderr file, because the test passes nowOliver Scherer-11/+0
2018-11-24Reintroduce zst-slice reading `read_bytes` method on `Memory`Oliver Scherer-1/+2
2018-11-24Properly test for int pointers in fat pointers to str slices of zero charsOliver Scherer-21/+12
2018-11-24Add regression test for integral pointers in zst str slice fat pointersOliver Scherer-0/+26
2018-11-21Auto merge of #56065 - oli-obk:min_const_fn_loop_ice, r=davidtwcobors-0/+13
Replace the ICEing on const fn loops with an error fixes #56035
2018-11-21Explain why we do not overwrite qualification of localsOliver Scherer-5/+29
2018-11-21Add regression test for overwriting qualifs by assignmentOliver Scherer-0/+22
2018-11-21Fix a commentOliver Scherer-1/+1
2018-11-21TidyOliver Scherer-2/+2
2018-11-21Ensure assignments don't allow skipping projection checksOliver Scherer-0/+32
2018-11-21Properly assign to aggregate fieldsOliver Scherer-0/+20
2018-11-20Trailing newlineOliver Scherer-1/+1
2018-11-20Add sanity test for promotion and `const_let`Oliver Scherer-0/+35
2018-11-20Explain missing error in testOliver Scherer-1/+4
2018-11-19we now do proper validation on scalarsRalf Jung-14/+14
2018-11-19Make const_eval_raw query return just an AllocIdRalf Jung-19/+27
2018-11-19Also catch static mutation at evaluation timeOliver Scherer-17/+45
2018-11-19Rollup merge of #56059 - alexcrichton:fix-tests, r=sfacklerkennytm-0/+27
Increase `Duration` approximate equal threshold to 1us Previously this threshold when testing was 100ns, but the Windows documentation states: > which is a high resolution (<1us) time stamp which presumably means that we could have up to 1us resolution, which means that 100ns doesn't capture "equivalent" time intervals due to various bits of rounding here and there. It's hoped that this.. Closes #56034
2018-11-19Rollup merge of #56007 - RalfJung:non-const-call, r=oli-obkPietro Albini-2/+10
CTFE: dynamically make sure we do not call non-const-fn I'd love to have a test case for this, but I don't know how. I am also really surprised by this test case that changed behavior: Why did it even start execution if it already determined that it shouldn't?!? r? @oli-obk
2018-11-19Allow assignments in const contextsOliver Scherer-16/+115
2018-11-19Replace the ICEing on const fn loops with an errorOliver Scherer-0/+13
2018-11-18Auto merge of #55672 - RalfJung:miri-extern-types, r=eddybbors-0/+27
miri: accept extern types in structs if they are the only field Fixes https://github.com/rust-lang/rust/issues/55541 Cc @oli-obk @eddyb https://github.com/rust-lang/rust/issues/43467
2018-11-17Don't auto-inline `const fn`Oliver Scherer-1/+29
2018-11-16CTFE: dynamically make sure we do not call non-const-fnRalf Jung-2/+10
2018-11-15do not accept out-of-bounds pointers in enum discriminants, they might be NULLRalf Jung-6/+19
2018-11-15validation: better error when the enum discriminant is UndefRalf Jung-13/+13
2018-11-13Auto merge of #55589 - oli-obk:min_length_💣, r=pnkfelixbors-1/+1
Add `VariantIdx` type and use instead of `usize`
2018-11-12Auto merge of #55278 - Centril:constification-1, r=alexcrichtonbors-12/+86
Minor standard library constification This PR makes some bits of the standard library into `const fn`s. I've tried to be as aggressive as I possibly could in the constification. The list is rather small due to how restrictive `const fn` is at the moment. r? @oli-obk cc @rust-lang/libs Stable public APIs affected: + [x] `Cell::as_ptr` + [x] `UnsafeCell::get` + [x] `char::is_ascii` + [x] `iter::empty` + [x] `ManuallyDrop::{new, into_inner}` + [x] `RangeInclusive::{start, end}` + [x] `NonNull::as_ptr` + [x] `{[T], str}::as_ptr` + [x] `Duration::{as_secs, subsec_millis, subsec_micros, subsec_nanos}` + [x] `CStr::as_ptr` + [x] `Ipv4Addr::is_unspecified` + [x] `Ipv6Addr::new` + [x] `Ipv6Addr::octets` Unstable public APIs affected: + [x] `Duration::{as_millis, as_micros, as_nanos, as_float_secs}` + [x] `Wrapping::{count_ones, count_zeros, trailing_zeros, rotate_left, rotate_right, swap_bytes, reverse_bits, from_be, from_le, to_be, to_le, leading_zeros, is_positive, is_negative, leading_zeros}` + [x] `core::convert::identity` -------------------------- ## Removed from list in first pass: Stable public APIs affected: + [ ] `BTree{Map, Set}::{len, is_empty}` + [ ] `VecDeque::is_empty` + [ ] `String::{is_empty, len}` + [ ] `FromUtf8Error::utf8_error` + [ ] `Vec<T>::{is_empty, len}` + [ ] `Layout::size` + [ ] `DecodeUtf16Error::unpaired_surrogate` + [ ] `core::fmt::{fill, width, precision, sign_plus, sign_minus, alternate, sign_aware_zero_pad}` + [ ] `panic::Location::{file, line, column}` + [ ] `{ChunksExact, RChunksExact}::remainder` + [ ] `Utf8Error::valid_up_to` + [ ] `VacantEntry::key` + [ ] `NulError::nul_position` + [ ] `IntoStringError::utf8_error` + [ ] `IntoInnerError::error` + [ ] `io::Chain::get_ref` + [ ] `io::Take::{limit, get_ref}` + [ ] `SocketAddrV6::{flowinfo, scope_id}` + [ ] `PrefixComponent::{kind, as_os_str}` + [ ] `Path::{ancestors, display}` + [ ] `WaitTimeoutResult::timed_out` + [ ] `Receiver::{iter, try_iter}` + [ ] `thread::JoinHandle::thread` + [ ] `SystemTimeError::duration` Unstable public APIs affected: + [ ] `core::fmt::Arguments::new_v1` + [ ] `core::fmt::Arguments::new_v1_formatted` + [ ] `Pin::{get_ref, into_ref}` + [ ] `Utf8Lossy::chunks` + [ ] `LocalWaker::as_waker` + [ ] `panic::PanicInfo::{internal_constructor, message, location}` + [ ] `panic::Location::{internal_constructor }` ## Removed from list in 2nd pass: Stable public APIs affected: + [ ] `LinkedList::{new, iter, is_empty, len}` + [ ] `mem::forget` + [ ] `Cursor::{new, get_ref, position}` + [ ] `io::{empty, repeat, sink}` + [ ] `PoisonError::new` + [ ] `thread::Builder::new` + [ ] `process::Stdio::{piped, inherit, null}` Unstable public APIs affected: + [ ] `io::Initializer::{zeroing, should_initialize}`
2018-11-12miri-engine value visitor update to VariantIdxOliver Scherer-1/+1
2018-11-11Rollup merge of #55828 - oli-obk:promotion_strikes_again, r=eddybPietro Albini-0/+74
Add missing `rustc_promotable` attribute to unsigned `min_value` and `max_value` cc @pnkfelix fixes #55806
2018-11-11Rollup merge of #55792 - oli-obk:propsicle, r=RalfJungPietro Albini-0/+28
Prevent ICE in const-prop array oob check fixes https://github.com/rust-lang/rust/issues/55772 fixes https://github.com/rust-lang/rust/issues/54541
2018-11-10adjust ui/../mod-static-with-const-fn.rsMazdak Farrokhzad-3/+15
2018-11-10Tidy ♪ all ♪ the ♪ way ♪♪♪♪ with ♪ a ♪ newline ♪ missing ↵Oliver Scherer-4/+4
♪ cry ♪♪
2018-11-10Add a few tests around raw pointers and interior mutabilityOliver Scherer-0/+73
2018-11-10fix mod-static-with-const-fn.rs.Mazdak Farrokhzad-3/+1
2018-11-10--bless mod-static-with-const-fn.stderrMazdak Farrokhzad-9/+2
2018-11-10constify parts of libcore.Mazdak Farrokhzad-2/+0
2018-11-09Add missing `rustc_promotable` attribute to unsigned `min_value` and `max_value`Oliver Scherer-0/+74
2018-11-09Fix tidyOliver Scherer-2/+2
2018-11-08Add more regression testsOliver Scherer-0/+15
2018-11-08Prevent ICE in const-prop array oob checkOliver Scherer-0/+13