-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 17 pull requests #56026
Rollup of 17 pull requests #56026
Conversation
… the same ABI This is supposed to fix the performence regression of using MaybeUninit in rust-lang#54668
This commit changes the test code to compare against easier-to-read, static values instead of relying on the result of `wrapping_add()` which may or may not result in the value that we expect.
Just running RustFmt on upvar.rs
…ss on more platforms
`concurrent_recv_timeout_and_upgrade` reproduces a problem 100% times on my MacBook with command: ``` ./x.py test --stage 0 ./src/test/run-pass/mpsc_stress.rs ``` Thus it is commented out. Other tests cases were useful for catching another test cases which may arise during the fix. This diff is a part of my previous rewrite attempt: rust-lang#42883 CC rust-lang#39364
Refactoring out the HirId of the UpvarId in another struct.
DynamicLibrary uses libc's dlsym() function internally to find symbols. Some implementations of dlsym(), like musl's, only look at dynamically- exported symbols, as found in shared libraries. To also export symbols from the main executable, we would need to pass --export-dynamic to the linker. Since this flag isn't available everywhere, ignore the test for now.
A rust-enabled gdb already knows how to display string slices, structs, tuples, and enums (and after rust-lang#54004, the pretty-printers can't handle enums at all). This patch disables these pretty-printers when gdb is rust-enabled. The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed, because it does not seem to depend on any behavior of that version of gdb, and because gdb 7.7 is 4 years old now.
Arc::clone(&from) is considered as more idiomatic because it conveys more explicitly the meaning of the code.
Brings in some fixes and stabilizations!
I'm not sure why this is failing, so let's hopefully get some more information to help investigation!
test/linkage-visibility: Ignore on musl targets DynamicLibrary uses libc's dlsym() function internally to find symbols. Some implementations of dlsym(), like musl's, only look at dynamically- exported symbols, as found in shared libraries. To also export symbols from the main executable, pass --export-dynamic to the linker. (Plus see [here](https://stackoverflow.com/questions/4184017) and [here](https://stackoverflow.com/questions/6121838) for examples of where this is necessary on glibc as well.)
miri: accept extern types in structs if they are the only field Fixes rust-lang#55541 Cc @oli-obk @eddyb rust-lang#43467
…, r=nikomatsakis Disable some pretty-printers when gdb is rust-enabled A rust-enabled gdb already knows how to display string slices, structs, tuples, and enums (and after rust-lang#54004, the pretty-printers can't handle enums at all). This patch disables these pretty-printers when gdb is rust-enabled. The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed, because it does not seem to depend on any behavior of that version of gdb, and because gdb 7.7 is 4 years old now.
A few tweaks to iterations/collecting - simplify and speed up `dot::GraphWalk::nodes` for `cfg::CFG` - `reserve` the capacity for `edges` in `DepGraph::query` - collect directly to a `HirVec` in `LoweringContext::lower_attrs` - fix overallocation in `OnDiskCache::serialize` - preallocate the `new_partitioning` vector in `merge_codegen_units` - simplify `impl FromHex for str` - improve the creation of `self_arg_names` in `impl MethodDef`
Forward the ABI of the non-zero sized fields of an union if they have the same ABI This is supposed to fix the performence regression of using MaybeUninit in rust-lang#54668
remove unused dependency
do not panic just because cargo failed Currently, a rustc ICE during bootstrap shows *two* backtraces with `RUST_BACKTRACE`. Fix that by making bootstrap just exit when cargo fails. This matches what we do [when building a tool fails](https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L189) and [when other stuff (not called through `stream_cargo`, like `cargo test`) fails](https://github.com/rust-lang/rust/blob/master/src/build_helper/lib.rs#L43). Fixes rust-lang#53379
Make miri value visitor usfeful for mutation ~~This is based on top of rust-lang#55716, [click here](RalfJung/rust@escape-to-raw...RalfJung:mut-visitor) for just the new commits.~~ r? @oli-obk
core/tests/num: Simplify `test_int_from_str_overflow()` test code This commit changes the test code to compare against easier-to-read, static values instead of relying on the result of `wrapping_add()` which may or may not result in the value that we expect.
…edicate_walk_tys, r=oli-obk ty: return impl Iterator from Predicate::walk_tys Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function. It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
rust-lang#53488 Refactoring UpvarId
…llaumeGomez rustdoc: properly calculate spans for intra-doc link resolution errors Fixes rust-lang#55723 When rustdoc is reporting a resolution error for intra-doc links, it needs to convert a span from one relative to the *markdown* (as the links are only found on the final markdown text) to one relative to the *source code* (as the error reporting is meant to show where the line is in the source, so the user can fix it). However, a calculation for how much "offset" to apply had a subtle error: it trimmed the whole line when attempting to account for leading indentation. This caused it to add in *trailing* whitespace into this calculation, which created an incorrect span. In a lot of situations, this isn't a problem - the span will be shifted in the code slightly, but the warning will still be displayed and mostly legible. However, there is one important situation where this can cause an ICE: multi-byte codepoints. If a shifted span now has a starting point in the middle of a multi-byte codepoint, libsyntax will panic when trying to track what source item it corresponds to. This flew under our radar because trailing whitespace and multi-byte codepoints are both situations that we don't run into in the compiler repo. (There is one more situation where this can error, that will be much harder to fix: block-style doc comments. Lines in a block-style doc comment have a zero-or-more (usually one) character offset per line, causing this calculation to be way off. I'm punting that to another issue, though...)
Stress test for MPSC `concurrent_recv_timeout_and_upgrade` reproduces a problem 100% times on my MacBook with command: ``` ./x.py test --stage 0 ./src/test/run-pass/mpsc_stress.rs ``` Thus it is commented out. Other tests cases were useful for catching another test cases which may arise during the fix. This diff is a part of my previous rewrite attempt: rust-lang#42883 CC rust-lang#39364
Update Cargo submodule Brings in some fixes and stabilizations!
Replace data.clone() by Arc::clone(&data) in mutex doc. Arc::clone(&from) is considered as more idiomatic because it conveys more explicitly the meaning of the code. Since this clone is visible in the official documentation, I thought it could be better to use the more idiomatic version.
avoid shared ref in UnsafeCell::get Avoid taking a shared reference in `UnsafeCell::get`. This *should* be taking a raw reference (see rust-lang/rfcs#2582), but that operation is not currently available, so I propose we exploit `repr(transparent)` instead and cast the pointer around. This is required to make `UnsafeCell::get` pass the [stacked borrows implementation](https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html) in miri (currently, `UnsafeCell::get` is on a whitelist, but that is of course not very satisfying). It shouldn't affect normal execution/codegen. Would be great if we could get this landed and shrink miri's whitelist! Cc @nikomatsakis
…hton std: Add debugging for a failing test on appveyor I'm not sure why this is failing, so let's hopefully get some more information to help investigation!
@bors r+ p=380 |
📌 Commit db99aa8 has been approved by |
⌛ Testing commit db99aa8 with merge ce79ba56cfd4933e607f2f68a4aa51216a985d6f... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
test_int_from_str_overflow()
test code #55919 (core/tests/num: Simplifytest_int_from_str_overflow()
test code)Failed merges:
r? @ghost