about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-08-15Rollup merge of #128963 - GuillaumeGomez:output-to-stdout, r=aDotInTheVoidMatthias Krüger-0/+26
Add possibility to generate rustdoc JSON output to stdout Fixes #127165. I think it's likely common to want to get rustdoc json output directly instead of reading it from a file so I added this option to allow it. It's unstable and only works with `--output-format=json`. r? `@aDotInTheVoid`
2024-08-15Rollup merge of #128925 - dingxiangfei2009:smart-ptr-helper-attr, ↵Matthias Krüger-12/+164
r=compiler-errors derive(SmartPointer): register helper attributes Fix #128888 This PR enables built-in macros to register helper attributes, if any, to support correct name resolution in the correct lexical scope under the macros. Also, `#[pointee]` is moved into the scope under `derive(SmartPointer)`. cc `@Darksonn` `@davidtwco`
2024-08-15Rollup merge of #127905 - BKPepe:powerpc-muslspe, r=wesleywiserMatthias Krüger-0/+3
Add powerpc-unknown-linux-muslspe compile target This is almost identical to already existing targets: - powerpc_unknown_linux_musl.rs - powerpc_unknown_linux_gnuspe.rs It has support for PowerPC SPE (muslspe), which can be used with GCC version up to 8. It is useful for Freescale or IBM cores like e500. This was verified to be working with OpenWrt build system for CZ.NIC's Turris 1.x routers, which are using Freescale P2020, e500v2, so add it as a Tier 3 target. Follow-up of https://github.com/rust-lang/rust/pull/100860
2024-08-15Rollup merge of #125970 - RalfJung:before_exec, r=m-ou-seMatthias Krüger-0/+28
CommandExt::before_exec: deprecate safety in edition 2024 Similar to `set_var`, we had to find out after 1.0 was released that `before_exec` should have been unsafe. We partially rectified this by deprecating that function a long time ago, but since https://github.com/rust-lang/rust/pull/124636 we have the ability to also deprecate the safety of the old function and make it a *hard error* to call the old function outside `unsafe` in the next edition. So just in case anyone still uses the old function, let's ensure this can't be ignored when moving code to the new edition. Cc `@rust-lang/libs-api` Tracking: - https://github.com/rust-lang/rust/issues/124866
2024-08-14Auto merge of #128407 - Oneirical:feline-dotestication, r=jieyouxubors-46/+82
Migrate `min-global-align` and `no-alloc-shim` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: aarch64-apple try-job: test-various try-job: armhf-gnu try-job: aarch64-gnu try-job: aarch64-gnu
2024-08-14rewrite no-alloc-shim to rmakeOneirical-26/+57
2024-08-14rewrite min-global-align to rmakeOneirical-22/+27
2024-08-14Rollup merge of #129071 - Zalathar:sysroot-unstable, r=jieyouxu许杰友 Jieyou Xu (Joe)-2/+5
Port `run-make/sysroot-crates-are-unstable` to rmake I already have a more elaborate draft at #126231 that tries to port the underlying Python script to rmake, but there's no need for the removal of Makefiles to be held up on complex tasks like that, so this PR simply takes the trivial Makefile and converts it into a trivial rmake recipe. Part of #121876. r? ``@jieyouxu``
2024-08-14Rollup merge of #129059 - compiler-errors:subtyping-correct-type, r=lcnr许杰友 Jieyou Xu (Joe)-3/+50
Record the correct target type when coercing fn items/closures to pointers Self-explanatory. We were previously not recording the *target* type of a coercion as the output of an adjustment. This should remedy that. We must also modify the function pointer casts in MIR typeck to use subtyping, since those broke since #118247. r? lcnr
2024-08-14Rollup merge of #128954 - zachs18:fromresidual-no-default, r=scottmcm许杰友 Jieyou Xu (Joe)-3/+3
Explicitly specify type parameter on FromResidual for Option and ControlFlow. ~~Remove type parameter default `R = <Self as Try>::Residual` from `FromResidual`~~ _Specify default type parameter on `FromResidual` impls in the stdlib_ to work around https://github.com/rust-lang/rust/issues/99940 / https://github.com/rust-lang/rust/issues/87350 ~~as mentioned in https://github.com/rust-lang/rust/issues/84277#issuecomment-1773259264~~. This does not completely fix the issue, but works around it for `Option` and `ControlFlow` specifically (`Result` does not have the issue since it already did not use the default parameter of `FromResidual`). ~~(Does this need an ACP or similar?)~~ ~~This probably needs at least an FCP since it changes the API described in [the RFC](https://github.com/rust-lang/rfcs/pull/3058). Not sure if T-lang, T-libs-api, T-libs, or some combination (The tracking issue is tagged T-lang, T-libs-api).~~ This probably doesn't need T-lang input, since it is not changing the API of `FromResidual` from the RFC? Maybe needs T-libs-api FCP?
2024-08-14Rollup merge of #128570 - folkertdev:stabilize-asm-const, r=Amanieu许杰友 Jieyou Xu (Joe)-328/+264
Stabilize `asm_const` tracking issue: https://github.com/rust-lang/rust/issues/93332 reference PR: https://github.com/rust-lang/reference/pull/1556 this will probably require some CI wrangling (and a rebase), so let's get that over with even though the final required PR is not merged yet. r? `@ghost`
2024-08-14CommandExt::before_exec: deprecate safety in edition 2024Ralf Jung-0/+28
2024-08-14Auto merge of #129060 - matthiaskrgr:rollup-s72gpif, r=matthiaskrgrbors-13/+9
Rollup of 7 pull requests Successful merges: - #122884 (Optimize integer `pow` by removing the exit branch) - #127857 (Allow to customize `// TODO:` comment for deprecated safe autofix) - #129034 (Add `#[must_use]` attribute to `Coroutine` trait) - #129049 (compiletest: Don't panic on unknown JSON-like output lines) - #129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML) - #129056 (Fix one usage of target triple in bootstrap) - #129058 (Add mw back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Rollup merge of #129062 - Nadrieril:fix-129009, r=compiler-errorsMatthias Krüger-95/+132
Remove a no-longer-true assert Fixes https://github.com/rust-lang/rust/issues/129009 The assert was simply no longer true. I thought my test suite was thorough but I had not noticed these `let`-specific diagnostics codepaths. r? `@compiler-errors`
2024-08-14Rollup merge of #128759 - notriddle:notriddle/spec-to-string, ↵Matthias Krüger-0/+43
r=workingjubilee,compiler-errors alloc: add ToString specialization for `&&str` Fixes #128690
2024-08-14Rollup merge of #128410 - Oneirical:dwarf-fortestress, r=jieyouxuMatthias Krüger-112/+202
Migrate `remap-path-prefix-dwarf` `run-make` test to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Possibly my proudest branch name yet. try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-gnu-llvm-18
2024-08-14Port `run-make/sysroot-crates-are-unstable` to rmakeZalathar-2/+5
2024-08-13stabilize `asm_const`Folkert-328/+264
2024-08-13Remove a no-longer-true `assert`Nadrieril-95/+132
2024-08-13Use the right type when coercing fn items to pointersMichael Goulet-4/+21
2024-08-13Test showing previous behaviorMichael Goulet-0/+30
2024-08-13Rollup merge of #129050 - ↵Matthias Krüger-9/+4
GuillaumeGomez:generate-link-to-definition-warning, r=notriddle Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML Fixes https://github.com/rust-lang/docs.rs/issues/2581. It's a bit weird to emit an error in this case anyway, a warning is more than enough. r? ``@notriddle``
2024-08-13Rollup merge of #129034 - henryksloan:coroutine-must-use, r=joboetMatthias Krüger-2/+3
Add `#[must_use]` attribute to `Coroutine` trait [Coroutines tracking issue](https://github.com/rust-lang/rust/issues/43122) Like closures (`FnOnce`, `AsyncFn`, etc.), coroutines are lazy and do nothing unless called (resumed). Closure traits like `FnOnce` have `#[must_use = "closures are lazy and do nothing unless called"]` to catch likely bugs for users of APIs that produce them. This PR adds such a `#[must_use]` attribute to `trait Coroutine`.
2024-08-13Rollup merge of #127857 - tbu-:pr_deprecated_safe_todo, r=petrochenkovMatthias Krüger-2/+2
Allow to customize `// TODO:` comment for deprecated safe autofix Relevant for the deprecation of `CommandExt::before_exit` in #125970. Tracking: - #124866
2024-08-13Ignore cross compile check for `tests/run-make/doctests-keep-binaries-2024` testGuillaume Gomez-0/+2
2024-08-13Update `tests/run-make/doctests-keep-binaries-2024/rmake.rs` test to new ↵Guillaume Gomez-6/+5
run-make API
2024-08-13Run fmtGuillaume Gomez-2/+4
2024-08-13Fix commands syntax in rustdoc-ui testsGuillaume Gomez-9/+9
2024-08-13Only keep "useful" code in `tests/rustdoc-ui/2024-doctests-checks.rs`Guillaume Gomez-24/+8
2024-08-13Add doctest to ensure that doctests with crate-level attributes are not part ↵Guillaume Gomez-0/+34
of merged doctest
2024-08-13Add more merged doctests testsGuillaume Gomez-0/+21
2024-08-13Don't special-case if there is only one merged doctestGuillaume Gomez-39/+19
2024-08-13Run mergeable doctest as part of standalone doctests if there is only oneGuillaume Gomez-11/+30
2024-08-13Add 2024 edition doctests to cover corner casesGuillaume Gomez-0/+55
2024-08-13Disable merged doctests by defaultGuillaume Gomez-1/+0
2024-08-13Add new `run-make` tests for doctestsGuillaume Gomez-0/+171
2024-08-13Add/update `rustdoc-ui` tests to check new merged doctestsGuillaume Gomez-9/+42
2024-08-13Correctly handle doctests with invalid ASTGuillaume Gomez-0/+111
2024-08-13diagnostics: use `DeepRejectCtxt` for checkMichael Howell-0/+4
This makes more things match, particularly applicable blankets.
2024-08-13Update rustdoc-ui test for `--generate-link-to-definition` optionGuillaume Gomez-1/+4
2024-08-13Remove duplicated rustdoc ui testGuillaume Gomez-8/+0
2024-08-13Rollup merge of #129026 - ↵Matthias Krüger-1/+1
rcvalle:rust-cfi-move-cfi-ui-tests-to-cfi-directory, r=compiler-errors CFI: Move CFI ui tests to cfi directory Move the CFI ui tests to the cfi directory and removes the cfi prefix from tests file names similarly to how the cfi codegen tests are organized.
2024-08-13Rollup merge of #128643 - beetrees:ppc64-abi-fix, r=bjorn3Matthias Krüger-0/+132
Refactor `powerpc64` call ABI handling As the [specification](https://openpowerfoundation.org/specifications/64bitelfabi/) for the ELFv2 ABI states that returned aggregates are returned like arguments as long as they are at most two doublewords, I've merged the `classify_arg` and `classify_ret` functions to reduce code duplication. The only functional change is to fix #128579: the `classify_ret` function was incorrectly handling aggregates where `bits > 64 && bits < 128`. I've used the aggregate handling implementation from `classify_arg` which doesn't have this issue. `@awilfox` could you test this on `powerpc64-unknown-linux-musl`? I'm only able to cross-test on `powerpc64-unknown-linux-gnu` and `powerpc64le-unknown-linux-gnu` locally at the moment, and as a tier 3 target `powerpc64-unknown-linux-musl` has zero CI coverage. Fixes: #128579
2024-08-13`#[deprecated_safe_2024]`: Also use the `// TODO:` hint in the compiler errorTobias Bucher-2/+2
This doesn't work for translated compiler error messages.
2024-08-13Allow to customize `// TODO:` comment for deprecated safe autofixTobias Bucher-2/+2
Relevant for the deprecation of `CommandExt::before_exit` in #125970.
2024-08-13Auto merge of #128742 - RalfJung:miri-vtable-uniqueness, r=saethlinbors-77/+152
miri: make vtable addresses not globally unique Miri currently gives vtables a unique global address. That's not actually matching reality though. So this PR enables Miri to generate different addresses for the same type-trait pair. To avoid generating an unbounded number of `AllocId` (and consuming unbounded amounts of memory), we use the "salt" technique that we also already use for giving constants non-unique addresses: the cache is keyed on a "salt" value n top of the actually relevant key, and Miri picks a random salt (currently in the range `0..16`) each time it needs to choose an `AllocId` for one of these globals -- that means we'll get up to 16 different addresses for each vtable. The salt scheme is integrated into the global allocation deduplication logic in `tcx`, and also used for functions and string literals. (So this also fixes the problem that casting the same function to a fn ptr over and over will consume unbounded memory.) r? `@saethlin` Fixes https://github.com/rust-lang/miri/issues/3737
2024-08-12Add must_use attribute to Coroutine traitHenry Sloan-2/+3
2024-08-12CFI: Move CFI ui tests to cfi directoryRamon de C Valle-1/+1
Moves the CFI ui tests to the cfi directory and removes the cfi prefix from tests file names similarly to how the cfi codegen tests are organized.
2024-08-12Rollup merge of #129013 - Kobzol:remove-unused-git-clone-sha-file, r=jieyouxuMatthias Krüger-23/+0
Remove unused script from run-make tests Its last usage was removed in https://github.com/rust-lang/rust/pull/128636. Tracking issue: https://github.com/rust-lang/rust/issues/121876 r? jieyouxu
2024-08-12Rollup merge of #128912 - compiler-errors:do-not-recommend-impl, r=lcnrMatthias Krüger-0/+42
Store `do_not_recommend`-ness in impl header Alternative to #128674 It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.