mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Add delay_span_bug to no longer ICE
This commit is contained in:
parent
b202532608
commit
ab946dd3e7
@ -79,7 +79,13 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
|
||||
let _tables = tcx.typeck(body_owner);
|
||||
&*path
|
||||
}
|
||||
_ => span_bug!(DUMMY_SP, "unexpected const parent path {:?}", parent_node),
|
||||
_ => {
|
||||
tcx.sess.delay_span_bug(
|
||||
tcx.def_span(def_id),
|
||||
&format!("unexpected const parent path {:?}", parent_node),
|
||||
);
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
||||
// We've encountered an `AnonConst` in some path, so we need to
|
||||
|
7
src/test/ui/issues/issue-78622.rs
Normal file
7
src/test/ui/issues/issue-78622.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
struct S;
|
||||
fn f() {
|
||||
S::A::<f> {}
|
||||
//~^ ERROR ambiguous associated type
|
||||
}
|
9
src/test/ui/issues/issue-78622.stderr
Normal file
9
src/test/ui/issues/issue-78622.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/issue-78622.rs:5:5
|
||||
|
|
||||
LL | S::A::<f> {}
|
||||
| ^^^^^^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0223`.
|
Loading…
Reference in New Issue
Block a user