about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-04-20Auto merge of #124114 - scottmcm:better-checked, r=workingjubileebors-81/+113
Make `checked` ops emit *unchecked* LLVM operations where feasible For things with easily pre-checked overflow conditions -- shifts and unsigned subtraction -- write the checked methods in such a way that we stop emitting wrapping versions of them. For example, today <https://rust.godbolt.org/z/qM9YK8Txb> neither ```rust a.checked_sub(b).unwrap() ``` nor ```rust a.checked_sub(b).unwrap_unchecked() ``` actually optimizes to `sub nuw`. After this PR they do. cc #103299
2024-04-20Auto merge of #124166 - oli-obk:define_opaque_types11, r=compiler-errorsbors-0/+18
Let inherent associated types constrain opaque types during projection r? `@compiler-errors` The same test ICEs on master: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=f4ff62663a5a3a0e16d00953ee7414d5
2024-04-19Rollup merge of #124149 - notriddle:notriddle/desc-alias, r=GuillaumeGomezMatthias Krüger-1/+5
rustdoc-search: fix description on aliases in results This needs to start downloading the descriptions after aliases have been added to the result set.
2024-04-19Rollup merge of #124106 - compiler-errors:tait-lifetime-dedup, r=oli-obkMatthias Krüger-1/+79
Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT Make it so that nested TAITs inherit the lifetimes from their parent item, not their parent TAIT. This is because we don't need to re-duplicate lifetimes for nested TAITs over and over, since the only lifetimes they can capture are from the parent item anyways. This mirrors how RPITs work. This is **not** a functional change that should be observable, since the whole point of duplicating lifetimes and marking the shadowed ones (and uncaptured ones) as bivariant is designed to *not* be observable. r? oli-obk
2024-04-19Rollup merge of #123729 - jieyouxu:rmake-refactor-2, r=oli-obkMatthias Krüger-42/+19
run-make: refactor out command wrappers for `clang` and `llvm-readobj` This PR is rebased on top of https://github.com/rust-lang/rust/pull/123699. This PR is a follow up to https://github.com/rust-lang/rust/pull/123612 to refactor out command wrappers into the support library for `llvm-readobj` and `clang`. r? ghost
2024-04-19Rollup merge of #123571 - WaffleLapkin:properly-adjust-never, r=compiler-errorsMatthias Krüger-24/+79
Correctly change type when adding adjustments on top of `NeverToAny` I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`. I rediscovered the issue when looking at #123482's crater run. r? compiler-errors Fixes #120600
2024-04-19Let inherent associated types constrain opaque types during projectionOli Scherer-0/+18
2024-04-19Auto merge of #118441 - GuillaumeGomez:display-stability-version, r=rustdocbors-5/+5
Always display stability version even if it's the same as the containing item Fixes https://github.com/rust-lang/rust/issues/118439. Currently, if the containing item's version is the same as the item's version (like a method), we don't display it on the item. This was something done on purpose as you can see [here](https://github.com/rust-lang/rust/blob/e9b7bf011478aa8c19ac49afc99853a66ba04319/src/librustdoc/html/render/mod.rs#L949-L955). It was implemented in https://github.com/rust-lang/rust/pull/30686. I think we should change this because on pages with a lot of items, if someone arrives (through the search or a link) to an item far below the page, they won't know the stability version unless they scroll to the top, which isn't great. You can see the result [here](https://rustdoc.crud.net/imperio/display-stability-version/std/pin/struct.Pin.html#method.new). r? `@notriddle`
2024-04-19Remove old ICE tests that no longer ICE (yay!)Maybe Waffle-24/+0
2024-04-19Correctly change type when adding adjustments on top of `NeverToAny`Maybe Waffle-31/+2
2024-04-19Add a test for `a == b` where `a: !, b: !`Maybe Waffle-0/+66
(this currently produces malformed mir: we call `eq` with first argument not being a reference)
2024-04-19Add regression test for issue 120600Maybe Waffle-0/+42
2024-04-18rustdoc-search: fix description on aliases in resultsMichael Howell-1/+5
This needs to start downloading the descriptions after aliases have been added to the result set.
2024-04-18Rollup merge of #124110 - beetrees:neg-f16-f128, r=compiler-errorsJubilee-0/+16
Fix negating `f16` and `f128` constants Make `f16` and `f128` constants respect `neg` in `parse_float_into_scalar`. Tracking issue: #116909 ```@rustbot``` label +F-f16_and_f128
2024-04-18Rollup merge of #123935 - tstsrt:fix-115423, r=oli-obkJubilee-0/+70
Don't inline integer literals when they overflow - new attempt Basically #116633 but I implemented the suggested changes. Fixes #115423. Fixes #116631. This is my first contribution to this repo so please let me know if I'm supposed to change something :)
2024-04-18Rollup merge of #123752 - estebank:emoji-prefix, r=wesleywiserJubilee-0/+22
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix #123696.
2024-04-18Make `checked` ops emit *unchecked* LLVM operations where feasibleScott McMurray-81/+113
For things with easily pre-checked overflow conditions -- shifts and unsigned subtraction -- write then checked methods in such a way that we stop emitting wrapping versions of them. For example, today <https://rust.godbolt.org/z/qM9YK8Txb> neither ```rust a.checked_sub(b).unwrap() ``` nor ```rust a.checked_sub(b).unwrap_unchecked() ``` actually optimizes to `sub nuw`. After this PR they do.
2024-04-19Auto merge of #124038 - matthiaskrgr:one_or_two_more_tests, r=jieyouxubors-0/+297
crashes: add a couple more ice tests
2024-04-18Auto merge of #119912 - notriddle:notriddle/reexport-dedup, r=GuillaumeGomezbors-3/+136
rustdoc-search: single result for items with multiple paths Part of #15723 Preview: https://notriddle.com/rustdoc-html-demo-9/reexport-dup/std/index.html?search=hashmap This change uses the same "exact" paths as trait implementors and type alias inlining to track items with multiple reachable paths. This way, if you search for `vec`, you get only the `std` exports of it, and not the one from `alloc`. It still includes all the items in the search index so that you can search for them by all available paths. For example, try `core::option` and `std::option`, and notice that the results page doesn't show duplicates, but still shows all the items in their respective crates.
2024-04-18Auto merge of #123949 - scottmcm:debug-no-means-no-debug-info-when-inlined, ↵bors-1190/+800
r=oli-obk,onur-ozkan At debuginfo=0, don't inline debuginfo when inlining See https://github.com/rust-lang/rust/pull/123949#issuecomment-2060493285 for info.
2024-04-18crashes: add a couple more testsMatthias Krüger-0/+297
2024-04-18The ICE in 121127 needs debuginfoScott McMurray-1/+2
2024-04-18Ensure `[rust] debuginfo-level-std` doesn't change core's MIRScott McMurray-156/+16
2024-04-18Update `checked_ops` so 32- and 64-bit gets the same checksScott McMurray-19/+174
2024-04-18At debuginfo=0, don't inline debuginfo when inliningScott McMurray-1193/+787
2024-04-18Auto merge of #124072 - saethlin:less-sysroot-libc-misc, r=jieyouxubors-38/+32
Remove libc from more tests The goal here is to trim down the number of tests that depend on libc from the sysroot to make https://github.com/rust-lang/rust/pull/123938 more plausible. This PR is a few simple cases that I missed in https://github.com/rust-lang/rust/pull/123943.
2024-04-18Add an exception for windows-msvcBen Kimock-0/+9
2024-04-18Auto merge of #124111 - matthiaskrgr:rollup-cmmkryf, r=matthiaskrgrbors-4/+19
Rollup of 5 pull requests Successful merges: - #124041 (Fix copy path button) - #124047 (Match ergonomics 2024: miscellaneous code cleanups) - #124064 (Move confusing comment about otherwise blocks in `lower_match_tree`) - #124090 (llvm: update riscv target feature to match LLVM 19) - #124100 (fix: make `str::from_raw_parts_mut` `mut`) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-18Rollup merge of #124090 - durin42:llvm-19-riscv-feature, r=cuviperMatthias Krüger-3/+3
llvm: update riscv target feature to match LLVM 19 In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again. ``@rustbot`` label: +llvm-main
2024-04-18Rollup merge of #124047 - Jules-Bertholet:match-ergonomics-cleanups, r=NadrierilMatthias Krüger-1/+1
Match ergonomics 2024: miscellaneous code cleanups - Store `ByRef` instead of `BindingAnnotation` in `PatInfo` - Rename `BindingAnnotation` to `BindingMode` r? ``@Nadrieril`` cc #123076 ``@rustbot`` label A-patterns
2024-04-18Rollup merge of #124041 - GuillaumeGomez:fix-copy-path-button, r=notriddleMatthias Krüger-0/+15
Fix copy path button Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in https://github.com/rust-lang/rust/pull/123706 forgot to update the JS (it contained an image before but not anymore). I had to make some small changes in the CSS to fix the display when the button was clicked as well. r? ``@notriddle``
2024-04-18Fix negating `f16` and `f128` constantsbeetrees-0/+16
2024-04-18Auto merge of #124046 - matthiaskrgr:one_or_two_more_tests____some_on_top, ↵bors-0/+723
r=jieyouxu crashes: add even more tests?!? adds more tests that were not already added with https://github.com/rust-lang/rust/pull/124038 from the past 10 months or so. Need a couple more passes through the tracker to filter out more missing ice /fixed tests but we're slowly getting there.
2024-04-18crashes: add even more tests?!?Matthias Krüger-0/+723
2024-04-18Auto merge of #122684 - oli-obk:delay_interning_errors_to_after_validaiton, ↵bors-477/+276
r=RalfJung Delay interning errors to after validation fixes https://github.com/rust-lang/rust/issues/122398 fixes #122548 This improves diagnostics since validation errors are usually more helpful compared with interning errors that just make broad statements about the entire constant r? `@RalfJung`
2024-04-17Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAITMichael Goulet-1/+79
2024-04-17llvm: update riscv target feature to match LLVM 19Augie Fackler-3/+3
In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again. @rustbot label: +llvm-main
2024-04-17Auto merge of #123936 - Mark-Simulacrum:zst-no-alloc, r=oli-obkbors-9/+14
Codegen ZSTs without an allocation This makes sure that &[] is equivalent to unsafe code (from_raw_parts(dangling, 0)). No new stable guarantee is intended about whether or not we do this, this is just an optimization. This regressed in #67000 (no comments I can see about that regression in the PR, though it did change the test modified here). We had previously performed this optimization since #63635.
2024-04-17tests: update cross-lang-lto-riscv-abi to use command wrappers许杰友 Jieyou Xu (Joe)-42/+19
2024-04-17Auto merge of #124084 - matthiaskrgr:rollup-h42psbx, r=matthiaskrgrbors-54/+104
Rollup of 9 pull requests Successful merges: - #116957 (meta: notify #t-rustdoc Zulip stream on backport nominations) - #122201 (Document overrides of `clone_from()` in core/std) - #122723 (Use same file permissions for ar_archive_writer as the LLVM archive writer) - #124030 (interpret: pass MemoryKind to adjust_alloc_base_pointer) - #124037 (Don't ascend into parent bodies when collecting stmts for possible return suggestion) - #124049 (Stabilize `const_io_structs`) - #124062 (Add another expression to weird-exprs.rs) - #124066 (Don't error on subtyping of equal types) - #124073 (Remove libc from rust_get_test_int uses) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-17Rollup merge of #124073 - saethlin:rust-get-test-int, r=wesleywiserMatthias Krüger-54/+18
Remove libc from rust_get_test_int uses `rust_test_helpers.c` has a few unfortunate signatures which have made some of our UI tests _technically_ need the `libc` crate. This is my attempt to evict the need of `libc` for `rust_get_test_int`. I've deleted `tests/ui/abi/foreign/foreign-no-abi.rs` because the test was originally written to check that `native mod` will compile without an ABI specifier. `native mod` was removed years before 1.0 and the test hasn't checked for anything for a long time.
2024-04-17Rollup merge of #124062 - allgoewer:fish-fight, r=oli-obkMatthias Krüger-0/+15
Add another expression to weird-exprs.rs I'm almost feeling bad for this but I decided I don't. Feel free to close if you don't approve.
2024-04-17Rollup merge of #124037 - compiler-errors:dont-parent-body, r=michaelwoeristerMatthias Krüger-0/+39
Don't ascend into parent bodies when collecting stmts for possible return suggestion Fixes #124022
2024-04-17Rollup merge of #122723 - bjorn3:archive_writer_fixes, r=nnethercoteMatthias Krüger-0/+32
Use same file permissions for ar_archive_writer as the LLVM archive writer This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (https://github.com/rust-lang/rust/issues/107407) to fix all known regressions. Fixes https://github.com/rust-lang/rust/issues/107495
2024-04-17Add GUI test for copy path buttonGuillaume Gomez-0/+15
2024-04-17Auto merge of #123674 - oli-obk:bogus_note, r=estebankbors-107/+47
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes #123292 Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
2024-04-17Rename `BindingAnnotation` to `BindingMode`Jules Bertholet-1/+1
2024-04-17Remove libc from rust_get_test_int usesBen Kimock-54/+18
2024-04-17Use the default file permissions when writingbjorn3-1/+10
static libraries with ar_archive_writer Fixes #107495
2024-04-17Add regression test for #107495bjorn3-0/+23