about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-11-12Test core::simd worksJubilee Young-0/+99
These tests just verify some basic APIs of core::simd function, and guarantees that attempting to access the wrong things doesn't work. The majority of tests are stochastic, and so remain upstream, but a few deterministic tests arrive in the subtree as doc tests.
2021-11-12Expose portable-simd as core::simdJubilee Young-0/+30
This enables programmers to use a safe alternative to the current `extern "platform-intrinsics"` API for writing portable SIMD code. This is `#![feature(portable_simd)]` as tracked in #86656
2021-11-12Add 'library/portable-simd/' from commit ↵Jubilee Young-0/+7502
'1ce1c645cf27c4acdefe6ec8a11d1f0491954a99' git-subtree-dir: library/portable-simd git-subtree-mainline: efd0483949496b067cd5f7569d1b28cd3d5d3c72 git-subtree-split: 1ce1c645cf27c4acdefe6ec8a11d1f0491954a99
2021-11-12Rewrite Arm transmutes, reading std::arch closerJubilee Young-38/+59
2021-11-11Restrict Arm types to Arm v7+Jubilee Young-3/+6
This mostly mirrors the restrictions in std::arch. It can be loosened slightly with later refactoring.
2021-11-10Dynamically detect AVX512 in CIJubilee Young-6/+12
We would like to check for errors with AVX512, but we don't pick our CPU. So, detect available features. This variance in checks stochastically reveals issues. Nondeterminism is acceptable as our goal is protecting downstream.
2021-11-10Deny warnings in CI and fixJubilee Young-4/+8
2021-11-10Use the right name for AVX512FJubilee Young-1/+1
2021-11-09Merge pull request #175 from rust-lang/feature/more-actionsJubilee-86/+39
Delete travis config, move tests to github actions.
2021-11-10Delete travis config, move tests to github actions.Caleb Zulawski-86/+39
2021-11-08Merge pull request #181 from rust-lang/rotate_lanesCaleb Zulawski-37/+37
rotate_{left,right} -> rotate_lanes_{left,right}
2021-11-08add `Simd::from_slice` (#177)Proloy Mishra-0/+18
* add `Simd::from_slice` uses a zeroed initial array and loops so that it can be const. unfortunately, parameterizing the assert with slice length needs `#![feature(const_fn_fn_ptr_basics)]` to work.
2021-11-06rotate_{left,right} -> rotate_lanes_{left,right}Caleb Zulawski-37/+37
2021-10-22Hide select impl in sealed traitCaleb Zulawski-16/+14
2021-10-22Hide mask impl details in sealed trait.Caleb Zulawski-13/+25
2021-10-21Fixup import pathing for coreJubilee Young-15/+19
This changes simd_swizzle! to a decl_macro to give it a path, so it can be imported using a path and not the crate root. It also adds various uses that were missed and adjusts paths.
2021-10-20Auto merge of #89978 - cjgillot:qarray, r=Mark-Simulacrumbors-538/+420
Merge the two depkind vtables Knowledge of `DepKind`s is managed using two arrays containing flags (is_anon, eval_always, fingerprint_style), and function pointers (forcing and loading code). This PR aims at merging the two arrays so as to reduce unneeded indirect calls and (hopefully) increase code locality. r? `@ghost`
2021-10-20Address review.Camille GILLOT-8/+1
2021-10-20Inline DepNodeParams methods.Camille GILLOT-1/+18
2021-10-20Compute query vtable manually.Camille GILLOT-27/+29
2021-10-20Store node_intern_event_id in CurrentDepGraph.Camille GILLOT-22/+24
2021-10-20Build jump table at runtime.Camille GILLOT-130/+111
2021-10-20Invoke callbacks from rustc_middle.Camille GILLOT-47/+42
2021-10-20Merge two query callbacks arrays.Camille GILLOT-247/+180
2021-10-20Drop has_params.Camille GILLOT-40/+4
2021-10-20Make hash_result an Option.Camille GILLOT-41/+39
2021-10-20Move def_path_hash_to_def_id to rustc_middle.Camille GILLOT-28/+23
2021-10-20Avoid trivial lambdas.Camille GILLOT-4/+6
2021-10-20Auto merge of #90050 - michaelwoerister:fix-vtable-debug-name-crash-90019, ↵bors-7/+14
r=wesleywiser Erase late-bound regions before computing vtable debuginfo name. Fixes #90019. The `msvc_enum_fallback()` for computing enum type names needs to access the memory layout of niche enums in order to determine the type name. `compute_debuginfo_vtable_name()` did not properly erase regions before computing type names which made memory layout computation ICE when encountering un-erased regions. r? `@wesleywiser`
2021-10-20Auto merge of #89100 - petrochenkov:localbind, r=cjgillotbors-213/+145
resolve: Use `NameBinding` for local variables and generic parameters `NameBinding` is a structure used for representing any name introduction (an item, or import, or even a built-in). Except that local variables and generic parameters weren't represented as `NameBinding`s, for this reason they requires separate paths in name resolution code in several places. This PR introduces `NameBinding`s for local variables as well and simplifies all the code working with them leaving only the `NameBinding` paths.
2021-10-19Auto merge of #90067 - JohnTitor:rollup-afrjulz, r=JohnTitorbors-367/+637
Rollup of 10 pull requests Successful merges: - #86479 (Automatic exponential formatting in Debug) - #87404 (Add support for artifact size profiling) - #87769 (Alloc features cleanup) - #88789 (remove unnecessary bound on Zip specialization impl) - #88860 (Deduplicate panic_fmt) - #90009 (Make more `From` impls `const` (libcore)) - #90018 (Fix rustdoc UI for very long type names) - #90025 (Revert #86011 to fix an incorrect bound check) - #90036 (Remove border-bottom from most docblocks.) - #90060 (Update RELEASES.md) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-20Rollup merge of #90060 - vincentdephily:patch-1, r=Mark-SimulacrumYuki Okushi-1/+1
Update RELEASES.md Fix typo.
2021-10-20Rollup merge of #90036 - jsha:less-rule, r=GuillaumeGomezYuki Okushi-5/+8
Remove border-bottom from most docblocks. Headings in the top-doc docblock still get a border-bottom due to a rule that covers all h2, h3, and h4. Method docblocks are generally h5, and so don't get a border-bottom anymore. This fixes a problem where a sub-sub-heading within a method would have a line that went all the way across the page, creating a division that made that sub-sub-heading look much more important than it really is. Fixes #90033 Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html r? ``@GuillaumeGomez``
2021-10-20Rollup merge of #90025 - JohnTitor:revert-86011, r=estebankYuki Okushi-72/+79
Revert #86011 to fix an incorrect bound check This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6. Fixes #89935 r? ``@estebank``
2021-10-20Rollup merge of #90018 - GuillaumeGomez:too-long-item-names, r=jshaYuki Okushi-154/+232
Fix rustdoc UI for very long type names Fixes #89972. While working on it, I also discovered that when the item name is too long, it also breaks the flow of the page. To make things right, I also renamed the `type-decl` CSS class into `item-decl` (because this PR also generates it for more than type declarations). So here are the before/after screenshots: ![Screenshot from 2021-10-18 16-58-03](https://user-images.githubusercontent.com/3050060/137757247-637fcf04-4406-49c6-8a8a-18c2074aacd9.png) ![Screenshot from 2021-10-18 16-58-26](https://user-images.githubusercontent.com/3050060/137757252-17935e63-53b3-449f-a535-7be91ff0e257.png) ![Screenshot from 2021-10-18 16-58-07](https://user-images.githubusercontent.com/3050060/137757278-8b12e348-2980-4fc4-8853-bef99d58981f.png) ![Screenshot from 2021-10-18 16-58-28](https://user-images.githubusercontent.com/3050060/137757282-534a0e1b-3016-49ba-b3ac-e45bdb9035cb.png) r? ``@jsha``
2021-10-20Rollup merge of #90009 - woppopo:const_from_more, r=dtolnayYuki Okushi-27/+103
Make more `From` impls `const` (libcore) Adding `const` to `From` implementations in the core. `rustc_const_unstable` attribute is not added to unstable implementations. Tracking issue: #88674 <details> <summary>Done</summary><div> - `T` from `T` - `T` from `!` - `Option<T>` from `T` - `Option<&T>` from `&Option<T>` - `Option<&mut T>` from `&mut Option<T>` - `Cell<T>` from `T` - `RefCell<T>` from `T` - `UnsafeCell<T>` from `T` - `OnceCell<T>` from `T` - `Poll<T>` from `T` - `u32` from `char` - `u64` from `char` - `u128` from `char` - `char` from `u8` - `AtomicBool` from `bool` - `AtomicPtr<T>` from `*mut T` - `AtomicI(bits)` from `i(bits)` - `AtomicU(bits)` from `u(bits)` - `i(bits)` from `NonZeroI(bits)` - `u(bits)` from `NonZeroU(bits)` - `NonNull<T>` from `Unique<T>` - `NonNull<T>` from `&T` - `NonNull<T>` from `&mut T` - `Unique<T>` from `&mut T` - `Infallible` from `!` - `TryIntError` from `!` - `TryIntError` from `Infallible` - `TryFromSliceError` from `Infallible` - `FromResidual for Option<T>` </div></details> <details> <summary>Remaining</summary><dev> - `NonZero` from `NonZero` These can't be made const at this time because these use Into::into. https://github.com/rust-lang/rust/blob/master/library/core/src/convert/num.rs#L393 - `std`, `alloc` There may still be many implementations that can be made `const`. </div></details>
2021-10-20Rollup merge of #88860 - nbdd0121:panic, r=m-ou-seYuki Okushi-38/+15
Deduplicate panic_fmt std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.
2021-10-20Rollup merge of #88789 - the8472:rm-zip-bound, r=JohnTitorYuki Okushi-6/+2
remove unnecessary bound on Zip specialization impl I originally added this bound in an attempt to make the specialization sound for owning iterators but it was never correct here and the correct and [already implemented](https://github.com/rust-lang/rust/blob/497ee321af3b8496eaccd7af7b437f18bab81abf/library/alloc/src/vec/into_iter.rs#L220-L232) solution is is to place it on the IntoIter implementation.
2021-10-20Rollup merge of #87769 - m-ou-se:alloc-features-cleanup, r=yaahc,dtolnayYuki Okushi-43/+46
Alloc features cleanup This sorts and categorizes the `#![features]` in `alloc` and removes unused ones. This is part of #87766 The following feature attributes were unnecessary and are removed: ```diff // Library features: -#![feature(cow_is_borrowed)] -#![feature(maybe_uninit_uninit_array)] -#![feature(slice_partition_dedup)] // Language features: -#![feature(arbitrary_self_types)] -#![feature(auto_traits)] -#![feature(box_patterns)] -#![feature(decl_macro)] -#![feature(nll)] ```
2021-10-20Rollup merge of #87404 - rylev:artifact-size-profiling, r=wesleywiserYuki Okushi-15/+76
Add support for artifact size profiling This adds support for profiling artifact file sizes (incremental compilation artifacts and query cache to begin with). Eventually we want to track this in perf.rlo so we can ensure that file sizes do not change dramatically on each pull request. This relies on support in measureme: https://github.com/rust-lang/measureme/pull/169. Once that lands we can update this PR to not point to a git dependency. This was worked on together with `@michaelwoerister.` r? `@wesleywiser`
2021-10-20Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahcYuki Okushi-6/+75
Automatic exponential formatting in Debug Context: See [this comment from the libs team](https://github.com/rust-lang/rfcs/pull/2729#issuecomment-853454204) --- Makes `"{:?}"` switch to exponential for floats based on magnitude. The libs team suggested exploring this idea in the discussion thread for RFC rust-lang/rfcs#2729. (**note:** this is **not** an implementation of the RFC; it is an implementation of one of the alternatives) Thresholds chosen were 1e-4 and 1e16. Justification described [here](https://github.com/rust-lang/rfcs/pull/2729#issuecomment-864482954). **This will require a crater run.** --- As mentioned in the commit message of 8731d4dfb47, this behavior will not apply when a precision is supplied, because I wanted to preserve the following existing and useful behavior of `{:.PREC?}` (which recursively applies `{:.PREC}` to floats in a struct): ```rust assert_eq!( format!("{:.2?}", [100.0, 0.000004]), "[100.00, 0.00]", ) ``` I looked around and am not sure where there are any tests that actually use this in the test suite, though? All things considered, I'm surprised that this change did not seem to break even a single existing test in `x.py test --stage 2`. (even when I tried a smaller threshold of 1e6)
2021-10-19Update src/test/codegen/debug-vtable.rsWesley Wiser-1/+1
Co-authored-by: r00ster <r00ster91@protonmail.com>
2021-10-19Update RELEASES.mdVincent de Phily-1/+1
Fix typo.
2021-10-19Auto merge of #89933 - est31:let_else, r=michaelwoeristerbors-150/+76
Adopt let_else across the compiler This performs a substitution of code following the pattern: ``` let <id> = if let <pat> = ... { identity } else { ... : ! }; ``` To simplify it to: ``` let <pat> = ... { identity } else { ... : ! }; ``` By adopting the `let_else` feature (cc #87335). The PR also updates the syn crate because the currently used version of the crate doesn't support `let_else` syntax yet. Note: Generally I'm the person who *removes* usages of unstable features from the compiler, not adds more usages of them, but in this instance I think it hopefully helps the feature get stabilized sooner and in a better state. I have written a [comment](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205) on the tracking issue about my experience and what I feel could be improved before stabilization of `let_else`.
2021-10-19Remove begin_panic_fmt from clippyGary Guo-3/+0
2021-10-19Deduplicate panic_fmtGary Guo-35/+15
std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.
2021-10-19Reenable feature(nll) in alloc.Mara Bos-0/+1
2021-10-19Remove unused language #![feature]s from alloc.Mara Bos-5/+0
2021-10-19Remove unused library #![feature]s from alloc.Mara Bos-3/+0
2021-10-19Sort and categorize #![feature]s in alloc.Mara Bos-42/+52