about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-10-06Regenerate tables for Unicode 14.0.0Josh Stone-553/+653
2021-10-06Let unicode-table-generator fail gracefully for bitsetsJosh Stone-4/+6
The "Alphabetic" property in Unicode 14 grew too big for the bitset representation, panicking "cannot pack 264 into 8 bits". However, we were already choosing the skiplist for that anyway, so this doesn't need to be a hard failure. That panic is now a returned `Err`, and then in `emit_codepoints` we automatically defer to skiplist.
2021-10-06Redo #81358 in unicode-table-generatorJosh Stone-7/+15
2021-10-06Auto merge of #89608 - Manishearth:rollup-m7kd76f, r=Manishearthbors-249/+984
Rollup of 12 pull requests Successful merges: - #87601 (Add functions to add unsigned and signed integers) - #88523 (Expand documentation for `FpCategory`.) - #89050 (refactor: VecDeques Drain fields to private) - #89245 (refactor: make VecDeque's IterMut fields module-private, not just crate-private) - #89324 (Rename `std::thread::available_conccurrency` to `std::thread::available_parallelism`) - #89329 (print-type-sizes: skip field printing for primitives) - #89501 (Note specific regions involved in 'borrowed data escapes' error) - #89506 (librustdoc: Use correct heading levels.) - #89528 (Fix suggestion to borrow when casting from pointer to reference) - #89531 (library std, libc dependency update) - #89588 (Add a test for generic_const_exprs) - #89591 (fix: alloc-optimisation is only for rust llvm) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-06Enable AutoFDO.Michael Benfield-9/+120
This largely involves implementing the options debug-info-for-profiling and profile-sample-use and forwarding them on to LLVM. AutoFDO can be used on x86-64 Linux like this: rustc -O -Cdebug-info-for-profiling main.rs -o main perf record -b ./main create_llvm_prof --binary=main --out=code.prof rustc -O -Cprofile-sample-use=code.prof main.rs -o main2 Now `main2` will have feedback directed optimization applied to it. The create_llvm_prof tool can be obtained from this github repository: https://github.com/google/autofdo Fixes #64892.
2021-10-06Rollup merge of #89591 - infinity0:master, r=AmanieuManish Goregaokar-0/+1
fix: alloc-optimisation is only for rust llvm As discussed at the bottom of #83485. On a separate note I'll take this chance ask, is it worth pulling in that patch (to recognise `__rust_dealloc`) into Debian's system LLVM? The main factors for us to consider would be (1) is the optimisation significant and (2) is there not any significant negative impact to non-rust packages that use LLVM.
2021-10-06Rollup merge of #89588 - BoxyUwU:add_a_test_uwu, r=lcnrManish Goregaokar-0/+29
Add a test for generic_const_exprs Test that const_eval_resolve evaluates consts with unused inference vars in substs r? ``@lcnr``
2021-10-06Rollup merge of #89531 - devnexen:stack_overflow_bsd_libc_upd, r=dtolnayManish Goregaokar-3/+3
library std, libc dependency update to solve #87528 build.
2021-10-06Rollup merge of #89528 - FabianWolff:issue-89497, r=jackh726Manish Goregaokar-14/+80
Fix suggestion to borrow when casting from pointer to reference Fixes #89497.
2021-10-06Rollup merge of #89506 - yaymukund:docblock-headings, r=GuillaumeGomezManish Goregaokar-122/+264
librustdoc: Use correct heading levels. Closes #89309 This fixes the `<h#>` header tags throughout the docs to reflect a semantic hierarchy. - I ran a script to manually check that we don't have any files with multiple `<h1>` tags. - Also checked that we never incorrectly nest e.g. a `<h2>` under an `<h3>`. - I also spot-checked a bunch of pages (`trait.Read`, `enum.Ordering`, `primitive.isize`, `trait.Iterator`).
2021-10-06Rollup merge of #89501 - Aaron1011:escaping-name-regions, r=davidtwcoManish Goregaokar-39/+209
Note specific regions involved in 'borrowed data escapes' error Fixes #67007 Currently, a 'borrowed data escapes' error does not mention the specific lifetime involved (except indirectly through a suggestion about adding a lifetime bound). We now explain the specific lifetime relationship that failed to hold, which improves otherwise vague error messages.
2021-10-06Rollup merge of #89329 - tmiasko:print-type-sizes-no-fields, r=jackh726Manish Goregaokar-3/+7
print-type-sizes: skip field printing for primitives Fixes #86528.
2021-10-06Rollup merge of #89324 - yoshuawuyts:hardware-parallelism, r=m-ou-seManish Goregaokar-16/+18
Rename `std::thread::available_conccurrency` to `std::thread::available_parallelism` _Tracking issue: https://github.com/rust-lang/rust/issues/74479_ This PR renames `std::thread::available_conccurrency` to `std::thread::available_parallelism`. ## Rationale The API was initially named `std::thread::hardware_concurrency`, mirroring the [C++ API of the same name](https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency). We eventually decided to omit any reference to the word "hardware" after [this comment](https://github.com/rust-lang/rust/pull/74480#issuecomment-662045841). And so we ended up with `available_concurrency` instead. --- For a talk I was preparing this week I was reading through ["Understanding and expressing scalable concurrency" (A. Turon, 2013)](http://aturon.github.io/academic/turon-thesis.pdf), and the following passage stood out to me (emphasis mine): > __Concurrency is a system-structuring mechanism.__ An interactive system that deals with disparate asynchronous events is naturally structured by division into concurrent threads with disparate responsibilities. Doing so creates a better fit between problem and solution, and can also decrease the average latency of the system by preventing long-running computations from obstructing quicker ones. > __Parallelism is a resource.__ A given machine provides a certain capacity for parallelism, i.e., a bound on the number of computations it can perform simultaneously. The goal is to maximize throughput by intelligently using this resource. For interactive systems, parallelism can decrease latency as well. _Chapter 2.1: Concurrency is not Parallelism. Page 30._ --- _"Concurrency is a system-structuring mechanism. Parallelism is a resource."_ — It feels like this accurately captures the way we should be thinking about these APIs. What this API returns is not "the amount of concurrency available to the program" which is a property of the program, and thus even with just a single thread is effectively unbounded. But instead it returns "the amount of _parallelism_ available to the program", which is a resource hard-constrained by the machine's capacity (and can be further restricted by e.g. operating systems). That's why I'd like to propose we rename this API from `available_concurrency` to `available_parallelism`. This still meets the criteria we previously established of not attempting to define what exactly we mean by "hardware", "threads", and other such words. Instead we only talk about "concurrency" as an abstract resource available to our program. r? `@joshtriplett`
2021-10-06Rollup merge of #89245 - DeveloperC286:iter_mut_fields_to_private, ↵Manish Goregaokar-16/+21
r=joshtriplett refactor: make VecDeque's IterMut fields module-private, not just crate-private Made the fields of VecDeque's IterMut private by creating a IterMut::new(...) function to create a new instance of IterMut and migrating usage to use IterMut::new(...).
2021-10-06Rollup merge of #89050 - DeveloperC286:drain_fields_to_private, r=joshtriplettManish Goregaokar-17/+26
refactor: VecDeques Drain fields to private Made the fields of VecDeque's Drain private by creating a Drain::new(...) function to create a new instance of Drain and migrating usage to use Drain::new(...).
2021-10-06Rollup merge of #88523 - kpreid:category, r=yaahcManish Goregaokar-4/+22
Expand documentation for `FpCategory`. I intend these changes to be helpful to readers who are not yet familiar with the quirks of floating-point numbers. Additionally, I felt it was misleading to describe `Nan` as being the result of division by zero, since most divisions by zero (except for 0/0) produce `Infinite` floats, so I moved that remark to the `Infinite` variant with adjustment. The first sentence of the `Nan` documentation is copied from `f32`; I followed the example of the `f64` documentation by referring to `f32` for general concepts, rather than duplicating the text. ---- I considered making similar changes to the documentation of the `is_*` methods of floats, but decided that that was a much larger and trickier problem; here, each of the variants' descriptions can be expected to be read in context of being mutually exclusive with the others.
2021-10-06Rollup merge of #87601 - a1phyr:feature_uint_add_signed, r=kennytmManish Goregaokar-15/+304
Add functions to add unsigned and signed integers This PR adds methods to unsigned integers to add signed integers with good overflow semantics under `#![feature(mixed_integer_ops)]`. The added API is: ```rust // `uX` is `u8`, `u16`, `u32`, `u64`,`u128`, `usize` impl uX { pub const fn checked_add_signed(self, iX) -> Option<Self>; pub const fn overflowing_add_signed(self, iX) -> (Self, bool); pub const fn saturating_add_signed(self, iX) -> Self; pub const fn wrapping_add_signed(self, iX) -> Self; } impl iX { pub const fn checked_add_unsigned(self, uX) -> Option<Self>; pub const fn overflowing_add_unsigned(self, uX) -> (Self, bool); pub const fn saturating_add_unsigned(self, uX) -> Self; pub const fn wrapping_add_unsigned(self, uX) -> Self; pub const fn checked_sub_unsigned(self, uX) -> Option<Self>; pub const fn overflowing_sub_unsigned(self, uX) -> (Self, bool); pub const fn saturating_sub_unsigned(self, uX) -> Self; pub const fn wrapping_sub_unsigned(self, uX) -> Self; } ``` Maybe it would be interesting to also have `add_signed` that panics in debug and wraps in release ?
2021-10-06Simplify AttributesExt::cfg function and remove error emissions since they ↵Guillaume Gomez-27/+45
are not useful
2021-10-06Auto merge of #7772 - Manishearth:doc-markdown-intra, r=camsteffenbors-1/+18
Handle intra-doc links in doc_markdown Fixes #7758 changelog: Handle intra-doc links in [`doc_markdown`]
2021-10-06Bless testsCameron Steffen-0/+11
2021-10-06opt-level >= 4Alexander-4/+4
2021-10-06Clean up code a bit:Guillaume Gomez-17/+25
* Remove "bool_to_options" feature * Update version for compiler feature * rustfmt
2021-10-06Use get_diagnostic_nameCameron Steffen-113/+73
2021-10-06Do not ICE if some foreign expansions were not encoded.Camille GILLOT-2/+0
The metadata encoder does not necessarily encode all expansions, only those which are referenced in other metadata fields.
2021-10-06Do not re-hash foreign spans.Camille GILLOT-11/+27
2021-10-06run remaining testsAlexander-9/+17
2021-10-06Auto merge of #89599 - rusticstuff:ci-fix, r=Mark-Simulacrumbors-24/+12
Switch to our own mirror of libisl plus `ct-ng oldconfig` fixes Switching to mirror the ISL libs (#89594) unearthed a (possibly long-standing?) issue with `ct-ng oldconfig`. It always overwrites the mirror config values. This PR adds the ISL mirror, gets rid of `ct-ng oldconfig` and adds crosstools-ng config files which can be used directly. (Edited) Fixes #89593. r? `@pietroalbini`
2021-10-06Access Session while decoding expn_id.Camille GILLOT-6/+24
2021-10-06tidyAlexander-1/+1
2021-10-06Fix stabilization version for `bindings_after_at`Noah Lev-1/+1
According to the release notes and its PR milestone, it was stabilized in 1.56.0.
2021-10-06Get rid of broken `ct-ng oldconfig` everywhere and directly provide a ↵Hans Kratz-20/+8
suitable .config file.
2021-10-06add MIR artifactsAlexander-3/+626
2021-10-06fix importAlexander-1/+1
2021-10-06Handle intra-doc links in doc_markdownManish Goregaokar-8/+14
2021-10-06reset and cleanupAlexander-0/+339
2021-10-06Add regression test for #7758Manish Goregaokar-1/+12
2021-10-06Update libc to 0.2.103.Jonah Petri-3/+3
2021-10-06add platform support details file for armv7-unknown-linux-uclibcJonah Petri-3/+69
2021-10-06Add new target armv7-unknown-linux-uclibceabihfYannick Koehler-6/+37
Co-authored-by: Jonah Petri <jonah@petri.us>
2021-10-06Introduce get_diagnostic_nameCameron Steffen-34/+59
2021-10-06Auto merge of #7776 - tsoutsman:patch-1, r=flip1995bors-5/+5
Fix typos I'm not sure whether I should add links to `bool`, `char`, and `str`. `slice` could also be linked to. changelog: none
2021-10-06Switch to our own mirror of libislMark Rousskov-4/+4
2021-10-06Fix typosKlim Tsoutsman-5/+5
I'm not sure whether I should add links to `bool`, `char`, and `str`. `slice` could also be linked to.
2021-10-06Revert the rustc_error_codes changes.Mukund Lakshman-51/+51
2021-10-06Restore h1 styles, which got accidentally removed.Mukund Lakshman-3/+3
2021-10-06fix: alloc-optimisation is only for rust llvmXimin Luo-0/+1
2021-10-06Auto merge of #7774 - dswij:useless-exponent, r=llogiqbors-3/+17
Useless exponent Closes #7745 I'm open to some thoughts on dropping the exponents on suggestions when it's zero. I personally don't see any problem on this. changelog: [`useless_exponent`] suggestion drops exponent when exponent value is zero
2021-10-06Auto merge of #7773 - Manishearth:update-lints-mods, r=flip1995bors-240/+248
Move module declarations back into lib.rs With #7673 we moved a lot of things from lib.rs to lib.foo.rs. Unfortunately, rustfmt doesn't seem to work when module declarations are included via `include!` (and trying the `mod foo; use foo::*;` trick doesn't seem to work much either in our specific case). With this PR we continue generating everything in subfiles except for module declarations, which are now generated within lib.rs. changelog: none
2021-10-06Add tests for zero exponents in `excessive_precision`dswij-1/+13
2021-10-06Regen update_lintsManish Goregaokar-235/+237