Skip to content

Commit 7808f69

Browse files
committed
QueryNormalizer bug on ambiguity
1 parent 116819f commit 7808f69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_trait_selection/src/traits/query/normalize.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
254254
let result = tcx.normalize_projection_ty(c_data)?;
255255
// We don't expect ambiguity.
256256
if result.is_ambiguous() {
257-
return Err(NoSolution);
257+
bug!("unexpected ambiguity: {:?} {:?}", c_data, result);
258258
}
259259
let InferOk { value: result, obligations } =
260260
self.infcx.instantiate_query_response_and_region_obligations(
@@ -293,7 +293,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
293293
let result = tcx.normalize_projection_ty(c_data)?;
294294
// We don't expect ambiguity.
295295
if result.is_ambiguous() {
296-
return Err(NoSolution);
296+
bug!("unexpected ambiguity: {:?} {:?}", c_data, result);
297297
}
298298
let InferOk { value: result, obligations } =
299299
self.infcx.instantiate_query_response_and_region_obligations(

0 commit comments

Comments
 (0)