forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Solve conflicts with upstream #3
Merged
ifxfrancois
merged 9,179 commits into
test_documentation
from
feature/update-test-doc-to-master
Sep 18, 2024
Merged
Solve conflicts with upstream #3
ifxfrancois
merged 9,179 commits into
test_documentation
from
feature/update-test-doc-to-master
Sep 18, 2024
Conversation
This file contains 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
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#129260 (Don't suggest adding return type for closures with default return type) - rust-lang#129520 (Suggest the correct pattern syntax on usage of unit variant pattern for a struct variant) - rust-lang#129866 (Clarify documentation labelling and definitions for std::collections) - rust-lang#130123 (Report the `note` when specified in `diagnostic::on_unimplemented`) - rust-lang#130161 (refactor merge base logic and fix `x fmt`) - rust-lang#130206 (Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`) - rust-lang#130207 (Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`) - rust-lang#130219 (Fix false positive with `missing_docs` and `#[test]`) - rust-lang#130221 (Make SearchPath::new public) r? `@ghost` `@rustbot` modify labels: rollup
This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem.
Signed-off-by: onur-ozkan <[email protected]>
It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0). Fixes 129895
`rustc_resolve` allocates many things in `ResolverArenas`. The lifetime used for references into the arena is mostly `'a`, and sometimes `'b`. This commit changes it to `'ra`, which is much more descriptive. The commit also changes the order of lifetimes on a couple of structs so that '`ra` is second last, before `'tcx`, and does other minor renamings such as `'r` to `'a`.
…ble, r=compiler-errors Don't warn empty branches unreachable for now The [stabilization](rust-lang#122792) of `min_exhaustive_patterns` updated the `unreachable_pattern` lint to trigger on empty arms too. This has caused some amount of churn, and imposes an unjoyful `#[allow(unreachable_patterns)]` onto library authors who want to stay backwards-compatible. While I think the lint should eventually cover these cases, for transition's sake I'd prefer to revert linting to what it was prior to stabilization, at least for now. Fixes rust-lang#129031. r? ``@compiler-errors``
update stdarch The goal is mostly to pull in rust-lang/stdarch#1633. r? ```@Amanieu```
…ilee enable const-float-classify test, and test_next_up/down on 32bit x86 The test_next_up/down tests have been disabled on all 32bit x86 targets, which goes too far -- they should definitely work on our (tier 1) i686 target, it is only without SSE that we might run into trouble due to rust-lang#114479. However, I cannot reproduce that trouble any more -- maybe that got fixed by rust-lang#123351? The const-float-classify test relied on const traits "because we can", and got disabled when const traits got removed. That's an unfortunate reduction in test coverage of our float functionality, so let's restore the test in a way that does not rely on const traits. The const-float tests are actually testing runtime behavior as well, and I don't think that runtime behavior is covered anywhere else. Probably they shouldn't be called "const-float", but we don't have a `tests/ui/float` folder... should I create one and move them there? Are there any other ui tests that should be moved there? I also removed some FIXME referring to not use x87 for Rust-to-Rust-calls -- that has happened in rust-lang#123351 so this got fixed indeed. Does that mean we can simplify all that float code again? I am not sure how to test it. Is running the test suite with an i586 target enough? Cc ```@tgross35``` ```@workingjubilee```
…ingjubilee Fix linking error when compiling for 32-bit watchOS In rust-lang#124494 (or rust-lang#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI". So this PR is effectively a revert of rust-lang#124494, with a few more comments explaining what's going on. Fixes rust-lang#130071. r? Mark-Simulacrum (since you reviewed the original)
…iler-errors Remove needless returns detected by clippy in the compiler
…links, r=ChrisDenton maint: update docs for change_time ext and doc links maint: update docs for change_time ext and doc links Related: rust-lang#121478 r? tgross35
…hlin notify Miri when intrinsics are changed `@rust-lang/miri` should we notify the entire team, or should I just add myself?
… r=compiler-errors miri: fix overflow detection for unsigned pointer offset This is the Miri part of rust-lang#130229. This is already UB in codegen so we better make Miri detect it; updating the docs may take time if we have to follow some approval process, but let's make Miri match reality ASAP. r? ``@scottmcm``
…-fix, r=jieyouxu Use the same span for attributes and Try expansion of ? This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem and will be fixed by this change.
Limit `libc::link` usage to `nto70` target only, not NTO OS It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0). Fixes rust-lang#129895 CC: `@japaric` `@flba-eb` `@saethlin`
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#129103 (Don't warn empty branches unreachable for now) - rust-lang#129696 (update stdarch) - rust-lang#129835 (enable const-float-classify test, and test_next_up/down on 32bit x86) - rust-lang#130077 (Fix linking error when compiling for 32-bit watchOS) - rust-lang#130114 (Remove needless returns detected by clippy in the compiler) - rust-lang#130168 (maint: update docs for change_time ext and doc links) - rust-lang#130228 (notify Miri when intrinsics are changed) - rust-lang#130239 (miri: fix overflow detection for unsigned pointer offset) - rust-lang#130244 (Use the same span for attributes and Try expansion of ?) - rust-lang#130248 (Limit `libc::link` usage to `nto70` target only, not NTO OS) r? `@ghost` `@rustbot` modify labels: rollup
…arth Bump Unicode to version 16.0.0 [Unicode 16.0.0 is out!](https://www.unicode.org/versions/Unicode16.0.0/) This PR updates Unicode data embedded in `core`.
…ler-errors Add -Z small-data-threshold This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a `.sdata` or `.sbss` section. Support is indicated in the target options via the small-data-threshold-support target option, which can indicate either an LLVM argument or an LLVM module flag. To avoid duplicate specifications in a large number of targets, the default value for support is DefaultForArch, which is translated to a concrete value according to the target's architecture.
Mention that some methods do not sanitize their input fully
…g-valid, r=jieyouxu Do precise capturing arg validation in resolve Moves the validation of precise capturing args (`use<T, N>`) out of `resolve_bound_vars` and into `rustc_resolve`. This both simplifies the impl and fixes a bug when we have `use<arg>` where `arg` is one of the function args. This also introduces new error codes specifically for precise capturing, to avoid reusing the other error codes which are not as accurate. Fixes rust-lang#130399
…nd-mingw-import-libraries, r=petrochenkov linker: Allow MSVC to use import libraries following the Meson/MinGW convention Hi all, This PR implements support for `MsvcLinker` to use import libraries following Meson and the MinGW toolchain's naming convention. Meson [follows the `libfoo.dll.a` naming convention](https://mesonbuild.com/FAQ.html#why-does-building-my-project-with-msvc-output-static-libraries-called-libfooa) to disambiguate between static and import libraries. This support already existed for static libraries (see rust-lang#100101), but not for dynamic libraries. The latter case was added by duplicating the logic in `native_libs::find_native_static_library`, but a separate case was added in `link_dylib_by_name` for the Windows CRT libraries which must be handled by the linker itself. See for prerequisites rust-lang#129366, rust-lang#126094, and rust-lang#128370. All feedback is appreciated! Fixes rust-lang#122455 cc `@sdroege` `@nirbheek`
… r=jieyouxu Don't ICE when generating `Fn` shim for async closure with borrowck error Turn an assumption that I had originally written as an assert into a delayed bug, because this shim code is reachable even if we have borrowck errors via the MIR inliner. Fixes rust-lang#129262.
…, r=jieyouxu Don't ICE when RPITIT captures more method args than trait definition Make sure we don't ICE when an RPITIT captures more method args than the trait definition, which is not allowed. This was because we were using the wrong def id for error reporting. Due to the default lifetime capture rules of RPITITs (capturing everything in scope), this is only doable if we use precise capturing, which isn't currently allowed for RPITITs anyways but we still end up reaching the relevant codepaths. Fixes rust-lang#129850
…dered_test, r=RalfJung Ignore reduce-fadd-unordered on SGX platform rust-lang#130325 added the `tests/assembly/simd/reduce-fadd-unordered.rs` test. Unfortunately, the use of `CHECK: ret` makes that this test is not compatible with LVI mitigations applied for the SGX target. This PR makes sure this test is ignored for the SGX target, until a nicer solution is available.
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#123436 (linker: Allow MSVC to use import libraries following the Meson/MinGW convention) - rust-lang#130410 (Don't ICE when generating `Fn` shim for async closure with borrowck error) - rust-lang#130412 (Don't ICE when RPITIT captures more method args than trait definition) - rust-lang#130436 (Ignore reduce-fadd-unordered on SGX platform) r? `@ghost` `@rustbot` modify labels: rollup
…r=BoxyUwU Don't call `fn_arg_names` query for non-`fn` foreign items in resolver Fixes rust-lang#130015
…oxyUwU Do not report an excessive number of overflow errors for an ever-growing deref impl Check that we don't first hit the recursion limit in `get_field_candidates_considering_privacy` before probing for methods when we have a method lookup failure and we want to see if `.field.method()` exists. We also silence overflow error messages if we're probing for methods for diagnostics. Also renames some functions to make it clearer that they're only for diagnostics, and sprinkle some `Autoderef::silence_errors` around to silence unnecessary overflow errors that come from diagnostics. Fixes rust-lang#130224.
Avoid crashing on variadic functions when producing arg-mismatch errors Fixes rust-lang#130372 by accommodating how variadic functions change the argument list length between HIR body and FnDecls. Also degrades the zip_eq to a debug_assert! to match other asserts in the area to avoid being disruptive to users. There is at least one other crash in this area I am working on in rust-lang#130400 and also considering how we might refactor some of this code to hoist some of this logic up higher. r? `@compiler-errors`
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#130033 (Don't call `fn_arg_names` query for non-`fn` foreign items in resolver) - rust-lang#130282 (Do not report an excessive number of overflow errors for an ever-growing deref impl) - rust-lang#130437 (Avoid crashing on variadic functions when producing arg-mismatch errors) r? `@ghost` `@rustbot` modify labels: rollup
The top-level docs for `LazyLock` included two lines of code, each with an accompanying comment, that were identical and with nearly- identical comments. This looks like an oversight from a past edit which was perhaps trying to rewrite an existing example but ended up duplicating rather than replacing, though I haven't gone back through the Git history to check. This commit removes what I personally think is the less-clear of the two examples. Signed-off-by: Andrew Lilley Brinker <[email protected]>
For structs that cannot be unsized, the layout algorithm sometimes moves unsized fields to the end of the struct, which circumvented the error for unexpected unsized fields and returned an unsized layout anyway. This commit makes it so that the unexpected unsized error is always returned for structs that cannot be unsized, allowing us to remove an old hack and fixing some old ICE.
[library/std/src/process.rs] `PartialEq` for `ExitCode` Converting a third-party CLI to a library so started passing around [`std::process::ExitCode`](https://doc.rust-lang.org/std/process/struct.ExitCode.html) in an `Either`. Then I realised the tests can't be modified to compare equality of `ExitCode`s. This PR fixes this oversight.
Just a simple header move. @rustbot label: +llvm-main
…ler-errors layout computation: gracefully handle unsized types in unexpected locations This PR reworks the layout computation to eagerly return an error when encountering an unsized field where a sized field was expected, rather than delaying a bug and attempting to recover a layout. This is required, because with trivially false where clauses like `[T]: Sized`, any field can possible be an unsized type, without causing a compile error. Since this PR removes the `delayed_bug` method from the `LayoutCalculator` trait, it essentially becomes the same as the `HasDataLayout` trait, so I've also refactored the `LayoutCalculator` to be a simple wrapper struct around a type that implements `HasDataLayout`. The majority of the diff is whitespace changes, so viewing with whitespace ignored is advised. implements rust-lang#123169 (comment) r? `@compiler-errors` or compiler fixes rust-lang#123134 fixes rust-lang#124182 fixes rust-lang#126939 fixes rust-lang#127737
coverage: Clarify some parts of coverage counter creation This is a series of semi-related changes that are trying to make the `counters` module easier to read, understand, and modify. For example, the existing code happens to avoid ever using the count for a `TerminatorKind::Yield` node as the count for its sole out-edge (since doing so would be incorrect), but doesn't do so explicitly, so seemingly-innocent changes can result in baffling test failures. This PR also takes the opportunity to simplify some debug-logging code that was making its surrounding code disproportionately hard to read. There should be no changes to the resulting coverage instrumentation/mappings, as demonstrated by the absence of changes to the coverage test suite.
run_make_support: rectify symlink handling Avoid confusing Unix symlinks and Windows symlinks. Since their semantics are quite different, we should avoid trying to make it automagic in how symlinks are created and deleted. Notably, the tests should reflect what type of symlinks are to be created to match what std does to make it less surprising for test readers.
…n-hdr, r=cuviper rustc_llvm: update for llvm/llvm-project@2ae968a0d9fb61606b020e898d88… …4c82dd0ed8b5 Just a simple header move. `@rustbot` label: +llvm-main
…bilee fix: Remove duplicate `LazyLock` example. The top-level docs for `LazyLock` included two lines of code, each with an accompanying comment, that were identical and with nearly- identical comments. This looks like an oversight from a past edit which was perhaps trying to rewrite an existing example but ended up duplicating rather than replacing, though I haven't gone back through the Git history to check. This commit removes what I personally think is the less-clear of the two examples.
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#130380 (coverage: Clarify some parts of coverage counter creation) - rust-lang#130427 (run_make_support: rectify symlink handling) - rust-lang#130447 (rustc_llvm: update for llvm/llvm-project@2ae968a0d9fb61606b020e898d88…) - rust-lang#130448 (fix: Remove duplicate `LazyLock` example.) r? `@ghost` `@rustbot` modify labels: rollup
…rkingjubilee `RepeatN`: use MaybeUninit Closes rust-lang#130140. Closes rust-lang#130141. Use `MaybeUninit` instead of `ManuallyDrop` for soundness.
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.
No description provided.