about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-09-19test: Use SVG for terminal url test Scott Schafer-13/+99
2025-09-19chore(compiletest): Use newest anstyle-svg versionScott Schafer-17/+17
2025-09-19tests: relax expectations after llvm change 902ddda120a5Augie Fackler-4/+13
LLVM 22 is able to drop assumes that seem to not help further optimizations, which actually seems to dramatically _help_ further optimizations in some of our small test cases.
2025-09-19mbe: Fix feature gate for `macro_derive`Josh Triplett-2/+2
2025-09-19Rollup merge of #146541 - joboet:simplify-lookup-host, r=tgross35Stuart Cook-19/+1
std: simplify host lookup The logic for splitting up a string into a hostname and port is currently duplicated across (nearly) all of the networking implementations in `sys`. Since it does not actually rely on any system internals, this PR moves it to the `ToSocketAddr` implementation for `&str`, making it easier to discover and maintain. On the other hand, the `ToSocketAddr` implementation (or rather the `resolve_socket_addr` function) contained logic to overwrite the port on the socket addresses returned by `LookupHost`, even though `LookupHost` is already aware of the port and sets the port already on Xous. This PR thus removes this logic by moving the responsibility of setting the port to the system-specific `LookupHost` implementation. As a consequence of these changes, there remains only one way of creating `LookupHost`, hence I've removed the `TryFrom` implementations in favour of a `lookup_host` function, mirroring other, public iterator-based features. And finally, I've simplified the parsing logic responsible for recognising IP addresses passed to `<(&str, u16)>::to_socket_addrs()` by using the `FromStr` impl of `IpAddr` rather than duplicating the parsing for both IP versions.
2025-09-19Fix test suite in iOS/tvOS/watchOS/visionOS simulatorMads Marquart-6/+83
2025-09-19std: simplify host lookupjoboet-19/+1
2025-09-19autodiff: recurion added for typetreeKaran Janthe-6/+118
2025-09-19autodiff: fixed test to be more precise for type tree checkingKaran Janthe-18/+60
2025-09-19autodiff: struct support in typetreeKaran Janthe-0/+35
2025-09-19autodiff: tuple support in typetreeKaran Janthe-0/+28
2025-09-19autodiff: slice support in typetreeKaran Janthe-0/+29
2025-09-19autodiff: add TypeTree support for arraysKaran Janthe-0/+28
2025-09-19added typetree support for memcpyKaran Janthe-13/+103
2025-09-19Add TypeTree tests for scalar typesKaran Janthe-0/+154
- Add specific tests for f32, f64, i32, f16, f128 TypeTree generation - Verify correct enzyme_type metadata for each scalar type - Ensure TypeTree metadata matches expected Enzyme format Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-09-19Update TypeTree tests to verify metadata attachmentKaran Janthe-28/+29
- Fix nott-flag test to emit LLVM IR and check enzyme_type attributes - Replace TODO comments with actual TypeTree metadata verification - Test that NoTT flag properly disables TypeTree generation - Test that TypeTree enabled generates proper enzyme_type attributes Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-09-19autodiff: Add basic TypeTree with NoTT flagKaran Janthe-0/+111
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-09-18Auto merge of #146727 - matthiaskrgr:rollup-98812uj, r=matthiaskrgrbors-65/+789
Rollup of 6 pull requests Successful merges: - rust-lang/rust#146434 (c-variadic: allow c-variadic inherent and trait methods) - rust-lang/rust#146487 (Improve `core::num` coverage) - rust-lang/rust#146597 (Add span for struct tail recursion limit error) - rust-lang/rust#146622 (Add regression test for issue rust-lang/rust#91831) - rust-lang/rust#146717 (Clean up universe evaluation during type test evaluation) - rust-lang/rust#146723 (Include patch in release notes) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-18Rollup merge of #146622 - aklaiber:91831_add_regression_test, r=jdonszelmannMatthias Krüger-0/+33
Add regression test for issue #91831 The requested test for rust-lang/rust#91831. I'm unsure about the filename, the file structure in `tests/ui/lifetimes/lifetime-errors/` isn't entirely clear to me. Any suggestions? Closes rust-lang/rust#91831
2025-09-18Rollup merge of #146597 - modhanami:add-struct-tail-recursion-limit-span, ↵Matthias Krüger-31/+45
r=oli-obk Add span for struct tail recursion limit error Fixes rust-lang/rust#135629 Changes 1. Add span to RecursionLimitReached 2. Add ObligationCause parameter to struct_tail_raw 4. Update call sites to pass nearby ObligationCause or create one 5. Update affected .stderr
2025-09-18Rollup merge of #146434 - folkertdev:c-variadic-inherent-methods, ↵Matthias Krüger-34/+711
r=workingjubilee c-variadic: allow c-variadic inherent and trait methods tracking issue: https://github.com/rust-lang/rust/issues/44930 Continuing the work of https://github.com/rust-lang/rust/pull/146342, allow inherent and trait methods to be c-variadic. However, a trait that contains a c-variadic method is no longer dyn-compatible. There is, presumably, some way to make c-variadic methods dyn-compatible. However currently, we don't have confidence that it'll work reliably: when methods from a `dyn` object are cast to a function pointer, a `ReifyShim` is created. If that shim is c-variadic, it would need to forward the C variable argument list. That does appear to work, because the `va_list` is not represented in MIR at all in this case, so the registers from the call site are untouched by the shim and can be read by the actual implementation. That just does not seem like a solid implementation. Also, intuitively, why would c-variadic function, primarily needed for FFI, need to be used with `dyn` objects at all? We can revisit this limitation if a need arises. r? `@workingjubilee`
2025-09-18Auto merge of #145993 - lcnr:allow-calling-opaques, r=BoxyUwUbors-28/+542
`-Znext-solver` allow `ExprKind::Call` for not-yet defined opaques Based on https://github.com/rust-lang/rust/pull/146329. Revival of rust-lang/rust#140496. See the comment on `OpaqueTypesJank`. I've used the following document while working on this https://hackmd.io/Js61f8PRTcyaiyqS-fH9iQ. Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/181. It does introduce one subtle footgun we may want to handle before stabilization, opened https://github.com/rust-lang/trait-system-refactor-initiative/issues/230 for that. Also cc https://github.com/rust-lang/trait-system-refactor-initiative/issues/231 for deref and index operations r? `@BoxyUwU`
2025-09-18Enforce E0719 only for trait aliasesJules Bertholet-1067/+627
2025-09-18internal constraints are better than placeholder outliveslcnr-0/+80
2025-09-18Add regression test for issue 91831aklaiber-0/+33
2025-09-18add tests, silence type annotations needed errors for opaqueslcnr-23/+212
2025-09-18support calls on opaque types :<lcnr-5/+330
2025-09-18Auto merge of #142544 - Sa4dUs:prevent-abi-changes, r=ZuseZ4bors-0/+227
Prevent ABI changes affect EnzymeAD This PR handles ABI changes for autodiff input arguments to improve Enzyme compatibility. Fundamentally this adjusts activities when a function argument is lowered as an `ScalarPair`, so there's no mismatch between diff activities and args. Also removes activities corresponding to ZSTs. fixes: https://github.com/rust-lang/rust/issues/144025 r? `@ZuseZ4`
2025-09-18Rollup merge of #146566 - cjgillot:mir-overlap-lint, r=saethlinStuart Cook-1/+1
Lint more overlapping assignments in MIR. In an effort to make bugs like https://github.com/rust-lang/rust/issues/146383 more easily discovered, this PR extends the "overlapping assignment" MIR lint. I had to whitelist some rvalues, as they are actually allowed to alias, like `a = a + 1`.
2025-09-17Lint overlapping assignments in MIR.Camille Gillot-1/+1
2025-09-17Rollup merge of #146536 - omskscream:#133895/clean-ui-tests, r=davidtwcoJana Dönszelmann-34/+60
clean up several trait related UI tests Part of rust-lang/rust#133895 Cleaned up several `issue-xxxx` trait related tests from `/tests/ui/issues`, one commit per issue for review. Will squash them once approved. Related issues: rust-lang/rust#19479 rust-lang/rust#2284 rust-lang/rust#18088 rust-lang/rust#21950
2025-09-17Support ZST argsMarcelo Domínguez-0/+17
2025-09-17Add test for autodiff abi handlingMarcelo Domínguez-0/+210
2025-09-17Auto merge of #142915 - cjgillot:dest-prop-default, r=saethlinbors-677/+588
Enable DestinationPropagation by default This PR proposes to perform destination propagation on MIR. Most of the pass was fully rewritten by `@JakobDegen` in rust-lang/rust#96451. This pass is quite heavy, as it needs to perform and save the results of a full liveness dataflow analysis. This accounts for ~50% of the pass' runtime. Perf sees a few decent savings in later llvm passes, but also sizeable régressions when there are no savings to balance this pass' runtime.
2025-09-17Rollup merge of #146588 - Gelbpunkt:musl-default-linking-test, r=jieyouxuStuart Cook-9/+1
tests/run-make: Update list of statically linked musl targets All of the tier 3 targets in the list now link dynamically by default (except `mips64el-unknown-linux-muslabi64`, I apparently overlooked that one in my PR that changed this). Adjust the list of targets expected to link statically accordingly. See also https://github.com/rust-lang/rust/pull/144410, which changed these targets. Target by target: - `mips64-unknown-linux-musl`: this target does not exist AFAICT - `mips64-unknown-linux-muslabi64`: updated in the linked PR - `powerpc-unknown-linux-musl`: updated in the linked PR - `powerpc-unknown-linux-muslspe`: updated in the linked PR - `powerpc64-unknown-linux-musl`: updated in the linked PR - `riscv32gc-unknown-linux-musl`: updated in the linked PR - `s390x-unknown-linux-musl`: updated in the linked PR - `thumbv7neon-unknown-linux-musleabihf`: updated in the linked PR
2025-09-17Rollup merge of #146581 - estebank:issue-146489, r=lcnrStuart Cook-22/+16
Detect attempt to use var-args in closure ``` error: unexpected `...` --> $DIR/no-closure.rs:11:14 | LL | let f = |...| {}; | ^^^ not a valid pattern | = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list error: unexpected `...` --> $DIR/no-closure.rs:16:17 | LL | let f = |_: ...| {}; | ^^^ | = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list ``` Fix rust-lang/rust#146489, when trying to use c-style var-args in a closure. We emit a more targeted message. We also silence inference errors when the pattern is `PatKind::Err`.
2025-09-17Rollup merge of #146564 - cjgillot:mir-nolen, r=scottmcmStuart Cook-106/+1315
Remove Rvalue::Len again. Now that we have `RawPtrKind::FakeForPtrMetadata`, we can reimplement `Rvalue::Len` using `PtrMetadata(&raw const (fake) place)`. r? ``@scottmcm``
2025-09-17Rollup merge of #146552 - cjgillot:resume-noremap, r=jackh726Stuart Cook-196/+617
StateTransform: Do not renumber resume local. MIR parameters are not explicitly assigned-to when entering the MIR body. If we want to save their values inside the coroutine state, we need to do so explicitly. This was done by renaming the `_2` local, and introducing an explicit assignment pre-transform. This particular trick confuses me. This version makes explicit that we are assigning parameters to saved locals. r? ``@dingxiangfei2009``
2025-09-17Rollup merge of #146259 - camsteffen:remove-the-box, r=jackh726Stuart Cook-3/+27
Suggest removing Box::new instead of unboxing it
2025-09-17Rollup merge of #145838 - dianne:non-extending-super-let, r=jackh726,traviscrossStuart Cook-0/+240
don't apply temporary lifetime extension rules to non-extended `super let` Reference PR: rust-lang/reference#1980 This changes the semantics for `super let` (and macros implemented in terms of it, such as `pin!`, `format_args!`, `write!`, and `println!`) as suggested by ````@theemathas```` in https://github.com/rust-lang/rust/issues/145784#issuecomment-3218658335, making `super let` initializers only count as [extending expressions](https://doc.rust-lang.org/nightly/reference/destructors.html#extending-based-on-expressions) when the `super let` itself is within an extending block. Since `super let` initializers aren't temporary drop scopes, their temporaries outside of inner temporary scopes are effectively always extended, even when not in extending positions; this only affects two cases as far as I can tell: - Block tail expressions in Rust 2024. This PR makes `f(pin!({ &temp() }))` drop `temp()` at the end of the block in Rust 2024, whereas previously it would live until after the call to `f` because syntactically the `temp()` was in an extending position as a result of `super let` in `pin!`'s expansion. - `super let` nested within a non-extended `super let` is no longer extended. i.e. a normal `let` is required to treat `super let`s as extending (in which case nested `super let`s will also be extending). Closes rust-lang/rust#145784 This is a breaking change. Both static and dynamic semantics are affected. The most likely breakage is for programs to stop compiling, but it's technically possible for drop order to silently change as well (as in rust-lang/rust#145784). Since this affects stable macros, it probably would need a crater run. Nominating for discussion alongside rust-lang/rust#145784: ````@rustbot```` label +I-lang-nominated +I-libs-api-nominated Tracking issue for `super let`: rust-lang/rust#139076
2025-09-17Rollup merge of #145660 - jbatez:darwin_objc, r=jdonszelmann,madsmtm,tmandryStuart Cook-0/+726
initial implementation of the darwin_objc unstable feature Tracking issue: https://github.com/rust-lang/rust/issues/145496 This feature makes it possible to reference Objective-C classes and selectors using the same ABI used by native Objective-C on Apple/Darwin platforms. Without it, Rust code interacting with Objective-C must resort to loading classes and selectors using costly string-based lookups at runtime. With it, these references can be loaded efficiently at dynamic load time. r? ```@tmandry``` try-job: `*apple*` try-job: `x86_64-gnu-nopt`
2025-09-17Rollup merge of #145181 - Borgerr:remove-fixme-from-has-sigdrop, r=lcnrStuart Cook-0/+18
remove FIXME block from `has_significant_drop`, it never encounters inference variables The `FIXME` block in `Ty::has_significant_drop` is outdated as related queries can now handle type inference. https://github.com/rust-lang/rust/blob/321a89bec57b8ca723d1af8f784490b950458c6a/compiler/rustc_middle/src/ty/util.rs#L1378-L1389 Closes rust-lang/rust#86868 (other places mentioned in the issue have been resolved, or moved to other issues) r? types
2025-09-17Rollup merge of #145071 - cuviper:min-llvm-20, r=nikicStuart Cook-254/+69
Update the minimum external LLVM to 20 With this change, we'll have stable support for LLVM 20 and 21. For reference, the previous increase to LLVM 19 was rust-lang/rust#139275. cc ```@rust-lang/wg-llvm``` r? nikic
2025-09-16Bless ui.Camille Gillot-25/+21
2025-09-16Do not renumber resume local.Camille Gillot-225/+208
2025-09-16Add test.Camille Gillot-9/+451
2025-09-16Add test.Camille Gillot-1/+724
2025-09-16Remove Rvalue::Len.Camille Gillot-106/+592
2025-09-16Enable DestinationPropagation by default.Camille GILLOT-677/+588
2025-09-16Auto merge of #146650 - matthiaskrgr:rollup-rjrklz9, r=matthiaskrgrbors-14/+31
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146442 (Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary) - rust-lang/rust#146474 (Improve `core::ascii` coverage) - rust-lang/rust#146605 (Bump rustfix 0.8.1 -> 0.8.7) - rust-lang/rust#146611 (bootstrap: emit hint if a config key is used in the wrong section) - rust-lang/rust#146618 (Do not run ui test if options specific to LLVM are used when another codegen backend is used) r? `@ghost` `@rustbot` modify labels: rollup