| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix generator size regressions due to optimization
I tested the generator optimizations in #60187 and #61922 on the Fuchsia
build, and noticed that some small generators (about 8% of the async fns
in our build) increased in size slightly.
This is because in #60187 we split the fields into two groups, a
"prefix" non-overlap region and an overlap region, and lay them out
separately. This can introduce unnecessary padding bytes between the two
groups.
In every single case in the Fuchsia build, it was due to there being
only a single variant being used in the overlap region. This means that
we aren't doing any overlapping, period. So it's better to combine the
two regions into one and lay out all the fields at once, which is what
this change does.
r? @cramertj
cc @eddyb @Zoxc
|
|
|
|
|
|
|
|
|
|
Remove vector fadd/fmul reduction workarounds
The bugs that this was working around have been fixed in LLVM 9.
r? @gnzlbg
|
|
Turn `#[global_allocator]` into a regular attribute macro
It was a 99% macro with exception of some diagnostic details.
As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks.
Fixes https://github.com/rust-lang/rust/issues/44113
Fixes https://github.com/rust-lang/rust/issues/58072
|
|
Add tests for overlapping explicitly dropped locals in generators
Closes #62686
r? @tmandry
|
|
Closes rust-lang/rfcs#1428
|
|
|
|
Instead of
```
mod allocator_abi { /* methods */ }
```
we now generate
```
const _: () = { /* methods */ }
```
and use `std_path` for paths referring to standard library entities.
This way we no longer need to generate `use` and `extern crate` imports, and `#[global_allocator]` starts working inside unnamed blocks.
|
|
|
|
|
|
The bugs that this was working around have been fixed in LLVM 9.
|
|
|
|
Rollup of 15 pull requests
Successful merges:
- #61926 (Fix hyperlinks in From impls between Vec and VecDeque)
- #62615 ( Only error about MSVC + PGO + unwind if we're generating code)
- #62696 (Check that trait is exported or public before adding hint)
- #62712 (Update the help message on error for self type)
- #62728 (Fix repeated wording in slice documentation)
- #62730 (Consolidate hygiene tests)
- #62732 (Remove last use of mem::uninitialized from std::io::util)
- #62740 (Add missing link to Infallible in TryFrom doc)
- #62745 (update data_layout and features for armv7-wrs-vxworks)
- #62749 (Document link_section arbitrary bytes)
- #62752 (Disable Z3 in LLVM build)
- #62764 (normalize use of backticks in compiler messages for librustc/lint)
- #62774 (Disable simd_select_bitmask test on big endian)
- #62777 (Self-referencial type now called a recursive type)
- #62778 (Emit artifact notifications for dependency files)
Failed merges:
- #62746 ( do not use mem::uninitialized in std::io)
r? @ghost
|
|
Disable simd_select_bitmask test on big endian
Per #59356 it is expected that the interpretation of the bitmask depends
on target endianness.
Closes #59356
|
|
fakenine:normalize_use_of_backticks_compiler_messages_p7, r=alexreg
normalize use of backticks in compiler messages for librustc/lint
https://github.com/rust-lang/rust/issues/60532
|
|
Normalize type parameters in create_mono_items_for_default_impls.
Fix for https://github.com/rust-lang/rust/issues/58375. I've added a test in `src/tests/run-pass` to reproduce the bug, not sure that's the best place for it.
See https://github.com/rust-lang/rust/issues/58375#issuecomment-509156977 for more context.
|
|
Per #59356 it is expected that the interpretation of the bitmask depends
on target endianness.
Closes #59356
|
|
https://github.com/rust-lang/rust/issues/60532
|
|
Change some tests to `check-pass` that are only testing name resolution.
|
|
|
|
Fix some remaining cases of bad formatting
Update some failing tests
|
|
|
|
|
|
Fixes http://github.com/rust-lang/rust/issues/58375
|
|
rustc_codegen_ssa: fix range check in codegen_get_discr.
Fixes #61696, see https://github.com/rust-lang/rust/issues/61696#issuecomment-505473018 for more details.
In short, I had wanted to use `x - a <= b - a` to check whether `x` is in `a..=b` (as it's 1 comparison instead of 2 *and* `b - a` is guaranteed to fit in the same data type, while `b` itself might not), but I ended up with `x - a + c <= b - a + c` instead, because `x - a + c` was the final value needed.
That latter comparison is equivalent to checking that `x` is in `(a - c)..=b`, i.e. it also includes `(a - c)..a`, not just `a..=b`, so if `c` is not `0`, it will cause false positives.
This presented itself as the non-niche ("dataful") variant sometimes being treated like a niche variant, in the presence of uninhabited variants (which made `c`, aka the index of the first niche variant, arbitrarily large).
r? @nagisa, @rkruppe or @oli-obk
|
|
Replace unsafe_destructor_blind_to_params with may_dangle
This PR will completely remove support for `#[unsafe_destructor_blind_to_params]` attribute,
which is deprecated in #38970 by `[may_dangle]` unsafe attribute.
Closes #34761
|
|
ohadravid:test-generic-with-default-assiociated-type-re-rebalance-coherence, r=nikomatsakis
Coherence test when a generic type param has a default value from an associated type
A followup on #61400.
Before `re_rebalance_coherence`, this fails to compile (even though it should be accepted).
`re_rebalance_coherence` had no direct test for this, and I wanted to (a) make sure it doesn't regress in the future and (b) get it on record that this is actually the intended behavior.
|
|
|
|
Therefore we also remove `#[unsafe_destructor_blind_to_params]`
attribute completly.
|
|
|
|
Move async-await tests from run-pass to ui
fix #62236
r? @Centril
|
|
from an associated type
|
|
|
|
|
|
The auxiliary file arc_wake.rs is in run-pass/auxiliary and also
ui/async-await/auxiliary. Remove the former one as their contents
are same.
Move run-pass/futures-api.rs to ui/async-await/futures-api.rs as it
needs to use arc_wake.rs.
|
|
|
|
|
|
rustc_target: avoid negative register counts in the SysV x86_64 ABI.
Because `needed_{int,sse}` and `{int,sse}_regs` were only used with integer literals, they were inferred to `i32` and `{int,sse}_regs` could therefore be negative.
There was a check which prevented that, but *only* for aggregate arguments, not scalars.
Fixes #62350.
r? @nagisa or @rkruppe
|
|
Create async version of the dynamic-drop test
Some of the tests in dynamic-drop have been cut:
* The tests that are just simpler versions of other tests - these tests are already fairly slow due to all of the unwinding and async functions have more control flow paths than normal functions.
* The union test - it's for an unstable feature that has an RFC to remove it.
* The generator test - there aren't async generators yet.
* The tests that show values being leaked - these can be added once the issue is fixed.
r? @Centril
cc #62121 @cramertj
|
|
Feature gate `rustc` attributes harder
Fixes https://github.com/rust-lang/rust/issues/62116
|
|
Reduce reliance on `await!(...)` macro
Only the last commit is new.
r? @cramertj
|
|
Implement mem::{zeroed,uninitialized} in terms of MaybeUninit.
Refs #62061
r? @oli-obk
|
|
|
|
|
|
|
|
Refs #62061
|