mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 05:56:56 +00:00
add test for assertion failed: !value.has_infer() #115806
Fixes https://github.com/rust-lang/rust/issues/115806
This commit is contained in:
parent
b976142439
commit
88aa71f108
@ -0,0 +1,19 @@
|
||||
// ICE: assertion failed: !value.has_infer()
|
||||
// issue: rust-lang/rust#115806
|
||||
#![feature(associated_const_equality)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
pub struct NoPin;
|
||||
|
||||
impl<TA> Pins<TA> for NoPin {}
|
||||
|
||||
pub trait PinA<PER> {
|
||||
const A: &'static () = &();
|
||||
}
|
||||
|
||||
pub trait Pins<USART> {}
|
||||
|
||||
impl<USART, T> Pins<USART> for T where T: PinA<USART, A = { &() }> {}
|
||||
//~^ ERROR conflicting implementations of trait `Pins<_>` for type `NoPin`
|
||||
|
||||
pub fn main() {}
|
@ -0,0 +1,14 @@
|
||||
error[E0119]: conflicting implementations of trait `Pins<_>` for type `NoPin`
|
||||
--> $DIR/assoc-const-no-infer-ice-115806.rs:16:1
|
||||
|
|
||||
LL | impl<TA> Pins<TA> for NoPin {}
|
||||
| --------------------------- first implementation here
|
||||
...
|
||||
LL | impl<USART, T> Pins<USART> for T where T: PinA<USART, A = { &() }> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `NoPin`
|
||||
|
|
||||
= note: downstream crates may implement trait `PinA<_>` for type `NoPin`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0119`.
|
Loading…
Reference in New Issue
Block a user