about summary refs log tree commit diff
path: root/tests/ui
AgeCommit message (Collapse)AuthorLines
2025-09-27Put back the `doc_cfg` code behind a nightly featureGuillaume Gomez-5/+14
2025-09-27Remove ui test for doc_cfg feature gateGuillaume Gomez-14/+5
2025-09-27Auto merge of #146636 - Mark-Simulacrum:bootstrap-bump, r=jieyouxubors-10/+5
Bump bootstrap compiler to 1.91 beta https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-tuesday
2025-09-27Auto merge of #147074 - matthiaskrgr:rollup-sm3owsd, r=matthiaskrgrbors-342/+509
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145113 (resolve: Do not finalize shadowed bindings) - rust-lang/rust#146523 (Demote both armebv7r-none-* targets.) - rust-lang/rust#146704 (port `#[debugger_visualizer]` to the new attribute system) - rust-lang/rust#146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu) - rust-lang/rust#146778 (Use standard attribute logic for allocator shim) - rust-lang/rust#146849 (Reduce some uses of `LegacyBang`) - rust-lang/rust#147016 (fix doc comments to be more standard) - rust-lang/rust#147027 (Add new `tyalias` intra-doc link disambiguator) - rust-lang/rust#147031 (mbe: Simplify check_redundant_vis_repetition) - rust-lang/rust#147058 (Ignore more failing ui tests for GCC backend) Failed merges: - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-26Apply cfg(bootstrap) replacementMark Rousskov-9/+4
2025-09-26Update CURRENT_RUSTC_VERSION post-bumpMark Rousskov-1/+1
2025-09-26Rollup merge of #147058 - GuillaumeGomez:ignore-more-ui-tests, r=KobzolMatthias Krüger-297/+440
Ignore more failing ui tests for GCC backend Needed for https://github.com/rust-lang/rust/pull/146414. r? ``@Kobzol``
2025-09-26Rollup merge of #146704 - jdonszelmann:port-debug-visualizer, r=petrochenkovMatthias Krüger-45/+42
port `#[debugger_visualizer]` to the new attribute system
2025-09-26Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnrMatthias Krüger-0/+27
resolve: Do not finalize shadowed bindings I.e. do not mark them as used, or non-speculatively loaded, or similar. Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-26add testslcnr-0/+161
2025-09-26move testslcnr-0/+0
2025-09-26allow method calls on opaqueslcnr-139/+141
2025-09-26use `try_structurally_resolve_type` for method receiverlcnr-34/+51
We'll still error due to the `opt_bad_ty` of `method_autoderef_steps`. This slightly worsens the span of `infer_var.method()` which is now the same as for `Box::new(infer_var).method()`. Unlike `structurally_resolve_type`, `probe_op` does not check whether the infcx is already tainted, so this results in 2 previously not emitted errors.
2025-09-26Ignore more failing ui tests for GCC backendGuillaume Gomez-297/+440
2025-09-26Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkovbors-16/+15
Extended temporary argument to format_args!() in all cases Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
2025-09-25Auto merge of #146919 - lcnr:yeet-fast-path, r=fee1-deadbors-27/+40
remove incorrect fast path Using `tcx.is_copy_modulo_regions` drops information from the current `typing_env`. Writing a regression test for this is really hard. We need to prove `Copy` of something that doesn't directly reference a coroutine or an opaque, but does so indirectly. cc rust-lang/rust#146813.
2025-09-25resolve: Do not finalize shadowed bindingsVadim Petrochenkov-0/+27
I.e. do not mark them as used, or non-speculative loaded, or similar. Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-25Auto merge of #147019 - Zalathar:rollup-boxzbmo, r=Zalatharbors-16/+129
Rollup of 14 pull requests Successful merges: - rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns) - rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const) - rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`) - rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization) - rust-lang/rust#146735 (unstably constify float mul_add methods) - rust-lang/rust#146737 (f16_f128: enable some more tests in Miri) - rust-lang/rust#146766 (Add attributes for #[global_allocator] functions) - rust-lang/rust#146905 (llvm: update remarks support on LLVM 22) - rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`) - rust-lang/rust#147005 (Small string formatting cleanup) - rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`) - rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool) - rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`) - rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-25Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJungStuart Cook-16/+83
Add an attribute to check the number of lanes in a SIMD vector after monomorphization Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages. Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs. r? ``@RalfJung`` cc ``@workingjubilee`` ``@programmerjake``
2025-09-25Rollup merge of #145277 - dingxiangfei2009:fold-coercion-into-const, ↵Stuart Cook-0/+46
r=nnethercote Do not materialise X in [X; 0] when X is unsizing a const Fix rust-lang/rust#143671 It turns out that MIR builder materialise `X` in `[X; 0]` into a temporary local when `X` is unsizing a `const`. This led to a confusing call to destructor of `X` when such a destructor is declared. [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=8dfc933af89efeb89c881bc77498ba63) This patch may miss out other cases that we should avoid materialisation in case of `[X; 0]`. Suggestions to include is most welcome!
2025-09-25Auto merge of #147003 - matthiaskrgr:rollup-b5z9uiz, r=matthiaskrgrbors-13/+27
Rollup of 7 pull requests Successful merges: - rust-lang/rust#146556 (Fix duration_since panic on unix when std is built with integer overflow checks) - rust-lang/rust#146679 (Clarify Display for error should not include source) - rust-lang/rust#146753 (Improve the pretty print of UnstableFeature clause) - rust-lang/rust#146894 (Improve derive suggestion of const param) - rust-lang/rust#146950 (core: simplify `CStr::default()`) - rust-lang/rust#146958 (Fix infinite recursion in Path::eq with String) - rust-lang/rust#146971 (fix ICE in writeback due to bound regions) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-24Rollup merge of #146971 - lcnr:fix-writeback, r=BoxyUwUMatthias Krüger-0/+14
fix ICE in writeback due to bound regions fixes rust-lang/rust#117808 r? `@BoxyUwU`
2025-09-24Rollup merge of #146894 - tiif:suggest_feature_attr, r=BoxyUwUMatthias Krüger-7/+7
Improve derive suggestion of const param Make the suggestion not to remove the adt and use the name of the adt variant in the diagnostic. r? `@BoxyUwU`
2025-09-24Rollup merge of #146753 - tiif:unsatisfiable-unstable-feature, r=BoxyUwUMatthias Krüger-6/+6
Improve the pretty print of UnstableFeature clause As per https://github.com/rust-lang/rust/pull/145095#discussion_r2349439492, we could make the diagnostic for unsatisfiable ``UnstableFeature`` clause better. r? `@BoxyUwU`
2025-09-24Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obkMatthias Krüger-22/+119
const-eval: better wording for errors involving maybe-null pointers Fixes https://github.com/rust-lang/rust/issues/146748 r? ``@oli-obk``
2025-09-24Rollup merge of #146959 - tshepang:patch-2, r=nnethercoteMatthias Krüger-3/+3
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions Also - add Reference id - fix typo
2025-09-24Rollup merge of #146857 - tnuha:revert_self_has_no_region_infer, r=lcnrMatthias Krüger-0/+26
revert change removing `has_infer` check. Commit conservatively patch… …es for now, but more development proceeding. Hotfix for rust-lang/rust#146852.
2025-09-24Rollup merge of #146711 - lcnr:fix-placeholder-ice, r=lqdMatthias Krüger-0/+80
fix 2 borrowck issues fixes https://github.com/rust-lang/rust/issues/146467 cc ``@amandasystems`` our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints. The path was something like - `'placeholderU2: 'placeholderU1` (`Internal`) - `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`) It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc https://github.com/rust-lang/rust/pull/142623. --- separately fixes https://github.com/rust-lang/rust/pull/145925#issuecomment-3303733357 by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable :thinking: see the comments in `TypeChecker::check_promoted` cc ``@lqd`` r? lqd
2025-09-25mark THIR use as candidate for constness checkDing Xiang Fei-0/+8
2025-09-25add test fixture for newly allowed const exprDing Xiang Fei-0/+8
Signed-off-by: Ding Xiang Fei <dingxiangfei2009@protonmail.ch> Co-authored-by: Theemathas Chirananthavat <theemathas@gmail.com>
2025-09-25do not materialise X in [X; 0] when X is unsizing a constDing Xiang Fei-0/+30
2025-09-24Improve the pretty print of UnstableFeature clausetiif-6/+6
2025-09-24Improve derive suggestion of const paramtiif-7/+7
Make the suggestion not to remove the adt and use the name of the adt variant
2025-09-24Auto merge of #146338 - CrooseGit:dev/reucru01/AArch64-enable-GCS, ↵bors-2/+2
r=Urgau,davidtwco Extends AArch64 branch protection support to include GCS Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
2025-09-24add testlcnr-0/+40
2025-09-24const validation: better error for maybe-null referencesRalf Jung-19/+81
2025-09-24const-eval: improve and actually test the errors when pointers might be ↵Ralf Jung-7/+42
outside the range of a scalar
2025-09-24allow bound regions in writebacklcnr-0/+14
2025-09-24temporary-lifetime-extension-tuple-ctor.rs: make usable on all editionsTshepang Mbambo-3/+3
Also - add Reference id - fix typo
2025-09-23Add an attribute to check the number of lanes in a SIMD vector after ↵Caleb Zulawski-16/+83
monomorphization Unify zero-length and oversized SIMD errors
2025-09-23Rollup merge of #146907 - cyrgani:146537-test, r=nnethercoteMatthias Krüger-0/+34
add regression test for issue 146537 Adds a test based on the reduction in https://github.com/rust-lang/rust/issues/146537#issuecomment-3289438439. This was already fixed in rust-lang/rust#142882 before the issue was even reported, but no test for it was added yet.
2025-09-23Rollup merge of #146899 - Teapot4195:issue-146847-fix, r=nnethercoteMatthias Krüger-0/+31
Fix a crash/mislex when more than one frontmatter closing possibility is considered When the less fortunate recovery path for frontmatters are taken, if the lexer considers more than one possible frontmatter closing possibility, the current index is entirely mis-tracked and can result in bump_bytes landing in the middle of a multichar unicode character. This fixes it by tracking the actual base index and updating it as it considers additional closing possibilities. fixes rust-lang/rust#146847
2025-09-23revert change removing `has_infer` check. Commit conservatively patches for ↵ash-0/+26
now, but more development proceeding. Also contains a more concise test
2025-09-23Rollup merge of #146731 - Muscraft:svg-test-terminal-url, r=jdonszelmannMatthias Krüger-30/+116
test: Use SVG for terminal url test I came across the test for `-Zterminal-urls` and found its output a bit hard to read. So, I decided to switch it to an SVG test, as I found it easier to differentiate the link and link text. Note: `anstyle-svg` needed to be upgraded to at least `0.1.8` to support links in SVGs, so I went ahead and upgraded it to the latest version (`0.1.11`).
2025-09-23Rollup merge of #146632 - ctz:jbp-adaptor-spelling, r=petrochenkovMatthias Krüger-2/+2
Fix uses of "adaptor" These docs are in en_US, so "adapter" is the correct spelling (and indeed used in the next line.) A second commit comes along for the ride to fix other instances in non-rustdoc comments.
2025-09-23remove test for no_corelcnr-27/+0
2025-09-23Auto merge of #146317 - saethlin:panic=immediate-abort, r=nnethercotebors-9/+153
Add panic=immediate-abort MCP: https://github.com/rust-lang/compiler-team/issues/909 This adds a new panic strategy, `-Cpanic=immediate-abort`. This panic strategy essentially just codifies use of `-Zbuild-std-features=panic_immediate_abort`. This PR is intended to just set up infrastructure, and while it will change how the compiler is invoked for users of the feature, there should be no other impacts. In many parts of the compiler, `PanicStrategy::ImmediateAbort` behaves just like `PanicStrategy::Abort`, because actually most parts of the compiler just mean to ask "can this unwind?" so I've added a helper function so we can say `sess.panic_strategy().unwinds()`. The panic and unwind strategies have some level of compatibility, which mostly means that we can pre-compile the sysroot with unwinding panics then the sysroot can be linked with aborting panics later. The immediate-abort strategy is all-or-nothing, enforced by `compiler/rustc_metadata/src/dependency_format.rs` and this is tested for in `tests/ui/panic-runtime/`. We could _technically_ be more compatible with the other panic strategies, but immediately-aborting panics primarily exist for users who want to eliminate all the code size responsible for the panic runtime. I'm open to other use cases if people want to present them, but not right now. This PR is already large. `-Cpanic=immediate-abort` sets both `cfg(panic = "immediate-abort")` _and_ `cfg(panic = "abort")`. bjorn3 pointed out that people may be checking for the abort cfg to ask if panics will unwind, and also the sysroot feature this is replacing used to require `-Cpanic=abort` so this seems like a good back-compat step. At least for the moment. Unclear if this is a good idea indefinitely. I can imagine this being confusing. The changes to the standard library attributes are purely mechanical. Apart from that, I removed an `unsafe` we haven't needed for a while since the `abort` intrinsic became safe, and I've added a helpful diagnostic for people trying to use the old feature. To test that `-Cpanic=immediate-abort` conflicts with other panic strategies, I've beefed up the core-stubs infrastructure a bit. There is now a separate attribute to set flags on it. I've added a test that this produces the desired codegen, called `tests/run-make-cargo/panic-immediate-abort-codegen/` and also a separate run-make-cargo test that checks that we can build a binary.
2025-09-22add regression test for issue 146537cyrgani-0/+34
2025-09-22Fix a crash/mislex when more than one frontmatter closing possibility is ↵Alex-0/+31
considered
2025-09-22Auto merge of #146892 - GuillaumeGomez:rollup-fa7lp0n, r=GuillaumeGomezbors-3/+3
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang/rust#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang/rust#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang/rust#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang/rust#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup