diff options
| author | Shoyu Vanilla <modulo641@gmail.com> | 2025-08-08 00:27:18 +0900 |
|---|---|---|
| committer | Shoyu Vanilla <modulo641@gmail.com> | 2025-08-08 00:58:54 +0900 |
| commit | 34e5820e0665599849daae97ae9ca4e53d2681cc (patch) | |
| tree | 53ffefde918f8cd069214fb100d9c88b09ca9319 /tests/ui/traits | |
| parent | 9b1a30e5e69e1537ef6eb6eb829eb47075206dea (diff) | |
| download | rust-34e5820e0665599849daae97ae9ca4e53d2681cc.tar.gz rust-34e5820e0665599849daae97ae9ca4e53d2681cc.zip | |
Clean up some resolved test regressions of const trait removals in std
Diffstat (limited to 'tests/ui/traits')
| -rw-r--r-- | tests/ui/traits/const-traits/const-and-non-const-impl.rs | 4 | ||||
| -rw-r--r-- | tests/ui/traits/const-traits/const-and-non-const-impl.stderr | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/traits/const-traits/const-and-non-const-impl.rs b/tests/ui/traits/const-traits/const-and-non-const-impl.rs index 85e2c5d3df6..560b740dc91 100644 --- a/tests/ui/traits/const-traits/const-and-non-const-impl.rs +++ b/tests/ui/traits/const-traits/const-and-non-const-impl.rs @@ -1,10 +1,9 @@ -//@ known-bug: #110395 - #![feature(const_trait_impl, const_ops)] pub struct Int(i32); impl const std::ops::Add for i32 { + //~^ ERROR only traits defined in the current crate can be implemented for primitive types type Output = Self; fn add(self, rhs: Self) -> Self { @@ -21,6 +20,7 @@ impl std::ops::Add for Int { } impl const std::ops::Add for Int { + //~^ ERROR conflicting implementations of trait type Output = Self; fn add(self, rhs: Self) -> Self { diff --git a/tests/ui/traits/const-traits/const-and-non-const-impl.stderr b/tests/ui/traits/const-traits/const-and-non-const-impl.stderr index 4eb15177347..26ed7d05324 100644 --- a/tests/ui/traits/const-traits/const-and-non-const-impl.stderr +++ b/tests/ui/traits/const-traits/const-and-non-const-impl.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Add` for type `Int` - --> $DIR/const-and-non-const-impl.rs:23:1 + --> $DIR/const-and-non-const-impl.rs:22:1 | LL | impl std::ops::Add for Int { | -------------------------- first implementation here @@ -8,7 +8,7 @@ LL | impl const std::ops::Add for Int { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Int` error[E0117]: only traits defined in the current crate can be implemented for primitive types - --> $DIR/const-and-non-const-impl.rs:7:1 + --> $DIR/const-and-non-const-impl.rs:5:1 | LL | impl const std::ops::Add for i32 { | ^^^^^^^^^^^-------------^^^^^--- |
