about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2020-09-24Auto merge of #77083 - KodrAus:revert/const-type-id, r=RalfJungbors-4/+7
revert const_type_id stabilization This reverts #72488, which is currently on beta and scheduled to stabilize in `1.47.0`, based on https://github.com/rust-lang/rust/pull/75923#issuecomment-696676511 It turns out we might not be quite ready to stabilize `TypeId` in const contexts before having a chance to rework its internals. Since `TypeId` is a bit of an oddity we want to be careful about how those internals are currently being relied on while making changes. That will be easier to do without having to also consider compile-time contexts. r? `@eddyb`
2020-09-23Auto merge of #77102 - Dylan-DPC:rollup-2jfrg3u, r=Dylan-DPCbors-54/+203
Rollup of 9 pull requests Successful merges: - #76898 (Record `tcx.def_span` instead of `item.span` in crate metadata) - #76939 (emit errors during AbstractConst building) - #76965 (Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut.) - #76993 (Changing the alloc() to accept &self instead of &mut self) - #76994 (fix small typo in docs and comments) - #77017 (Add missing examples on Vec iter types) - #77042 (Improve documentation for ToSocketAddrs) - #77047 (Miri: more informative deallocation error messages) - #77055 (Add #[track_caller] to more panicking Cell functions) Failed merges: r? `@ghost`
2020-09-23Auto merge of #76673 - simonvandel:remove-unneeded-drops, r=oli-obkbors-8/+149
MIR pass to remove unneeded drops on types not needing drop This is heavily dependent on MIR inlining running to actually see the drop statement. Do we want to special case replacing a call to std::mem::drop with a goto aswell?
2020-09-23Ignore test on wasm as it does not unwindSimon Vandel Sillesen-46/+47
2020-09-23Rollup merge of #76993 - blitzerr:alloc-ref, r=AmanieuDylan DPC-2/+3
Changing the alloc() to accept &self instead of &mut self Fixes: [#55](https://github.com/rust-lang/wg-allocators/issues/55) This is the first cut. It only makes the change for `alloc` method.
2020-09-23Rollup merge of #76965 - fusion-engineering-forks:fix-atomic-from-mut, r=AmanieuDylan DPC-1/+149
Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut. Fixes some platform-specific problems with #74532 by using the actual alignment of the types instead of hardcoding a few `target_arch`s. r? @RalfJung
2020-09-23Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obkDylan DPC-10/+32
emit errors during AbstractConst building There changes are currently still untested, so I don't expect this to pass CI :laughing: It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this. r? @oli-obk
2020-09-23Rollup merge of #76898 - Aaron1011:fix/item-def-span, r=oli-obkDylan DPC-41/+19
Record `tcx.def_span` instead of `item.span` in crate metadata This was missed in PR #75465. As a result, a few places have been using the full body span of functions, instead of just the header span.
2020-09-23Auto merge of #76659 - simonvandel:76432, r=oli-obkbors-0/+132
SimplifyComparisonIntegral: fix miscompilation Fixes #76432 Only insert StorageDeads if we actually removed one. Fixes an issue where we added StorageDead to a place with no StorageLive r? `@oli-obk`
2020-09-22a few more &mut self -> self changesblitzerr-1/+1
2020-09-22fixing the test failureblitzerr-1/+2
2020-09-23revert const_type_id stabilizationAshley Mannix-4/+7
This reverts commit e3856616ee2a894c7811a7017d98fafa7ba84dd8.
2020-09-22rebless after rebaseSimon Vandel Sillesen-8/+0
2020-09-22cleanup cfg after optimizationSimon Vandel Sillesen-8/+6
2020-09-22MIR pass to remove unneeded drops on types not needing dropSimon Vandel Sillesen-0/+150
This is heavily dependent on MIR inlining running to actually see the drop statement
2020-09-22Bless compile-failDylan MacKenzie-3/+1
2020-09-22Bless testsDylan MacKenzie-159/+200
2020-09-22fixing the custom.rsblitzerr-1/+1
2020-09-21Rollup merge of #77032 - lcnr:visit-all-the-item-likes, r=davidtwcoecstatic-morse-2/+37
lint missing docs for extern items fixes #76991
2020-09-21Rollup merge of #76914 - lcnr:path-no-more, r=ecstatic-morseecstatic-morse-0/+53
extend `Ty` and `TyCtxt` lints to self types blocked on #76891 r? @ecstatic-morse cc @Aaron1011
2020-09-21Rollup merge of #76807 - ecstatic-morse:const-checking-staged-api, r=oli-obkecstatic-morse-6/+63
Use const-checking to forbid use of unstable features in const-stable functions First step towards #76618. Currently this code isn't ever hit because `qualify_min_const_fn` runs first and catches pretty much everything. One exception is `const_precise_live_drops`, which does not use the newly added code since it runs as part of a separate pass. Also contains some unrelated refactoring, which is split into separate commits. r? @oli-obk
2020-09-21Rollup merge of #76581 - lcnr:bound-too-generic, r=eddybecstatic-morse-0/+124
do not ICE on bound variables, return `TooGeneric` instead fixes #73260, fixes #74634, fixes #76595 r? @nikomatsakis
2020-09-21Rollup merge of #76489 - GuillaumeGomez:add-explanation-e0756, r=jyn514ecstatic-morse-0/+1
Add explanation for E0756 r? @pickfire
2020-09-21Changing the alloc() to accept &self instead of &mut selfblitzerr-1/+1
2020-09-22lint missing docs for extern itemsBastian Kauschke-2/+37
2020-09-21reviewBastian Kauschke-18/+9
2020-09-21Run the test with explicit -O such that Add is generated instead of CheckedAddSimon Vandel Sillesen-197/+198
This makes the test run deterministic regardless of noopt testruns
2020-09-21Add optimization to avoid load of addressSimon Vandel Sillesen-10/+390
2020-09-21add test for closures in abstract constsBastian Kauschke-0/+21
2020-09-21bless testsBastian Kauschke-10/+20
2020-09-21Test that AtomicU64::from_mut is not available on x86 linux.Mara Bos-0/+16
2020-09-21Record `tcx.def_span` instead of `item.span` in crate metadataAaron Hill-41/+19
This was missed in PR #75465. As a result, a few places have been using the full body span of functions, instead of just the header span.
2020-09-21Add explanation for E0756Guillaume Gomez-0/+1
2020-09-21Add feature gate ui test for cfg(target_has_atomic_equal_alignment).Mara Bos-1/+67
2020-09-21Add feature gate ui test for cfg(target_has_atomic_load_store).Mara Bos-1/+67
2020-09-21add testBastian Kauschke-0/+53
2020-09-21Auto merge of #77013 - RalfJung:rollup-84ut0xq, r=RalfJungbors-0/+31
Rollup of 10 pull requests Successful merges: - #76439 (Add error explanation for E0755) - #76521 (Fix segfault if pthread_getattr_np fails) - #76835 (make replace_prefix only take &str as arguments ) - #76967 (Revert adding Atomic::from_mut.) - #76977 (Add a regression test for copy propagation miscompilation) - #76981 (liballoc bench use imported path Bencher) - #76983 (BTreeMap: extra testing & fixed comments) - #76996 (Fix typo in rustc_lexer docs) - #77009 (Dogfood total_cmp in the test crate) - #77012 (update Miri for another bugfix) Failed merges: - #76489 (Add explanation for E0756) r? `@ghost`
2020-09-21Rollup merge of #76977 - tmiasko:issue-76740, r=wesleywiserRalf Jung-0/+30
Add a regression test for copy propagation miscompilation
2020-09-21Rollup merge of #76439 - GuillaumeGomez:add-error-explanation-e0755, ↵Ralf Jung-0/+1
r=pickfire,jyn514 Add error explanation for E0755 r? @pickfire
2020-09-21Auto merge of #74040 - lcnr:const-occurs-check, r=nikomatsakisbors-0/+205
fix unification of const variables r? `@nikomatsakis` `@varkor` `@eddyb` let's just ping everyone here :sweat_smile:
2020-09-21add testsBastian Kauschke-0/+205
2020-09-21Auto merge of #77004 - RalfJung:rollup-usac4nv, r=RalfJungbors-14/+16
Rollup of 13 pull requests Successful merges: - #76135 (Stabilize some Option methods as const) - #76628 (Add sample defaults for config.toml ) - #76846 (Avoiding unnecesary allocations at rustc_errors) - #76867 (Use intra-doc links in core/src/iter when possible) - #76868 (Finish moving to intra doc links for std::sync) - #76872 (Remove DeclareMethods) - #76936 (Add non-`unsafe` `.get_mut()` for `Unsafecell`) - #76958 (Replace manual as_nanos and as_secs_f64 reimplementations) - #76959 (Replace write_fmt with write!) - #76961 (Add test for issue #34634) - #76962 (Use const_cstr macro in consts.rs) - #76963 (Remove unused static_assert macro) - #77000 (update Miri) Failed merges: r? `@ghost`
2020-09-21Rollup merge of #76961 - bugadani:test-34634, r=Mark-SimulacrumRalf Jung-0/+16
Add test for issue #34634 Closes #34634
2020-09-21Rollup merge of #76135 - CDirkx:const-option, r=dtolnay,oli-obkRalf Jung-14/+0
Stabilize some Option methods as const Stabilize the following methods of `Option` as const: - `is_some` - `is_none` - `as_ref` These methods are currently const under the unstable feature `const_option` (tracking issue: #67441). I believe these methods to be eligible for stabilization because of the stabilization of #49146 (Allow if and match in constants) and the trivial implementations, see also: [PR#75463](https://github.com/rust-lang/rust/pull/75463). Related: #76225
2020-09-21Auto merge of #76843 - kornelski:longtypetofile, r=ecstatic-morsebors-14/+31
Let user see the full type of type-length limit error Seeing the full type of the error is sometimes essential to diagnosing the problem, but the type itself is too long to be displayed in the terminal in a useful fashion. This change solves this dilemma by writing the full offending type name to a file, and displays this filename as a note. > note: the full type name been written to '$TEST_BUILD_DIR/issues/issue-22638/issue-22638.long-type.txt' Closes #76777
2020-09-21Auto merge of #76295 - mati865:remove-mmx, r=Amanieu,oli-obkbors-33/+4
Remove MMX from Rust Follow-up to https://github.com/rust-lang/stdarch/pull/890 This removes most of MMX from Rust (tests pass with small changes), keeping stable `is_x86_feature_detected!("mmx")` working.
2020-09-21Let user see the full type of type-length limit errorKornel Lesiński-14/+31
2020-09-20Auto merge of #76544 - Mark-Simulacrum:less-python, r=alexcrichtonbors-3/+3
De-couple Python and bootstrap slightly This revises rustbuild's entry points from Python to rely less on magic environment variables, preferring to use Cargo-provided environment variables where feasible. Notably, BUILD_DIR and BOOTSTRAP_CONFIG are *not* moved, because both more-or-less have some non-trivial discovery logic and replicating it in rustbuild seems unfortunate; if it moved to Cargo that would be a different story. Best reviewed by-commit.
2020-09-20Move const tests for `Option` to `library\core`Christiaan Dirkx-12/+0
Part of #76268
2020-09-20Stabilize some Option methods as constCDirkx-2/+0
Stabilize the following methods of `Option` as const: - `is_some` - `is_none` - `as_ref` Possible because of stabilization of #49146 (Allow if and match in constants).