Commit Graph

32 Commits

Author SHA1 Message Date
Jacob Pratt
936d76009b
Rollup merge of #126127 - Alexendoo:other-trait-diag, r=pnkfelix
Spell out other trait diagnostic

I recently saw somebody confused about the diagnostic thinking it was suggesting to add an `as` cast. This change is longer but I think it's clearer
2024-06-16 03:41:57 -04:00
Trevor Gross
e649042316 Remove f16 const eval crash test
Const eval negation was added. This test is now covered by Miri tests,
and merged into an existing UI test.

Fixes <https://github.com/rust-lang/rust/issues/124583>
2024-06-14 12:47:42 -05:00
Alex Macleod
d0112c6849 Spell out other trait diagnostic 2024-06-12 12:34:47 +00:00
Markus Reiter
33e68aadc9
Stabilize generic NonZero. 2024-04-22 18:48:47 +02:00
bors
b9be3c47e5 Auto merge of #117457 - daxpedda:wasm-nontrapping-fptoint, r=wesleywiser
Stabilize Wasm target features that are in phase 4 and 5

This stabilizes the Wasm target features that are known to be working and in [phase 4 and 5](04fa8c810e).

Feature stabilized:
- [Non-trapping float-to-int conversions](https://github.com/WebAssembly/nontrapping-float-to-int-conversions)
- [Import/Export of Mutable Globals](https://github.com/WebAssembly/mutable-global)
- [Sign-extension operators](https://github.com/WebAssembly/sign-extension-ops)
- [Bulk memory operations](https://github.com/WebAssembly/bulk-memory-operations)
- [Extended Constant Expressions](https://github.com/WebAssembly/extended-const)

Features not stabilized:
- [Multi-value](https://github.com/WebAssembly/multi-value): requires rebuilding `std` #73755.
- [Reference Types](https://github.com/WebAssembly/reference-types): no point stabilizing without #103516.
- [Threads](https://github.com/webassembly/threads): requires rebuilding `std` #77839.
- [Relaxed SIMD](https://github.com/WebAssembly/relaxed-simd): separate PR #117468.
- [Multi Memory](https://github.com/WebAssembly/multi-memory): not implemented.

See https://github.com/rust-lang/rust/pull/117457#issuecomment-1787648070 for more context.

Documentation: https://github.com/rust-lang/reference/pull/1420
Tracking issue: https://github.com/rust-lang/rust/issues/44839
2024-04-21 06:32:10 +00:00
daxpedda
6a52feeac6
Stabilize Wasm phase 4 & 5 proposals 2024-04-18 12:51:02 +02:00
beetrees
cc12a1b511
Fix negating f16 and f128 constants 2024-04-18 06:43:44 +01:00
Oli Scherer
ae24fef028 Use TraitRef::to_string sorting in favor of TraitRef::ord, as the latter compares DefIds which we need to avoid 2024-03-27 14:02:15 +00:00
Alex Crichton
cf6d6050f7 Update test directives for wasm32-wasip1
* The WASI targets deal with the `main` symbol a bit differently than
  native so some `codegen` and `assembly` tests have been ignored.
* All `ignore-emscripten` directives have been updated to
  `ignore-wasm32` to be more clear that all wasm targets are ignored and
  it's not just Emscripten.
* Most `ignore-wasm32-bare` directives are now gone.
* Some ignore directives for wasm were switched to `needs-unwind`
  instead.
* Many `ignore-wasm32*` directives are removed as the tests work with
  WASI as opposed to `wasm32-unknown-unknown`.
2024-03-11 09:36:35 -07:00
Markus Reiter
b2fbb8a053
Use generic NonZero in tests. 2024-02-25 12:03:48 +01:00
James Dietz
03f095f9f2 consolidate tests 2024-02-21 22:41:47 -05:00
Gurinder Singh
5010ca001c Enable ConstPropLint for promoteds
This fixes the issue wherein the lint didn't fire for promoteds
in the case of SHL/SHR operators in non-optimized builds
and all arithmetic operators in optimized builds
2024-02-17 10:44:46 +05:30
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
Markus Reiter
021739c840
Update tests. 2024-01-27 16:38:57 +01:00
Ralf Jung
97c8238511 remove duplicate test 2024-01-05 18:49:25 +01:00
bors
b1e56deada Auto merge of #114841 - bvanjoi:fix-114814, r=cuviper
add track_caller for arith ops

Fixes #114814

`#[track_caller]` is works, r? `@scottmcm`
2023-11-29 00:47:25 +00:00
bors
49b3924bd4 Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviper
Update the minimum external LLVM to 16.

With this change, we'll have stable support for LLVM 16 and 17.
For reference, the previous increase to LLVM 15 was #114148

[Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
2023-11-27 21:54:03 +00:00
Nilstrieb
41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
bohan
fc87d6e23d add track_caller for arith ops 2023-11-24 00:54:06 +08:00
Dario Nieuwenhuis
7de6d04bc8 Update the minimum external LLVM to 16. 2023-11-21 22:40:16 +01:00
Ralf Jung
84abf837b8 manually bless a wasm-only test 2023-11-07 17:29:29 +01:00
Mara Bos
0e729404da Change default panic handler message format. 2023-07-29 11:42:50 +02:00
yukang
98dd81e4e3 Add test case for #109567 2023-07-26 13:31:54 -04:00
Michael Goulet
2c33dfea76 Don't sort strings right after we just sorted by types 2023-06-27 23:31:06 +00:00
Deadbeef
4f83717cf7 Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
AngelicosPhosphoros
7c263adb2a Add support for cfg(overflow_checks)
This PR adds support for detecting if overflow checks are enabled in similar fashion as debug_assertions are detected.
Possible use-case of this, for example, if we want to use checked integer casts in builds with overflow checks, e.g.

```rust
pub fn cast(val: usize)->u16 {
    if cfg!(overflow_checks) {
        val.try_into().unwrap()
    }
    else{
        vas as _
    }
}
```

Resolves #91130.
Tracking issue: #111466.
2023-05-11 18:06:31 +04:00
John Millikin
4e2797dd76 Implement Neg for signed non-zero integers.
Negating a non-zero integer currently requires unpacking to a
primitive and re-wrapping. Since negation of non-zero signed
integers always produces a non-zero result, it is safe to
implement `Neg` for `NonZeroI{N}`.

The new `impl` is marked as stable because trait implementations
for two stable types can't be marked unstable.
2023-04-20 14:27:29 +09:00
Eric Huss
a4e851cf62 Add some reasons why tests are ignored. 2023-04-15 16:11:42 -07:00
bors
18caf88956 Auto merge of #107879 - icedrocket:update-llvm, r=cuviper
Update LLVM submodule

Fixes #105626
2023-03-02 05:27:32 +00:00
icedrocket
313f04f4ff Add regression test for #105626 2023-02-23 08:39:23 +09:00
Nilstrieb
a6fda3ee7f Support true and false as boolean flag params
Implements MCP 577.
2023-01-18 20:46:36 +01:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00