about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2018-09-06Auto merge of #53721 - arielb1:exhaustively-unpun, r=nikomatsakisbors-0/+29
fix `is_non_exhaustive` confusion between structs and enums Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549. r? @eddyb
2018-09-03Auto merge of #53697 - Cyres:const-fn-int-ops, r=oli-obkbors-0/+174
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
2018-09-03Add missing braceTim Diekmann-1/+1
2018-09-03Add ident function to the rest of the testsCyres-22/+34
2018-09-03Wrap rhs in ident functionTim Diekmann-7/+11
2018-09-01rebaseTim-0/+158
2018-09-01Auto merge of #53604 - oli-obk:min_const_fn, r=Centril,varkorbors-19/+21
Implement the `min_const_fn` feature gate cc @RalfJung @eddyb r? @Centril implements the feature gate for #53555 I added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all. The `min_const_fn` checks are run first, and if they succeeded, the `const_fn` checks are run additionally to ensure we didn't miss anything.
2018-08-31Auto merge of #53755 - llogiq:fix-unsound-16bit-range, r=nagisabors-0/+23
fix u32 steps_between for 16-bit systems This fixes #48006.
2018-08-31Restrict most uses of `const_fn` to `min_const_fn`Oliver Schneider-18/+18
2018-08-31Implement the `min_const_fn` feature gateOliver Schneider-1/+3
2018-08-30Rollup merge of #53786 - frewsxcv:frewsxcv-bad-style, r=ManishearthPietro Albini-1/+1
Replace usages of 'bad_style' with 'nonstandard_style'. `bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-30Rollup merge of #53476 - GuillaumeGomez:try-from-int-error-partial-eq, r=KodrAusPietro Albini-0/+21
Add partialeq implementation for TryFromIntError type Fixes #53458.
2018-08-30Made std::intrinsics::transmute() const fn.thedarkula-0/+22
2018-08-30fix u32 steps_between for 16-bit systemsAndre Bogus-0/+23
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-1/+1
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-29Auto merge of #53671 - RalfJung:miri-refactor, r=oli-obkbors-0/+8
Miri engine cleanup * Unify the two maps in memory to store the allocation and its kind together. * Share the handling of statics between CTFE and miri: The miri engine always uses "lazy" `AllocType::Static` when encountering a static. Acessing that static invokes CTFE (no matter the machine). The machine only has any influence when writing to a static, which CTFE outright rejects (but miri makes a copy-on-write). * Add an `AllocId` to by-ref consts so miri can use them as operands without making copies. * Move responsibilities around for the `eval_fn_call` machine hook: The hook just has to find the MIR (or entirely take care of everything); pushing the new stack frame is taken care of by the miri engine. * Expose the intrinsics and lang items implemented by CTFE so miri does not have to reimplement them. * Allow Machine to hook into foreign statics (used by miri to get rid of some other hacks). * Clean up function calling. * Switch const sanity check to work on operands, not mplaces. * Move const_eval out of rustc_mir::interpret, to make sure that it does not access private implementation details. In particular, we can finally make `eval_operand` take `&self`. :-) Should be merged after https://github.com/rust-lang/rust/pull/53609, across which I will rebase.
2018-08-28Add partialeq implementation for TryFromIntError typeGuillaume Gomez-0/+21
2018-08-28restructure unary_op to also dispatch on type first; fix promotion with ↵Ralf Jung-0/+8
unary '-' overflowing
2018-08-27Auto merge of #53227 - nivkner:pin_move, r=RalfJungbors-4/+4
move the Pin API into its own module for centralized documentation This implements the change proposed by @withoutboats in #49150, as suggested by @RalfJung in the review of #53104, along with the documentation that was originally in it, that was deemed more appropriate in module-level documentation. r? @RalfJung
2018-08-26fix `is_non_exhaustive` confusion between structs and enumsAriel Ben-Yehuda-0/+29
Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549.
2018-08-25Update Cargo submoduleAlex Crichton-2/+2
Also update Cargo's dependencies while we're at it
2018-08-24Auto merge of #53662 - kennytm:rollup, r=kennytmbors-1/+50
Rollup of 16 pull requests Successful merges: - #53311 (Window Mutex: Document that we properly initialize the SRWLock) - #53503 (Discourage overuse of mem::forget) - #53545 (Fix #50865: ICE on impl-trait returning functions reaching private items) - #53559 (add macro check for lint) - #53562 (Lament the invincibility of the Turbofish) - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()) - #53592 (docs: minor stylistic changes to str/string docs) - #53594 (Update RELEASES.md to include clippy-preview) - #53600 (Fix a grammatical mistake in "expected generic arguments" errors) - #53614 (update nomicon and book) - #53617 (tidy: Stop requiring a license header) - #53618 (Add missing fmt examples) - #53636 (Prefer `.nth(n)` over `.skip(n).next()`.) - #53644 (Use SmallVec for SmallCStr) - #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs) - #53666 (Added rustc_codegen_llvm to compiler documentation.)
2018-08-24Rollup merge of #53545 - FelixMcFelix:fix-50865-beta, r=petrochenkovkennytm-0/+49
Fix #50865: ICE on impl-trait returning functions reaching private items Adds a test case as suggested in #50865, and implements @petrochenkov's suggestion. Fixes #50865. Impl-trait-returning functions are marked under a new (low) access level, which they propagate rather than `AccessLevels::Reachable`. `AccessLevels::is_reachable` returns false for such items (leaving stability analysis unaffected), these items may still be visible to the lints phase however.
2018-08-24Rollup merge of #53636 - frewsxcv:frewsxcv-nth, r=rkruppekennytm-1/+1
Prefer `.nth(n)` over `.skip(n).next()`. Found by clippy.
2018-08-23Stabilize 'attr_literals' feature.Sergio Benitez-1/+0
2018-08-23Prefer `.nth(n)` over `.skip(n).next()`.Corey Farwell-1/+1
Found by clippy.
2018-08-23Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakisbors-12/+34
Implement try block expressions I noticed that `try` wasn't a keyword yet in Rust 2018, so... ~~Fix​es https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135 cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-23move PinBox into pin module and export through stdNiv Kaminer-2/+2
2018-08-23move PinMut into pin module and export through stdNiv Kaminer-2/+2
2018-08-23Stabilize a few secondary macro featuresVadim Petrochenkov-1/+0
`tool_attributes`, `proc_macro_path_invoc`, partially `proc_macro_gen`
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-6/+6
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-1/+1
2018-08-22Remove Ty prefix from ↵varkor-10/+10
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-21Auto merge of #53530 - kennytm:rollup, r=kennytmbors-18/+19
Rollup of 17 pull requests Successful merges: - #53030 (Updated RELEASES.md for 1.29.0) - #53104 (expand the documentation on the `Unpin` trait) - #53213 (Stabilize IP associated constants) - #53296 (When closure with no arguments was expected, suggest wrapping) - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.) - #53363 (add individual docs to `core::num::NonZero*`) - #53370 (Stabilize macro_vis_matcher) - #53393 (Mark libserialize functions as inline) - #53405 (restore the page title after escaping out of a search) - #53452 (Change target triple used to check for lldb in build-manifest) - #53462 (Document Box::into_raw returns non-null ptr) - #53465 (Remove LinkMeta struct) - #53492 (update lld submodule to include RISCV patch) - #53496 (Fix typos found by codespell.) - #53521 (syntax: Optimize some literal parsing) - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/) - #53551 (Avoid some Place clones.) Failed merges: r? @ghost
2018-08-21Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJungkennytm-6/+6
Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-10/+10
Fix typos found by codespell.
2018-08-21Further fixes.Kyle Simpson-1/+1
2018-08-21Fixes for code review.Kyle Simpson-3/+8
2018-08-20Removed `raw_identifiers` feature gate.Alexander Regueiro-13/+0
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-6/+6
2018-08-19Rename `catch_expr` feature to `try_blocks`Scott McMurray-2/+2
2018-08-19Parse try blocks with the try keyword instead of do catch placeholderScott McMurray-10/+14
2018-08-19Add `try` to syntax_pos as an edition-2018-only keywordScott McMurray-0/+18
2018-08-19Stabilize macro_vis_matcherJakub Kozlowski-2/+3
2018-08-19Fix typos found by codespell.Matthias Krüger-10/+10
2018-08-19Implement simple codegen for unsized rvalues.Masaki Hara-0/+98
2018-08-18Auto merge of #53324 - alexreg:self_in_typedefs, r=eddybbors-0/+40
`Self` in type definitions (self_in_typedefs) This implements the [`self_in_typedefs` feature](https://github.com/rust-lang/rfcs/blob/master/text/2300-self-in-typedefs.md) ([tracking issue 49303](https://github.com/rust-lang/rust/issues/49303)). r? @eddyb CC @Centril
2018-08-18Added tests.Alexander Regueiro-0/+40
2018-08-17Auto merge of #50911 - petrochenkov:macuse, r=alexcrichtonbors-56/+51
Stabilize `use_extern_macros` Closes https://github.com/rust-lang/rust/issues/35896
2018-08-17Rollup merge of #53413 - eddyb:featured-in-the-latest-edition, r=varkorCorey Farwell-1/+1
Warn that `#![feature(rust_2018_preview)]` is implied when the edition is set to Rust 2018. cc @varkor @petrochenkov @joshtriplett