about summary refs log tree commit diff
path: root/src/test/ui/consts
AgeCommit message (Collapse)AuthorLines
2019-06-19Add and update more testsOliver Scherer-1/+28
2019-06-19Make interning explicitly care about types and the mutability of memoryOliver Scherer-0/+160
2019-06-17Make use of `ptr::null(_mut)` instead of casting zeroLzu Tao-5/+5
2019-06-16Auto merge of #61347 - Centril:stabilize-underscore_const_names, r=petrochenkovbors-6/+35
Stabilize underscore_const_names in 1.37.0 You are now permitted to write: ```rust const _: $type_expression = $term_expression; ``` That is, we change the [grammar of items](https://github.com/rust-lang-nursery/wg-grammar/blob/9d1984d7ae8d6576f943566539a31a5800644c57/grammar/item.lyg#L3-L42), as written in [the *`.lyg`* notation](https://github.com/rust-lang/gll/tree/263bf161dad903e67aa65fc591ced3cab18afa2a#grammar), from: ```java Item = attrs:OuterAttr* vis:Vis? kind:ItemKind; ItemKind = | ... | Const:{ "const" name:IDENT ":" ty:Type "=" value:Expr ";" } | ... ; ``` into: ```java Item = attrs:OuterAttr* vis:Vis? kind:ItemKind; ItemKind = | ... | Const:{ "const" name:IdentOrUnderscore ":" ty:Type "=" value:Expr ";" } | ... ; IdentOrUnderscore = | Named:IDENT | NoName:"_" ; ``` r? @petrochenkov
2019-06-16Auto merge of #60730 - matthewjasper:optimize-false-edges, r=pnkfelixbors-20/+42
Optimize matches Attempt to fix or improve #60571 This is breaking some diagnostics because the MIR for match arms isn't in source order any more. cc @centril
2019-06-16compiletest: Remove `skip-codegen`Vadim Petrochenkov-4/+1
2019-06-16compiletest: Validate pass modes harderVadim Petrochenkov-2/+0
2019-06-13Create fewer basic blocks in match MIR loweringMatthew Jasper-20/+42
2019-06-12Handle index out of bound errors during const eval without panicEsteban Küber-0/+30
2019-06-11Rollup merge of #61518 - czipperz:const-fn-doc-disallow-loops, r=CentrilMazdak Farrokhzad-13/+13
Add loops to doc list of things not stable in const fn Closes #61508
2019-06-10Stabilize underscore_const_names.Mazdak Farrokhzad-6/+35
2019-06-09Reword const fn conditional and loop error textChris Gregory-13/+13
2019-06-07Rollup merge of #61532 - wesleywiser:const_prop_more, r=oli-obkMazdak Farrokhzad-0/+12
[const-prop] Support Rvalue::{Ref,Len} and Deref Also fixes an ICE I found in testing. r? @oli-obk ~~The final commit is just for a perf run. I'll remove it after that is completed.~~
2019-06-06Bless test outputWesley Wiser-0/+12
2019-06-06Make constructors actually be const functionsMatthew Jasper-0/+212
2019-06-05Rollup merge of #61536 - oli-obk:args_required_const_in_const_fn, r=eddybMazdak Farrokhzad-0/+26
Don't allow using const fn arguments as "args_required_const" r? @eddyb
2019-06-05Explain the existience of the regression testOliver Scherer-2/+11
2019-06-05Don't allow using const fn arguments as "args_required_const"Oliver Scherer-0/+17
2019-06-04Remove unneeded feature attr from atomic integers doctestsLzu Tao-2/+0
2019-05-31Stabilize reverse_bits featureLzu Tao-9/+7
2019-05-29Auto merge of #61203 - memoryruins:bare_trait_objects, r=Centrilbors-28/+28
Warn on bare_trait_objects by default The `bare_trait_objects` lint is set to `warn` by default. Most ui tests have been updated to use `dyn` to avoid creating noise in stderr files. r? @Centril cc #54910
2019-05-29bless youRalf Jung-1/+1
2019-05-29Update ui test suite to use dynmemoryruins-28/+28
2019-05-28Make sure array length diagnostic doesn't regressvarkor-3/+7
2019-05-28Correct pluralisation of tuple/array/associated type binding mismatch errorsvarkor-2/+2
2019-05-28Reintroduce `TypeError::FixedArraySize`varkor-2/+2
2019-05-28Use Display rather than Debug printing for const mismatchvarkor-2/+2
2019-05-28Update tests after pretty printingvarkor-2/+2
2019-05-28Eagerly evaluate in `super_relate_consts`varkor-2/+2
2019-05-25Update nll ui testsOliver Scherer-1/+1
2019-05-25Update ui testsOliver Scherer-1/+1
2019-05-21Add FAQ for NLL migrationJethro Beekman-0/+4
2019-05-19Rollup merge of #60370 - Richard-W:const-layout-construction, r=sfacklerMazdak Farrokhzad-0/+21
Mark core::alloc::Layout::from_size_align_unchecked const Makes it possible (pending stabilization of #57563 (`const_fn`)) to rewrite code like ```rust const BUFFER_SIZE: usize = 0x2000; const BUFFER_ALIGN: usize = 0x1000; fn foo() { let layout = std::alloc::Layout::from_size_align(BUFFER_SIZE, BUFFER_ALIGN) .unwrap(); let buffer = std::alloc::alloc(layout); } ``` to ```rust const BUFFER_LAYOUT: std::alloc::Layout = unsafe { std::alloc::Layout::from_size_align_unchecked(0x2000, 0x1000) }; fn foo() { let buffer = std::alloc::alloc(BUFFER_LAYOUT); } ``` which (although `unsafe` is used) looks somewhat cleaner and is easier to read.
2019-05-14Add ui test for const Layout::from_size_align_uncheckedRichard Wiedenhöft-0/+21
2019-05-12Remove feature(nll) when compare mode is sufficientMatthew Jasper-12/+2
2019-05-12Change compare mode to use -Zborrowck=mirMatthew Jasper-0/+390
2019-05-07compiletest: only use `make_exe_name` for tests that end up being executed.Eduard-Mihai Burtescu-2/+0
2019-05-02Fix failing testWesley Wiser-0/+1
2019-05-02Remove the `self.mir` field from `ConstPropagator`Wesley Wiser-3/+9
2019-04-23Stabilize futures_apiTaylor Cramer-1/+2
2019-04-23Add rustc_allow_const_fn_ptrTaylor Cramer-0/+62
2019-04-23Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytmMazdak Farrokhzad-3/+1
Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
2019-04-23Update ui testsvarkor-1/+1
2019-04-23Remove unnecessary ignore-tidy-linelengthvarkor-2/+0
2019-04-23Auto merge of #60125 - estebank:continue-evaluating, r=oli-obkbors-69/+176
Don't stop evaluating due to errors before borrow checking r? @oli-obk Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-22Fix ICE related to #53708Esteban Küber-13/+21
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-65/+164
2019-04-22Update ui testsvarkor-2/+2
2019-04-22Remove double trailing newlinesvarkor-9/+0
2019-04-22update tests for migrate mode by defaultMatthew Jasper-1152/+349