about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-09-01add a few more crashtestscyrgani-0/+80
2024-09-01Auto merge of #127313 - cjgillot:single-expect, r=jieyouxubors-73/+9
Rewrite lint_expectations in a single pass. This PR aims at reducing the perf regression from https://github.com/rust-lang/rust/pull/120924#issuecomment-2202486203 with drive-by simplifications. Basically, instead of using the lint level builder, which is slow, this PR splits `lint_expectations` logic in 2: - listing the `LintExpectations` is done in `shallow_lint_levels_on`, on a per-owner basis; - building the unstable->stable expectation id map is done by iterating on attributes. r? ghost for perf
2024-09-01Auto merge of #127897 - nyurik:add-qnx-70-target, r=saethlinbors-0/+3
add `aarch64_unknown_nto_qnx700` target - QNX 7.0 support for aarch64le This backports the QNX 7.1 aarch64 implementation to 7.0. * [x] required `-lregex` disabled, see https://github.com/rust-lang/libc/pull/3775 (released in libc 0.2.156) * [x] uses `libgcc.a` instead of `libgcc_s.so` (7.0 used ancient GCC 5.4 which didn't have gcc_s) * [x] a fix in `backtrace` crate to support stack traces https://github.com/rust-lang/backtrace-rs/pull/648 This PR bumps libc dependency to 0.2.158 CC: to the folks who did the [initial implementation](https://doc.rust-lang.org/rustc/platform-support/nto-qnx.html): `@flba-eb,` `@gh-tr,` `@jonathanpallant,` `@japaric` # Compile target ```bash # Configure qcc build environment source _path_/_to_/qnx7.0/qnxsdp-env.sh # Tell rust to use qcc when building QNX 7.0 targets export build_env=' CC_aarch64-unknown-nto-qnx700=qcc CFLAGS_aarch64-unknown-nto-qnx700=-Vgcc_ntoaarch64le_cxx CXX_aarch64-unknown-nto-qnx700=qcc AR_aarch64_unknown_nto_qnx700=ntoaarch64-ar' # Build rust compiler, libs, and the remote test server env $build_env ./x.py build \ --target x86_64-unknown-linux-gnu,aarch64-unknown-nto-qnx700 \ rustc library/core library/alloc library/std src/tools/remote-test-server rustup toolchain link stage1 build/host/stage1 ``` # Compile "hello world" ```bash source _path_/_to_/qnx7.0/qnxsdp-env.sh cargo new hello_world cd hello_world cargo +stage1 build --release --target aarch64-unknown-nto-qnx700 ``` # Configure a remote for testing Do this from a new shell - we will need to run more commands in the previous one. I ran into these two issues, and found some workarounds. * Temporary dir might not work properly * Default `remote-test-server` has issues binding to an address ``` # ./remote-test-server starting test server thread 'main' panicked at src/tools/remote-test-server/src/main.rs:175:29: called `Result::unwrap()` on an `Err` value: Os { code: 249, kind: AddrNotAvailable, message: "Can't assign requested address" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Specifying `--bind` param actually fixes that, and so does setting `TMPDIR` properly. ```bash # Copy remote-test-server to remote device. You may need to use sftp instead. # ATTENTION: Note that the path is different from the one in the remote testing documentation for some reason scp ./build/x86_64-unknown-linux-gnu/stage1-tools-bin/remote-test-server qnxdevice:/path/ # Run ssh with port forwarding - so that rust tester can connect to the local port instead ssh -L 12345:127.0.0.1:12345 qnxdevice # on the device, run rm -rf tmp && mkdir -p tmp && TMPDIR=$PWD/tmp ./remote-test-server --bind 0.0.0.0:12345 ``` # Run test suit Assume all previous environment variables are still set, or re-init them ```bash export TEST_DEVICE_ADDR="localhost:12345" # tidy needs to be skipped due to using un-published libc dependency export exclude_tests=' --exclude src/bootstrap --exclude src/tools/error_index_generator --exclude src/tools/linkchecker --exclude src/tools/tidy --exclude tests/ui-fulldeps --exclude rustc --exclude rustdoc --exclude tests/run-make-fulldeps' env $build_env ./x.py test $exclude_tests --stage 1 --target aarch64-unknown-nto-qnx700 ``` try-job: dist-x86_64-msvc
2024-09-01Rollup merge of #129780 - cyrgani:master, r=compiler-errorsMatthias Krüger-0/+77
add crashtests for several old unfixed ICEs Adds several new crashtests for some older ICEs that did not yet have any. Tests were added for #128097, #119095, #117460 and #126443.
2024-09-01Rollup merge of #129672 - saethlin:enum-debuginfo-tests, r=Mark-SimulacrumMatthias Krüger-25/+14
Make option-like-enum.rs UB-free and portable Fixes https://github.com/rust-lang/rust/issues/129662 (or, at least the parts of it that aren't https://github.com/rust-lang/rust/issues/128973)
2024-09-01Rollup merge of #129493 - cjgillot:early-opaque-def, r=petrochenkovMatthias Krüger-11/+11
Create opaque definitions in resolver. Implementing https://github.com/rust-lang/rust/issues/129023#issuecomment-2306079532 That was easier than I expected. r? `@petrochenkov`
2024-09-01Rollup merge of #129207 - GrigorenkoPV:elided-is-named, r=cjgillotMatthias Krüger-25/+438
Lint that warns when an elided lifetime ends up being a named lifetime As suggested in https://github.com/rust-lang/rust/issues/48686#issuecomment-1817334575 Fixes #48686
2024-08-31Auto merge of #129831 - matthiaskrgr:rollup-befq6zx, r=matthiaskrgrbors-13/+88
Rollup of 11 pull requests Successful merges: - #128523 (Add release notes for 1.81.0) - #129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen) - #129650 (Clean up `library/profiler_builtins/build.rs`) - #129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set) - #129684 (Enable Miri to pass pointers through FFI) - #129762 (Update the `wasm-component-ld` binary dependency) - #129782 (couple more crash tests) - #129816 (tidy: say which feature gate has a stability issue mismatch) - #129818 (make the const-unstable-in-stable error more clear) - #129824 (Fix code examples buttons not appearing on click on mobile) - #129826 (library: Fix typo in `core::mem`) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-31Create opaque definitions in resolver.Camille GILLOT-11/+11
2024-08-31Rollup merge of #129818 - RalfJung:const-stability, r=compiler-errorsMatthias Krüger-2/+2
make the const-unstable-in-stable error more clear The default should be to add `rustc_const_unstable`, not `rustc_allow_const_fn_unstable`. Also I discovered our check for missing const stability attributes on stable functions -- but strangely that check only kicks in for "reachable" functions. `check_missing_stability` checks for reachability since all reachable functions must have a stability attribute, but I would say if a function has `#[stable]` it should also have const-stability attributes regardless of reachability.
2024-08-31Rollup merge of #129782 - matthiaskrgr:c, r=jieyouxuMatthias Krüger-0/+54
couple more crash tests r? ```@jieyouxu```
2024-08-31Rollup merge of #129605 - jieyouxu:needs-llvm-components, r=Mark-SimulacrumMatthias Krüger-11/+32
Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is: ``` tests\run-make\print-target-list tests\run-make\print-to-output tests\run-make\print-cfg tests\run-make\target-without-atomic-cas ``` This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported. Fixes #129390. Fixes #127895. cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
2024-08-31Rewrite lint_expectations in a single pass.Camille GILLOT-73/+9
2024-08-31make the const-unstable-in-stable error more clearRalf Jung-2/+2
2024-08-31Rollup merge of #129760 - cuviper:old-timey, r=compiler-errorsMatthias Krüger-8/+16
Make the "detect-old-time" UI test more representative The test code did have an inference failure, but that would have failed on Rust 1.79 and earlier too. Now it is rewritten to be specifically affected by 1.80's `impl FromIterator<_> for Box<str>`.
2024-08-31Rollup merge of #129757 - saethlin:half-a-recursion, r=compiler-errorsMatthias Krüger-0/+32
Add a test for trait solver overflow in MIR inliner cycle detection This test is a combination of the reproducer posted here: https://github.com/rust-lang/rust/issues/128887#issuecomment-2314198229 and the existing test for polymorphic recursion: https://github.com/rust-lang/rust/blob/784d444733d65c3d305ce5edcbb41e3d0d0aee2e/tests/mir-opt/inline/polymorphic_recursion.rs r? ```@compiler-errors```
2024-08-31Rollup merge of #129711 - lqd:nll-mir-dumps, r=compiler-errorsMatthias Krüger-0/+9
Expand NLL MIR dumps This PR is a first step to clean up and expand NLL MIR dumps: - by restoring the "mir-include-spans" comments which are useful for `-Zdump-mir=nll` - by adding the list of borrows to NLL MIR dumps, where they are introduced in the CFG and in which region Comments in MIR dumps were turned off in #112346, but as shown in #114652 they were still useful for us working with NLL MIR dumps. So this PR pulls `-Z mir-include-spans` into its own options struct, so that passes dumping MIR can override them if need be. The rest of the compiler is not affected, only the "nll" pass dumps have these comments enabled again. The CLI still has priority when specifying the flag, so that we can explicitly turn them off in the `mir-opt` tests to keep blessed dumps easier to work with (which was one of the points of #112346). Then, as part of a couple steps to improve NLL/polonius MIR dumps and `.dot` visualizations, I've also added the list of borrows and where they're introduced. I'm doing all this to help debug some polonius scope issues in my prototype location-sensitive analysis :3. I'll probably add member constraints soon.
2024-08-31Rollup merge of #129659 - RalfJung:const-fn-lang-feat, r=fee1-deadMatthias Krüger-0/+20
const fn stability checking: also check declared language features Fixes https://github.com/rust-lang/rust/issues/129656 `@oli-obk` I assume it is just an oversight that this didn't use `features().declared()`? Or is there a deep reason that this must only check `declared_lib_features`?
2024-08-31elided_named_lifetimes: bless & add testsPavel Grigorenko-25/+438
2024-08-31const fn stability checking: also check declared language featuresRalf Jung-0/+20
2024-08-31Rollup merge of #129366 - petrochenkov:libsearch, r=jieyouxuMatthias Krüger-0/+18
linker: Synchronize native library search in rustc and linker Also search for static libraries with alternative naming (`libname.a`) on MSVC when producing executables or dynamic libraries, and not just rlibs. This unblocks https://github.com/rust-lang/rust/pull/123436. try-job: x86_64-msvc
2024-08-31Rollup merge of #129123 - aDotInTheVoid:rustdoc-json-self, r=fmeaseMatthias Krüger-0/+58
rustdoc-json: Add test for `Self` type Inspired by #128471, the rustdoc-json suite had no tests in place for the `Self` type. This PR adds one. I've also manually checked locally that this test passes on 29e924841f06bb181d87494eba2783761bc1ddec, confirming that adding `clean::Type::SelfTy` didn't change the JSON output. (potentially adding a self type to json (insead of (ab)using generic) is tracked in #128522) Updates #81359 r? ````````@fmease````````
2024-08-31Rollup merge of #120221 - compiler-errors:statements-are-not-patterns, ↵Matthias Krüger-0/+19
r=nnethercote Don't make statement nonterminals match pattern nonterminals Right now, the heuristic we use to check if a token may begin a pattern nonterminal falls back to `may_be_ident`: https://github.com/rust-lang/rust/blob/ef71f1047e04438181d7cb925a833e2ada6ab390/compiler/rustc_parse/src/parser/nonterminal.rs#L21-L37 This has the unfortunate side effect that a `stmt` nonterminal eagerly matches against a `pat` nonterminal, leading to a parse error: ```rust macro_rules! m { ($pat:pat) => {}; ($stmt:stmt) => {}; } macro_rules! m2 { ($stmt:stmt) => { m! { $stmt } }; } m2! { let x = 1 } ``` This PR fixes it by more accurately reflecting the set of nonterminals that may begin a pattern nonterminal. As a side-effect, I modified `Token::can_begin_pattern` to work correctly and used that in `Parser::nonterminal_may_begin_with`.
2024-08-30add crashtests for several old unfixed ICEscyrgani-0/+77
2024-08-30couple more crash testsMatthias Krüger-0/+54
2024-08-30add borrows to NLL MIR dumpsRémy Rakic-0/+9
explicitly disable `-Zmir-include-spans` in mir-opt tests This will override the NLL default of true, and keep the blessed dumps easier to work with.
2024-08-30Squashed `aarch64_unknown_nto_qnx700` supportYuri Astrakhan-0/+3
2024-08-29Make the "detect-old-time" UI test more representativeJosh Stone-8/+16
The test code did have an inference failure, but that would have failed on Rust 1.79 and earlier too. Now it is rewritten to be specifically affected by 1.80's `impl FromIterator<_> for Box<str>`.
2024-08-29Add a test for trait solver overflow in MIR inliner cycle detectionBen Kimock-0/+32
2024-08-29Rollup merge of #129690 - Oneirical:run-make-tidbits, r=jieyouxuGuillaume Gomez-56/+43
Add `needs-unwind` compiletest directive to `libtest-thread-limit` and replace some `Path` with `path` in `run-make` Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). This PR does two things: 1. Add this to `libtest-thread-limit` ([Why?](https://github.com/rust-lang/rust/pull/128507#issuecomment-2315158014)) ``` //@ needs-unwind // Reason: this should be ignored in cg_clif (Cranelift) CI and anywhere // else that uses panic=abort. ``` 2. Use `path` instead of `Path` to simplify multiple run-make tests.
2024-08-29Rollup merge of #129316 - dingxiangfei2009:riscv64-imac-scs, r=nnethercoteGuillaume Gomez-0/+17
riscv64imac: allow shadow call stack sanitizer cc `@Darksonn` for shadow call stack sanitizer support on RV64IMAC and RV64GC
2024-08-29Rollup merge of #128970 - DianQK:lint-llvm-ir, r=nikicGuillaume Gomez-3/+4
Add `-Zlint-llvm-ir` This flag is similar to `-Zverify-llvm-ir` and allows us to lint the generated IR. r? compiler
2024-08-29Rollup merge of #123940 - kornelski:remove-derived-debug, r=UrgauGuillaume Gomez-45/+176
debug-fmt-detail option I'd like to propose a new option that makes `#[derive(Debug)]` generate no-op implementations that don't print anything, and makes `{:?}` in format strings a no-op. There are a couple of motivations for this: 1. A more thorough stripping of debug symbols. Binaries stripped of debug symbols still retain some of them through `Debug` implementations. It's hard to avoid that without compiler's help, because debug formatting can be used in many places, including dependencies, and their loggers, asserts, panics, etc. * In my testing it gives about 2% binary size reduction on top of all other binary-minimizing best practices (including `panic_immediate_abort`). There are targets like Web WASM or embedded where users pay attention to binary sizes. * Users distributing closed-source binaries may not want to "leak" any symbol names as a matter of principle. 2. Adds ability to test whether code depends on specifics of the `Debug` format implementation in unwise ways (e.g. trying to get data unavailable via public interface, or using it as a serialization format). Because current Rust's debug implementation doesn't change, there's a risk of it becoming a fragile de-facto API that [won't be possible to change in the future](https://www.hyrumslaw.com/). An option that "breaks" it can act as a [grease](https://www.rfc-editor.org/rfc/rfc8701.html). This implementation is a `-Z fmt-debug=opt` flag that takes: * `full` — the default, current state. * `none` — makes derived `Debug` and `{:?}` no-ops. Explicit `impl Debug for T` implementations are left unharmed, but `{:?}` format won't use them, so they may get dead-code eliminated if they aren't invoked directly. * `shallow` — makes derived `Debug` print only the type's name, without recursing into fields. Fieldless enums print their variant names. `{:?}` works. The `shallow` option is a compromise between minimizing the `Debug` code, and compatibility. There are popular proc-macro crates that use `Debug::fmt` as a way to convert enum values into their Rust source code. There's a corresponding `cfg` flag: `#[cfg(fmt_debug = "none")]` that can be used in user code to react to this setting to minimize custom `Debug` implementations or remove unnecessary formatting helper functions.
2024-08-29Use path instead of Path in some run-make testsOneirical-56/+40
2024-08-29Add needs-unwind compiletest directive to libtest-thread-limitOneirical-0/+3
2024-08-29riscv64imac: allow shadow call stack sanitizerDing Xiang Fei-0/+17
2024-08-29Add `-Zlint-llvm-ir`DianQK-3/+4
2024-08-28Rollup merge of #129494 - tshepang:fmt-threads-sendsync, r=NadrierilJubilee-247/+315
format code in tests/ui/threads-sendsync was thinking of fixing formatting for 1 test in the directory, but found a bunch of them to also be in need
2024-08-28Rollup merge of #129467 - dingxiangfei2009:smart-pointer-relax-pointee, ↵Jubilee-16/+61
r=compiler-errors derive(SmartPointer): assume pointee from the single generic and better error messages Fix #129465 Actually RFC says that `#[pointee]` can be inferred when there is no ambiguity, or there is only one generic type parameter so to say. cc ```@Darksonn``` r? ```@compiler-errors```
2024-08-28Rollup merge of #129343 - estebank:time-version, r=jieyouxuJubilee-0/+19
Emit specific message for time<=0.3.35 ``` error[E0282]: type annotations needed for `Box<_>` --> /home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9 | 83 | let items = format_items | ^^^^^ ... 86 | Ok(items.into()) | ---- type must be known at this point | = note: this is an inference error on `time` caused by a change in Rust 1.80.0; update `time` to version `>=0.3.36` ``` Partially mitigate the fallout from https://github.com/rust-lang/rust/issues/127343. Although the biggest benefit of this would have been if we had had this in 1.80 before it became stable, the long-tail of that change will be felt for a *long* time, so better late than never. We can also emit an even more targeted error instead of this inference failure.
2024-08-28Rollup merge of #128192 - mrkajetanp:feature-detect, r=AmanieuJubilee-10/+11
rustc_target: Add various aarch64 features Add various aarch64 features already supported by LLVM and Linux. Additionally include some comment fixes to ensure consistency of feature names with the Arm ARM. Compiler support for features added to stdarch by https://github.com/rust-lang/stdarch/pull/1614. Tracking issue for unstable aarch64 features is https://github.com/rust-lang/rust/issues/127764. List of added features: - FEAT_CSSC - FEAT_ECV - FEAT_FAMINMAX - FEAT_FLAGM2 - FEAT_FP8 - FEAT_FP8DOT2 - FEAT_FP8DOT4 - FEAT_FP8FMA - FEAT_HBC - FEAT_LSE128 - FEAT_LSE2 - FEAT_LUT - FEAT_MOPS - FEAT_LRCPC3 - FEAT_SVE_B16B16 - FEAT_SVE2p1 - FEAT_WFxT - FEAT_SME - FEAT_SME_F16F16 - FEAT_SME_F64F64 - FEAT_SME_F8F16 - FEAT_SME_F8F32 - FEAT_SME_FA64 - FEAT_SME_I16I64 - FEAT_SME_LUTv2 - FEAT_SME2 - FEAT_SME2p1 - FEAT_SSVE_FP8DOT2 - FEAT_SSVE_FP8DOT4 - FEAT_SSVE_FP8FMA FEAT_FPMR is added in the first commit and then removed in a separate one to highlight it being removed from upstream LLVM 19. The intention is for it to be detectable at runtime through stdarch but not have a corresponding Rust compile-time feature.
2024-08-28Auto merge of #127537 - veluca93:struct_tf, r=BoxyUwUbors-0/+196
Implement a first version of RFC 3525: struct target features This PR is an attempt at implementing https://github.com/rust-lang/rfcs/pull/3525, behind a feature gate `struct_target_features`. There's obviously a few tasks that ought to be done before this is merged; in no particular order: - add proper error messages - add tests - create a tracking issue for the RFC - properly serialize/deserialize the new target_features field in `rmeta` (assuming I even understood that correctly :-)) That said, as I am definitely not a `rustc` expert, I'd like to get some early feedback on the overall approach before fixing those things (and perhaps some pointers for `rmeta`...), hence this early PR :-) Here's an example piece of code that I have been using for testing - with the new code, the calls to intrinsics get correctly inlined: ```rust #![feature(struct_target_features)] use std::arch::x86_64::*; /* // fails to compile #[target_feature(enable = "avx")] struct Invalid(u32); */ #[target_feature(enable = "avx")] struct Avx {} #[target_feature(enable = "sse")] struct Sse(); /* // fails to compile extern "C" fn bad_fun(_: Avx) {} */ /* // fails to compile #[inline(always)] fn inline_fun(_: Avx) {} */ trait Simd { fn do_something(&self); } impl Simd for Avx { fn do_something(&self) { unsafe { println!("{:?}", _mm256_setzero_ps()); } } } impl Simd for Sse { fn do_something(&self) { unsafe { println!("{:?}", _mm_setzero_ps()); } } } struct WithAvx { #[allow(dead_code)] avx: Avx, } impl Simd for WithAvx { fn do_something(&self) { unsafe { println!("{:?}", _mm256_setzero_ps()); } } } #[inline(never)] fn dosomething<S: Simd>(simd: &S) { simd.do_something(); } fn main() { /* // fails to compile Avx {}; */ if is_x86_feature_detected!("avx") { let avx = unsafe { Avx {} }; dosomething(&avx); dosomething(&WithAvx { avx }); } if is_x86_feature_detected!("sse") { dosomething(&unsafe { Sse {} }) } } ``` Tracking: - https://github.com/rust-lang/rust/issues/129107
2024-08-28Emit specific message for `time<0.3.35` inference failureEsteban Küber-0/+19
``` error[E0282]: type annotations needed for `Box<_>` --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9 | 83 | let items = format_items | ^^^^^ ... 86 | Ok(items.into()) | ---- type must be known at this point | = note: this is an inference error on crate `time` caused by a change in Rust 1.80.0; update `time` to version `>=0.3.35` ``` Partially address #127343.
2024-08-28fmt-debug optionKornel-45/+176
Allows disabling `fmt::Debug` derive and debug formatting.
2024-08-29derive(SmartPointer): assume pointee from the single generic and better ↵Ding Xiang Fei-16/+61
error messages
2024-08-28Rollup merge of #129666 - RalfJung:raw-eq-align, r=compiler-errorsMatthias Krüger-1/+15
interpret: add missing alignment check in raw_eq The intrinsic requires alignment, but we forgot to check for that in Miri and const-eval.
2024-08-28Rollup merge of #129657 - jswrenn:transmute-name, r=compiler-errorsMatthias Krüger-473/+473
Rename `BikeshedIntrinsicFrom` to `TransmuteFrom` As our implementation of MCP411 nears completion and we begin to solicit testing, it's no longer reasonable to expect testers to type or remember `BikeshedIntrinsicFrom`. The name degrades the ease-of-reading of documentation, and the overall experience of using compiler safe transmute. Tentatively, we'll instead adopt `TransmuteFrom`. This name seems to be the one most likely to be stabilized, after discussion on Zulip [1]. We may want to revisit the ordering of `Src` and `Dst` before stabilization, at which point we'd likely consider `TransmuteInto` or `Transmute`. [1] https://rust-lang.zulipchat.com/#narrow/stream/216762-project-safe-transmute/topic/What.20should.20.60BikeshedIntrinsicFrom.60.20be.20named.3F Tracking Issue: https://github.com/rust-lang/rust/issues/99571 r​? `@compiler-errors`
2024-08-28Rollup merge of #129641 - ↵Matthias Krüger-0/+1
notriddle:notriddle/missing-crates-js-resource-suffix, r=GuillaumeGomez rustdoc: fix missing resource suffix on `crates.js` Fixes a regression introduced in #128252.
2024-08-28Rollup merge of #129613 - RalfJung:interpret-target-feat, r=saethlinMatthias Krüger-11/+6
interpret: do not make const-eval query result depend on tcx.sess The check against calling functions with missing target features uses `tcx.sess` to determine which target features are available. However, this can differ between different crates in a crate graph, so the same const-eval query can come to different conclusions about whether a constant evaluates successfully or not -- which is bad, we should consistently get the same result everywhere.
2024-08-28Rollup merge of #129421 - jdonszelmann:naked-repr-align-functions, ↵Matthias Krüger-0/+145
r=workingjubilee,compiler-errors add repr to the allowlist for naked functions Fixes #129412 (combining unstable features #90957 (`#![feature(naked_functions)]`) and #82232 (`#![feature(fn_align)]`)