Skip to content

Commit d82419b

Browse files
authored
Rollup merge of rust-lang#83954 - estebank:issue-83613, r=varkor
Do not ICE when closure is involved in Trait Alias Impl Trait Fix rust-lang#83613.
2 parents d7d42cc + 18cf44b commit d82419b

File tree

64 files changed

+125
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+125
-84
lines changed

compiler/rustc_trait_selection/src/traits/coherence.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,11 @@ fn ty_is_local_constructor(ty: Ty<'_>, in_crate: InCrate) -> bool {
586586
false
587587
}
588588

589+
ty::Closure(..) => {
590+
// Similar to the `Opaque` case (#83613).
591+
false
592+
}
593+
589594
ty::Dynamic(ref tt, ..) => {
590595
if let Some(principal) = tt.principal() {
591596
def_id_is_local(principal.def_id(), in_crate)
@@ -596,7 +601,7 @@ fn ty_is_local_constructor(ty: Ty<'_>, in_crate: InCrate) -> bool {
596601

597602
ty::Error(_) => true,
598603

599-
ty::Closure(..) | ty::Generator(..) | ty::GeneratorWitness(..) => {
604+
ty::Generator(..) | ty::GeneratorWitness(..) => {
600605
bug!("ty_is_local invoked on unexpected type: {:?}", ty)
601606
}
602607
}

compiler/rustc_trait_selection/src/traits/specialize/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,14 +395,14 @@ fn report_conflicting_impls(
395395
// that's passed in.
396396
let decorate = |err: LintDiagnosticBuilder<'_>| {
397397
let msg = format!(
398-
"conflicting implementations of trait `{}`{}:{}",
398+
"conflicting implementations of trait `{}`{}{}",
399399
overlap.trait_desc,
400400
overlap
401401
.self_desc
402402
.clone()
403403
.map_or_else(String::new, |ty| { format!(" for type `{}`", ty) }),
404404
match used_to_be_allowed {
405-
Some(FutureCompatOverlapErrorKind::Issue33140) => " (E0119)",
405+
Some(FutureCompatOverlapErrorKind::Issue33140) => ": (E0119)",
406406
_ => "",
407407
}
408408
);

src/test/ui/associated-types/associated-types-coherence-failure.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Cow<'_, _>`:
1+
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Cow<'_, _>`
22
--> $DIR/associated-types-coherence-failure.rs:21:1
33
|
44
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
@@ -7,7 +7,7 @@ LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwn
77
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
99

10-
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`:
10+
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`
1111
--> $DIR/associated-types-coherence-failure.rs:28:1
1212
|
1313
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {

src/test/ui/async-await/issue-67651.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `From` for type `()`:
1+
error[E0119]: conflicting implementations of trait `From` for type `()`
22
--> $DIR/issue-67651.rs:11:1
33
|
44
LL | impl From for () {

src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait`:
1+
error[E0119]: conflicting implementations of trait `MyTrait`
22
--> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:24:1
33
|
44
LL | impl<T:Even> MyTrait for T {

src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait`:
1+
error[E0119]: conflicting implementations of trait `MyTrait`
22
--> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:20:1
33
|
44
LL | impl<T:Even> MyTrait for T {

src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`:
1+
error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`
22
--> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:15:1
33
|
44
LL | impl GoMut for MyThingy {

src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait<MyType>` for type `MyType`:
1+
error[E0119]: conflicting implementations of trait `MyTrait<MyType>` for type `MyType`
22
--> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:22:1
33
|
44
LL | impl<T> MyTrait<T> for T {

src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`
22
--> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:20:1
33
|
44
LL | impl<T:OtherTrait> MyTrait for T {

src/test/ui/coherence/coherence-blanket-conflicts-with-specific.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`
22
--> $DIR/coherence-blanket-conflicts-with-specific.rs:19:1
33
|
44
LL | impl<T> MyTrait for T {

src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL |
77
LL | impl<T: MyTrait> !Send for TestType<T> {}
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here
99

10-
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`:
10+
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`
1111
--> $DIR/coherence-conflicting-negative-trait-impl.rs:13:1
1212
|
1313
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}

src/test/ui/coherence/coherence-cross-crate-conflict.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`:
1+
error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`
22
--> $DIR/coherence-cross-crate-conflict.rs:9:1
33
|
44
LL | impl<A> Foo for A {

src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Trait` for type `for<'r> fn(fn(&'r ()))`:
1+
error[E0119]: conflicting implementations of trait `Trait` for type `for<'r> fn(fn(&'r ()))`
22
--> $DIR/coherence-fn-covariant-bound-vs-static.rs:17:1
33
|
44
LL | impl Trait for for<'r> fn(fn(&'r ())) {}

src/test/ui/coherence/coherence-fn-implied-bounds.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: conflicting implementations of trait `Trait` for type `for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32`:
1+
error: conflicting implementations of trait `Trait` for type `for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32`
22
--> $DIR/coherence-fn-implied-bounds.rs:21:1
33
|
44
LL | impl Trait for for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32 {}

src/test/ui/coherence/coherence-fn-inputs.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Trait` for type `for<'a, 'b> fn(&'a u32, &'b u32)`:
1+
error[E0119]: conflicting implementations of trait `Trait` for type `for<'a, 'b> fn(&'a u32, &'b u32)`
22
--> $DIR/coherence-fn-inputs.rs:15:1
33
|
44
LL | impl Trait for for<'a, 'b> fn(&'a u32, &'b u32) {}

src/test/ui/coherence/coherence-free-vs-bound-region.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: conflicting implementations of trait `TheTrait` for type `fn(&u8)`:
1+
error: conflicting implementations of trait `TheTrait` for type `fn(&u8)`
22
--> $DIR/coherence-free-vs-bound-region.rs:16:1
33
|
44
LL | impl<'a> TheTrait for fn(&'a u8) {}

src/test/ui/coherence/coherence-impls-copy.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`:
1+
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`
22
--> $DIR/coherence-impls-copy.rs:5:1
33
|
44
LL | impl Copy for i32 {}
@@ -7,7 +7,7 @@ LL | impl Copy for i32 {}
77
= note: conflicting implementation in crate `core`:
88
- impl Copy for i32;
99

10-
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:
10+
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`
1111
--> $DIR/coherence-impls-copy.rs:29:1
1212
|
1313
LL | impl Copy for &'static NotSync {}
@@ -17,7 +17,7 @@ LL | impl Copy for &'static NotSync {}
1717
- impl<T> Copy for &T
1818
where T: ?Sized;
1919

20-
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
20+
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`
2121
--> $DIR/coherence-impls-copy.rs:34:1
2222
|
2323
LL | impl Copy for &'static [NotSync] {}

src/test/ui/coherence/coherence-impls-send.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `&[NotSync]`:
1+
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `&[NotSync]`
22
--> $DIR/coherence-impls-send.rs:25:1
33
|
44
LL | unsafe impl Send for &'static [NotSync] {}

src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait`:
1+
error[E0119]: conflicting implementations of trait `MyTrait`
22
--> $DIR/coherence-no-direct-lifetime-dispatch.rs:6:1
33
|
44
LL | impl<T> MyTrait for T {}

src/test/ui/coherence/coherence-overlap-all-t-and-tuple.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `From<(_,)>` for type `(_,)`:
1+
error[E0119]: conflicting implementations of trait `From<(_,)>` for type `(_,)`
22
--> $DIR/coherence-overlap-all-t-and-tuple.rs:16:1
33
|
44
LL | impl <T> From<T> for T {

src/test/ui/coherence/coherence-overlap-downstream.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error[E0119]: conflicting implementations of trait `Sweet`:
1+
error[E0119]: conflicting implementations of trait `Sweet`
22
--> $DIR/coherence-overlap-downstream.rs:8:1
33
|
44
LL | impl<T:Sugar> Sweet for T { }
55
| ------------------------- first implementation here
66
LL | impl<T:Fruit> Sweet for T { }
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
88

9-
error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`:
9+
error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
1010
--> $DIR/coherence-overlap-downstream.rs:14:1
1111
|
1212
LL | impl<X, T> Foo<X> for T where T: Bar<X> {}

src/test/ui/coherence/coherence-overlap-issue-23516.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`:
1+
error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`
22
--> $DIR/coherence-overlap-issue-23516.rs:8:1
33
|
44
LL | impl<T:Sugar> Sweet for T { }

src/test/ui/coherence/coherence-overlap-messages.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
error[E0119]: conflicting implementations of trait `Foo`:
1+
error[E0119]: conflicting implementations of trait `Foo`
22
--> $DIR/coherence-overlap-messages.rs:4:1
33
|
44
LL | impl<T> Foo for T {}
55
| ----------------- first implementation here
66
LL | impl<U> Foo for U {}
77
| ^^^^^^^^^^^^^^^^^ conflicting implementation
88

9-
error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`:
9+
error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`
1010
--> $DIR/coherence-overlap-messages.rs:11:1
1111
|
1212
LL | impl<T> Bar for (T, u8) {}
1313
| ----------------------- first implementation here
1414
LL | impl<T> Bar for (u8, T) {}
1515
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)`
1616

17-
error[E0119]: conflicting implementations of trait `Baz<u8>` for type `u8`:
17+
error[E0119]: conflicting implementations of trait `Baz<u8>` for type `u8`
1818
--> $DIR/coherence-overlap-messages.rs:17:1
1919
|
2020
LL | impl<T> Baz<u8> for T {}
2121
| --------------------- first implementation here
2222
LL | impl<T> Baz<T> for u8 {}
2323
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8`
2424

25-
error[E0119]: conflicting implementations of trait `Quux<_, _>`:
25+
error[E0119]: conflicting implementations of trait `Quux<_, _>`
2626
--> $DIR/coherence-overlap-messages.rs:23:1
2727
|
2828
LL | impl<T, U, V> Quux<U, V> for T {}
2929
| ------------------------------ first implementation here
3030
LL | impl<T, U> Quux<U, U> for T {}
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
3232

33-
error[E0119]: conflicting implementations of trait `Quux<_, _>`:
33+
error[E0119]: conflicting implementations of trait `Quux<_, _>`
3434
--> $DIR/coherence-overlap-messages.rs:25:1
3535
|
3636
LL | impl<T, U, V> Quux<U, V> for T {}

src/test/ui/coherence/coherence-overlap-upstream.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Foo` for type `i16`:
1+
error[E0119]: conflicting implementations of trait `Foo` for type `i16`
22
--> $DIR/coherence-overlap-upstream.rs:13:1
33
|
44
LL | impl<T> Foo for T where T: Remote {}

src/test/ui/coherence/coherence-projection-conflict-orphan.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`:
1+
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`
22
--> $DIR/coherence-projection-conflict-orphan.rs:16:1
33
|
44
LL | impl Foo<i32> for i32 { }

src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`:
1+
error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`
22
--> $DIR/coherence-projection-conflict-ty-param.rs:10:1
33
|
44
LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {}

src/test/ui/coherence/coherence-projection-conflict.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`:
1+
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`
22
--> $DIR/coherence-projection-conflict.rs:11:1
33
|
44
LL | impl Foo<i32> for i32 { }

src/test/ui/coherence/coherence-subtyping.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
1+
warning: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
22
--> $DIR/coherence-subtyping.rs:15:1
33
|
44
LL | impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}

src/test/ui/coherence/coherence-tuple-conflict.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `(_, _)`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `(_, _)`
22
--> $DIR/coherence-tuple-conflict.rs:15:1
33
|
44
LL | impl<T> MyTrait for (T,T) {

src/test/ui/coherence/coherence-wasm-bindgen.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: conflicting implementations of trait `IntoWasmAbi` for type `&dyn std::ops::Fn(&_) -> _`:
1+
error: conflicting implementations of trait `IntoWasmAbi` for type `&dyn std::ops::Fn(&_) -> _`
22
--> $DIR/coherence-wasm-bindgen.rs:28:1
33
|
44
LL | / impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b)

src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`
22
--> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:16:1
33
|
44
LL | impl<T: lib::MyCopy> MyTrait for T { }

src/test/ui/coherence/coherence_copy_like_err_struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct<MyType>`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct<MyType>`
22
--> $DIR/coherence_copy_like_err_struct.rs:19:1
33
|
44
LL | impl<T: lib::MyCopy> MyTrait for T { }

src/test/ui/coherence/coherence_copy_like_err_tuple.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `(MyType,)`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `(MyType,)`
22
--> $DIR/coherence_copy_like_err_tuple.rs:18:1
33
|
44
LL | impl<T: lib::MyCopy> MyTrait for T { }

src/test/ui/const-generics/issues/issue-64494.min.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LL | impl<T: Foo> MyTrait for T where Is<{T::VAL == 6}>: True {}
1616
= note: type parameters may not be used in const expressions
1717
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
1818

19-
error[E0119]: conflicting implementations of trait `MyTrait`:
19+
error[E0119]: conflicting implementations of trait `MyTrait`
2020
--> $DIR/issue-64494.rs:18:1
2121
|
2222
LL | impl<T: Foo> MyTrait for T where Is<{T::VAL == 5}>: True {}

src/test/ui/error-codes/E0119.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait` for type `Foo`:
1+
error[E0119]: conflicting implementations of trait `MyTrait` for type `Foo`
22
--> $DIR/E0119.rs:13:1
33
|
44
LL | impl<T> MyTrait for T {

src/test/ui/error-codes/e0119/complex-impl.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `complex_impl_support::External` for type `(Q, complex_impl_support::M<'_, '_, '_, std::boxed::Box<_>, _, _>)`:
1+
error[E0119]: conflicting implementations of trait `complex_impl_support::External` for type `(Q, complex_impl_support::M<'_, '_, '_, std::boxed::Box<_>, _, _>)`
22
--> $DIR/complex-impl.rs:9:1
33
|
44
LL | impl<R> External for (Q, R) {}

src/test/ui/error-codes/e0119/conflict-with-std.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `std::convert::AsRef<Q>` for type `std::boxed::Box<Q>`:
1+
error[E0119]: conflicting implementations of trait `std::convert::AsRef<Q>` for type `std::boxed::Box<Q>`
22
--> $DIR/conflict-with-std.rs:5:1
33
|
44
LL | impl AsRef<Q> for Box<Q> {
@@ -8,7 +8,7 @@ LL | impl AsRef<Q> for Box<Q> {
88
- impl<T, A> AsRef<T> for Box<T, A>
99
where A: Allocator, T: ?Sized;
1010

11-
error[E0119]: conflicting implementations of trait `std::convert::From<S>` for type `S`:
11+
error[E0119]: conflicting implementations of trait `std::convert::From<S>` for type `S`
1212
--> $DIR/conflict-with-std.rs:12:1
1313
|
1414
LL | impl From<S> for S {
@@ -17,7 +17,7 @@ LL | impl From<S> for S {
1717
= note: conflicting implementation in crate `core`:
1818
- impl<T> From<T> for T;
1919

20-
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<X>` for type `X`:
20+
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<X>` for type `X`
2121
--> $DIR/conflict-with-std.rs:19:1
2222
|
2323
LL | impl TryFrom<X> for X {

src/test/ui/error-codes/e0119/issue-23563.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `a::LolFrom<&[_]>` for type `LocalType<_>`:
1+
error[E0119]: conflicting implementations of trait `a::LolFrom<&[_]>` for type `LocalType<_>`
22
--> $DIR/issue-23563.rs:13:1
33
|
44
LL | impl<'a, T> LolFrom<&'a [T]> for LocalType<T> {

src/test/ui/error-codes/e0119/issue-27403.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`:
1+
error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`
22
--> $DIR/issue-27403.rs:5:1
33
|
44
LL | impl<S> Into<S> for GenX<S> {

src/test/ui/error-codes/e0119/issue-28981.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`:
1+
error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`
22
--> $DIR/issue-28981.rs:5:1
33
|
44
LL | impl<Foo> Deref for Foo { }

src/test/ui/error-codes/e0119/so-37347311.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `std::convert::From<MyError<_>>` for type `MyError<_>`:
1+
error[E0119]: conflicting implementations of trait `std::convert::From<MyError<_>>` for type `MyError<_>`
22
--> $DIR/so-37347311.rs:11:1
33
|
44
LL | impl<S: Storage> From<S::Error> for MyError<S> {

src/test/ui/feature-gates/feature-gate-overlapping_marker_traits.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `MyMarker`:
1+
error[E0119]: conflicting implementations of trait `MyMarker`
22
--> $DIR/feature-gate-overlapping_marker_traits.rs:6:1
33
|
44
LL | impl<T: Display> MyMarker for T {}

src/test/ui/impl-trait/auto-trait.full_tait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
77
= note: `#[warn(incomplete_features)]` on by default
88
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
99

10-
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`:
10+
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
1111
--> $DIR/auto-trait.rs:24:1
1212
|
1313
LL | impl<T: Send> AnotherTrait for T {}

src/test/ui/impl-trait/auto-trait.min_tait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`:
1+
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
22
--> $DIR/auto-trait.rs:24:1
33
|
44
LL | impl<T: Send> AnotherTrait for T {}

src/test/ui/impl-trait/negative-reasoning.full_tait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
77
= note: `#[warn(incomplete_features)]` on by default
88
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
99

10-
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`:
10+
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
1111
--> $DIR/negative-reasoning.rs:22:1
1212
|
1313
LL | impl<T: std::fmt::Debug> AnotherTrait for T {}

0 commit comments

Comments
 (0)