Issue 72408 nested closures exponential
This fixes#72408.
Nested closures were resulting in exponential compilation time.
This PR is enhancing asymptotic complexity, but also increasing the constant, so I would love to see perf run results.
[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt
The logic is currently broken and we need to disable it to fix a beta
regression (see #76803)
r? `@oli-obk`
Rename mir-opt diff tests with 32/64 bit
Now syntax highlighting should work.
I've tested that `--bless` works localy, but I'm not sure it's possible on CI
Fixes#75746
r? `@oli-obk`
BTreeMap: avoid slices even more
Epilogue to #73971: it seems the compiler is unable to realize that creating a slice and `get_unchecked`-ing one element is a simple fetch. So try to spell it out for the only remaining but often invoked case.
Also, the previous code doesn't seem fair game to me, using `get_unchecked` to reach beyond the end of a slice. Although the local function `slice_insert` also does that.
r? `@Mark-Simulacrum`
Mostly to fix ui/issues/issue-37311-type-length-limit/issue-37311.rs.
Most parts of the compiler can handle deeply nested types with a lot
of duplicates just fine, but some parts still attempt to naively
traverse type tree.
Before such problems were caught by type length limit check,
but now these places will have to be changed to handle
duplicated types gracefully.
This fixes#72408.
Nested closures were resulting in exponential compilation time.
As a performance optimization this change introduces MiniSet,
which is a simple small storage optimized set.
Small cleanups in Windows Mutex.
- Move `held` into the boxed part, since the SRW lock implementation does not use this. This makes the Mutex 50% smaller.
- Use `Cell` instead of `UnsafeCell` for `held`, such that `.replace()` can be used.
- Add some comments.
- Avoid creating multiple `&mut`s to the critical section object in `ReentrantMutex`.
move guaranteed{ne,eq} implementation to compile-time machine
Currently, Miri needs a special hack to avoid using the core engine implementation of these intrinsics. That seems silly, so let's move them to the CTFE machine, which is the only machine that wants to use them.
I also added a reference to https://github.com/rust-lang/rust/issues/73722 as a warning to anyone who wants to adjust `guaranteed_eq`.
Improve E0118
- Changes the "base type" terminology to "nominal type" (according to the [reference](https://doc.rust-lang.org/stable/reference/items/implementations.html#inherent-implementations)).
- Suggests removing a reference, if one is present on the type.
- Clarify what is meant by a "nominal type".
closes#69392
This is my first not-entirely-trivial PR, so please let me know if I missed anything or if something could be improved. Though I probably won't be able to fix anything in the upcoming week.
Make graphviz font configurable
Alternative to PR #76776.
To change the graphviz output to use an alternative `fontname` value,
add a command line option like: `rustc --graphviz-font=monospace`.
r? @ecstatic-morse
Strip a single leading tab when rendering dataflow diffs
The `fmt_diff_with` formatter uses a tab to separate additions from subtractions. Strip it when rendering those diffs on separate lines.
r? @Mark-Simulacrum (since you're speedy)
Update books
## nomicon
1 commits in 25854752549d44d76fbd7650e17cb4f167a0b8fb..6e57e64501f61873ab80cb78a07180a22751a5d6
2020-08-19 16:41:48 -0400 to 2020-09-14 11:40:23 -0400
- Fix API change to alloc::Global::grow. (rust-lang-nursery/nomicon#236)
## reference
3 commits in 25391dba46262f882fa846beefaff54a966a8fa5..56a13c082ee90736c08d6abdcd90462517b703d3
2020-09-02 07:22:55 -0700 to 2020-09-14 23:20:16 -0700
- Update the description of staticlib (rust-lang-nursery/reference#884)
- Rust 1.46 now allows more features in const fn (rust-lang-nursery/reference#883)
- Document the enum changes in RFC 2195 (rust-lang-nursery/reference#879)
## book
1 commits in e5ed97128302d5fa45dbac0e64426bc7649a558c..cb28dee95e5e50b793e6ba9291c5d1568d3ad72e
2020-08-31 12:53:40 -0500 to 2020-09-09 10:06:00 -0500
- Fixed the error message of invalid array element access in ch03.2 (rust-lang/book#2446)
[fuchsia] Propagate the userspace UTC clock
On Fuchsia, spawning a subprocess does not automatically
clone all of the parent process' capabilities. UTC time on
Fuchsia is managed by a top-level userspace clock capability
that is cloned and passed to subprocesses.
This change ensures that any Rust subprocess gets access to the
UTC clock, if the parent had access to it. This is critical for
tests, which on Fuchsia, use panic=abort and spawn subprocesses
per test.
Change error message for ty param in const
This PR introduces the following changes:
* Change error message for type param in a const expression when using
`min_const_generics`
* Change `ParamInNonTrivialAnonConst` to contain an extra `bool` used for
distinguishing whether the passed-in symbol is a type or a value.
Fixes#76701