Closed
Description
Code
trait UseA{
fn use_a(&self);
}
trait A {
fn hello(&self) {
println!("hello A ");
}
}
#[derive(Debug)]
struct Base{
name: String,
}
impl UseA for Base {
fn use_a(&self) {
println!("aaaa");
}
}
impl<T: UseA> A for T {
fn hello(&self) {
self.use_a();
super().hello();
}
}
fn main() {
let base = Base{name: String::from("base")};
base.hello();
}
Meta
rustc --version
: rustc 1.50.0 (cb75ad5 2021-02-10) running on x86_64-pc-windows-msvc
Error output
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler\rustc_resolve\src\late\diagnostics.rs:138:36
error: internal compiler error: unexpected panic
error: could not compile `hello`
Backtrace