-
Notifications
You must be signed in to change notification settings - Fork 242
Rustc pull update #974
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
Open
github-actions
wants to merge
40
commits into
master
Choose a base branch
from
rustc-pull
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rustc pull update #974
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build rustc with assertions in `dist-alt` jobs Revival of rust-lang/rust#131077, to check CI times now that we don't do PGO/BOLT anymore on Linux `-alt` builds. r? `@ghost` try-job: dist-x86_64-msvc-alt try-job: dist-x86_64-linux-alt
…heVoid [rustdoc] Give more information into extracted doctest information Follow-up of rust-lang/rust#134531. This update fragment the doctest code into its sub-parts to give more control to the end users on how they want to use it. The new JSON looks like this: ```json { "format_version":2, "doctests":[ { "file":"$DIR/extract-doctests-result.rs", "line":8, "doctest_attributes":{ "original":"", "should_panic":false, "no_run":false, "ignore":"None", "rust":true, "test_harness":false, "compile_fail":false, "standalone_crate":false, "error_codes":[], "edition":null, "added_css_classes":[], "unknown":[] }, "original_code":"let x = 12;\nOk(())", "doctest_code":{ "crate_level":"#![allow(unused)]\n", "code":"let x = 12;\nOk(())", "wrapper":{ "before":"fn main() { fn _inner() -> core::result::Result<(), impl core::fmt::Debug> {\n", "after":"\n} _inner().unwrap() }", "returns_result":true } }, "name":"$DIR/extract-doctests-result.rs - (line 8)" } ] } ``` for this doctest: ```rust let x = 12; Ok(()) ``` With this, I think it matches what you need ``@ojeda?`` If so, once merged I'll update the patch I sent to RfL. r? ``@aDotInTheVoid``
float tests: deduplicate min, max, and rounding tests Part of rust-lang/rust#141726 Best reviewed commit-by-commit. - Use `assert_biteq!` in the `mod.rs` tests. This requires some trickery to make shadowing macros with imports work. - The min, max, minimum, maximum tests in `tests/floats/f*.rs` are entirely subsumed by what we already have in `tests/float/mod.rs`, so I just removed them. - The rounding tests (floor etc) in `f*.rs` had more test points, so I copied them over. They didn't have `0.5` and `-0.5` though which seem like interesting points in particular regarding the sign of the resulting zero if that's what it sounds to, and they didn't max min/max/inf/nan tests, so this was really a merger of both tests. r? ``@tgross35``
Update the `compiler-builtins` subtree Update the Josh subtree to 7c46e921c117. r? `@ghost`
Rollup of 9 pull requests Successful merges: - rust-lang/rust#140593 (Temporary lifetime extension through tuple struct and tuple variant constructors) - rust-lang/rust#141399 ([rustdoc] Give more information into extracted doctest information) - rust-lang/rust#141493 (Delegate `<SocketAddr as Debug>` to `ByteStr`) - rust-lang/rust#141811 (Unimplement unsized_locals) - rust-lang/rust#142243 (float tests: deduplicate min, max, and rounding tests) - rust-lang/rust#142464 (variadic functions: remove list of supported ABIs from error) - rust-lang/rust#142477 (Fix incorrect suggestion when calling an associated type with a type anchor) - rust-lang/rust#142484 (Remove unneeded lifetime bound from signature of BTreeSet::extract_if) - rust-lang/rust#142489 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
…ke-places, r=jieyouxu Apply `mismatched-lifetime-syntaxes` to trait and extern functions r? `@jieyouxu`
Simplify implementation of Rust intrinsics by using type parameters in the cache The current implementation of intrinsics have a lot of duplication to handle different overloads of overloaded LLVM intrinsic. This PR uses the **base name and the type parameters** in the cache instead of the full, overloaded name. This has the benefit that `call_intrinsic` doesn't need to provide the full name, rather the type parameters (which is most of the time more available). This uses `LLVMIntrinsicCopyOverloadedName2` to get the overloaded name from the base name and the type parameters, and only uses it to declare the function. (originally was part of rust-lang/rust#140763, split off later) `@rustbot` label A-codegen A-LLVM r? codegen
[perf] `GenericArgs`-related: Change asserts to debug asserts & use more slice interning over iterable interning 1. The 1st commit yields the following perf gains: [#142289 (comment)](rust-lang/rust#142289 (comment)). 2. The 2nd commit might also have a minor positive perf impact, however that one wasn't tested in isolation. For reference, the initial approach rust-lang/rust@c7e6acc (results: rust-lang/rust#142289 (comment)) had a lot more changes (apart from what's now contained in commit 1 and 2) which seemed to be perf irrelevant (cf. the partial countercheck in rust-lang/rust@6f82bf1 (results: rust-lang/rust#142289 (comment)).
…nTheVoid rustdoc_json: reduce allocations These commits reduce the number of allocations done for rustdoc_json, mostly by avoiding unnecessary clones. Best reviewed one commit at a time. r? `@aDotInTheVoid`
move fast reject into inner to also fast reject inside of the folder r? `@BoxyUwU`
Do not clone Arc when hashing span. Tiny improvement I was when trying to profile span hashing.
early linting: avoid redundant calls to `check_id` An attempt to address the regression at rust-lang/rust#142240 (comment) r? `@oli-obk` cc `@nnethercote` who might have a better understanding of the performance implications
Don't fold `ExternalConstraintsData` when it's empty Probably useless, but let's see. r? lcnr
…-perf-problems, r=oli-obk collect delayed lints in hir_crate_items r? `@oli-obk` Attempt to mitigate perf problems in rust-lang/rust#138164
use `MixedBitSet` for borrows-in-scope dataflow analysis The `Borrows` dataflow analysis uses a dense bitset, but a bitset supporting _some_ amount of sparseness is better suited for big functions with a big number of loans. The cutoff between dense and chunked bitset is around 2K loans IIRC, and we could finesse that value if we wanted to, but as-is it happens to a couple of rustc-perf benchmarks (which IIRC are at least partially generated from macros and the likes.). It's a small win on these two, and shouldn't have any impact on the others. r? `@matthewjasper`
Update to LLVM 20.1.7 Closes rust-lang/rust#141306, closes rust-lang/rust#140686, closes rust-lang/rust#141737, closes rust-lang/rust#140933.
Subtree update of `rust-analyzer` r? `@ghost`
Safer implementation of RepeatN I've seen the "Use MaybeUninit for RepeatN" commit while reading This Week In Rust and immediately thought about something I've written some time ago - https://github.com/Soveu/repeat_finite/blob/master/src/lib.rs. Using the fact, that `Option` will find niche in `(T, NonZeroUsize)`, we can construct something that has the same size as `(T, usize)` while completely getting rid of `MaybeUninit`. This leaves only `unsafe` on `TrustedLen`, which is pretty neat.
ci: split x86_64-gnu-tools job try-job: x86_64-gnu-tools try-job: x86_64-gnu-miri try-job: aarch64-gnu
Handle win32 separator for cygwin paths This PR handles a issue that cygwin actually supports Win32 path, so we need to handle the Win32 prefix and separaters. r? `@mati865` cc `@jeremyd2019` ~~Not sure if I should handle the prefix like the windows target... Cygwin *does* support win32 paths directly going through the APIs, but I think it's not the recommended way.~~ Here I just use `cygwin_conv_path` because it handles both cygwin and win32 paths correctly and convert them into absolute POSIX paths. UPDATE: Windows path prefix is handled.
Use jemalloc for Clippy The tool macros are annoying, we should IMO just get rid of them, create separate steps for each tool and (re)use some builders in them to share the build code. r? `@ghost`
Insert checks for enum discriminants when debug assertions are enabled Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following: ```rust let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) }; ``` An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++. This check is similar to Miri's capabilities of checking for valid construction of enum values. This PR is inspired by saethlin@'s PR rust-lang/rust#104862. Thank you so much for keeping this code up and the detailed comments! I also pair-programmed large parts of this together with vabr-g@. r? `@saethlin`
Bootstrap already had a manual doc filter for the `sysroot` crate, but other library crates keep themselves out of the public docs by setting `[lib] doc = false` in their manifest. This seems like a better solution to hide `compiler-builtins` docs, and removes the `sysroot` hack too.
Update the `compiler-builtins` subtree Update the Josh subtree to 8aba4c899ee8. r? `@ghost`
Update LLVM submodule Picks up <rust-lang/llvm-project#183> r? `@nikic`
Add opaque TypeId handles for CTFE Reopen of rust-lang/rust#142789 (comment) after some bors insta-merge chaos r? `@RalfJung`
…oli-obk use `--dynamic-list` for exporting executable symbols closes rust-lang/rust#101610 cc rust-lang/rust#84161 https://sourceware.org/binutils/docs-2.39/ld/VERSION.html: > --dynamic-list=dynamic-list-file Specify the name of a dynamic list file to the linker. This is typically used when creating shared libraries to specify a list of global symbols whose references shouldn’t be bound to the definition within the shared library, or creating dynamically linked executables to specify a list of symbols which should be added to the symbol table in the executable. This option is only meaningful on ELF platforms which support shared libraries. `ld.lld --help`: > --dynamic-list=<file>: Similar to --export-dynamic-symbol-list. When creating a shared object, this additionally implies -Bsymbolic but does not set DF_SYMBOLIC > --export-dynamic-symbol-list=file: Read a list of dynamic symbol patterns. Apply --export-dynamic-symbol on each pattern > --export-dynamic-symbol=glob: (executable) Put matched symbols in the dynamic symbol table. (shared object) References to matched non-local STV_DEFAULT symbols shouldn't be bound to definitions within the shared object. Does not imply -Bsymbolic. > --export-dynamic: Put symbols in the dynamic symbol table Use `--dynamic-list` because it's older than `--export-dynamic-symbol-list` (binutils 2.35) try-job: dist-i586-gnu-i586-i686-musl
Fix weird rustdoc output when single and glob reexport conflict on a name Fixes rust-lang/rust#143107. The problem was that the second reexport would overwrite the first, leading to having unexpected results. To fix it, I now group items by their original `DefId` and their name and keep tracks of all imports for this item (should very rarely be more than one though, and even less often more than 2). cc `@lolbinarycat`
… r=Amanieu emit `.att_syntax` when global/naked asm use that option fixes rust-lang/rust#143542 LLVM would error when using `-Cllvm-args=-x86-asm-syntax=intel` in combination with global/naked assembly with `att_syntax`. It turns out that for LLVM you do in this case need to emit `.att_syntax`. r? `@Amanieu`
Fix handling of no_std targets in `doc::Std` step The previous logic was wrong for no_std targets, it just didn't do anything. The logic was added there because by default, the `Std` step would otherwise have a list of all std crates to check, but these would fail for no_std targets. What has to happen instead is to select the default set of packages to check/doc/build, which currently happens in the `std_cargo` function, but the `self.crates` list was overriding that. In general, using `crates: Vec<String>` in the `Std` steps is quite fishy, because it's difficult to distinguish between all crates (either they are all enumerated or `crates` is empty) and the default (e.g. `x <kind> [library]`) vs a subset (e.g. `x <kind> core`). I wanted to improve that using an enum that would distinguish these situations, avoid passing `-p` for all of the crates explicitly, and unify the selection of packages to compile/check/... in `std_cargo`, based on this enum. However, I found out from some other bootstrap comments that when you pass `-p` explicitly for all crates, cargo behaves differently (apparently for check it will also check targets/examples etc. with `-p`, but not without it). Furthermore, the doc step has a special case where it does not document the `sysroot` package. So as usually, unifying this logic would get into some edge cases... So instead I opted for a seemingly simpler solution, where I try to prefilter only two allowed crates (core and alloc) for no_std targets in the `std_crates_for_run_make` function. It's not perfect, but I think it's better than the status quo (words to live by when working on bootstrap...). Fixes [this Zulip topic](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/docs.20for.20non-host.20targets.3F). r? `@jieyouxu`
fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations
Constify `Fn*` traits r? `@compiler-errors` `@fee1-dead` this should unlock a few things. A few `const_closures` tests have broken even more than before, but that feature is marked as incomplete anyway cc rust-lang/rust#67792
Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic For unwinding with SEH, we currently construct a C++ exception with the panic data. Being a regular C++ exception, it interacts with the C++ exception handling machinery and can be retrieved via `std::current_exception`, which needs to copy the exception. We can't support that, so we panic, which throws another exception, which the C++ runtime tries to copy and store into the exception_ptr, which panics again, which causes the C++ runtime to store a `bad_exception` instance. However, this doesn't work because the panics thrown by the copy function will be dropped without being rethrown, and causes unnecessary log spam in stderr. Fix this by directly throwing an exception without data, which doesn't cause log spam and can be dropped without being rethrown. Fixes rust-lang/rust#143623. This also happens to be the solution ``@dpaoliello`` suggested, though I'm not sure how to handle the commit credit attribution.
Disable docs for `compiler-builtins` and `sysroot` Bootstrap already had a manual doc filter for the `sysroot` crate, but other library crates keep themselves out of the public docs by setting `[lib] doc = false` in their manifest. This seems like a better solution to hide `compiler-builtins` docs, and removes the `sysroot` hack too. Fixes rust-lang/rust#143215 (after backport) ```@rustbot``` label beta-nominated
…Void [rustdoc-json] Add tests for `#[doc(hidden)]` handling of items. Add tests which check: - `#[doc(hidden)]` items are not present in rustdoc JSON output by default. - Invoking rustdoc with `--document-hidden-items` makes `#[doc(hidden)]` items appear, and they show their `#[doc(hidden)]` status appropriately. r? `@aDotInTheVoid`
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143446 (use `--dynamic-list` for exporting executable symbols) - rust-lang/rust#143590 (Fix weird rustdoc output when single and glob reexport conflict on a name) - rust-lang/rust#143599 (emit `.att_syntax` when global/naked asm use that option) - rust-lang/rust#143615 (Fix handling of no_std targets in `doc::Std` step) - rust-lang/rust#143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations) - rust-lang/rust#143640 (Constify `Fn*` traits) - rust-lang/rust#143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic) - rust-lang/rust#143660 (Disable docs for `compiler-builtins` and `sysroot`) - rust-lang/rust#143665 ([rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.) r? `@ghost` `@rustbot` modify labels: rollup
Remove support for dynamic allocas Followup to rust-lang/rust#141811
Propagate from borrowed locals in CopyProp r? cjgillot
This updates the rust-version file to bfc046a4b8d6b57db02540182466e989a9b0fb40.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: bfc046a4b8d6b57db02540182466e989a9b0fb40 Filtered ref: f529e65 This merge was created using https://github.com/rust-lang/josh-sync.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Latest update from rustc.