diff options
| author | lcnr <rust@lcnr.de> | 2022-07-07 11:04:36 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-07-15 16:40:39 +0200 |
| commit | 7808f69ad7a31e54719bf71017b745ee3ceac167 (patch) | |
| tree | c53ddafa02d94aa26bc58e303761728986368444 | |
| parent | 116819f54f062a2f425deac4ec29245038c26613 (diff) | |
| download | rust-7808f69ad7a31e54719bf71017b745ee3ceac167.tar.gz rust-7808f69ad7a31e54719bf71017b745ee3ceac167.zip | |
`QueryNormalizer` bug on ambiguity
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/query/normalize.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/query/normalize.rs b/compiler/rustc_trait_selection/src/traits/query/normalize.rs index eccfb3477b9..449d7a7b47b 100644 --- a/compiler/rustc_trait_selection/src/traits/query/normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/query/normalize.rs @@ -254,7 +254,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> { let result = tcx.normalize_projection_ty(c_data)?; // We don't expect ambiguity. if result.is_ambiguous() { - return Err(NoSolution); + bug!("unexpected ambiguity: {:?} {:?}", c_data, result); } let InferOk { value: result, obligations } = self.infcx.instantiate_query_response_and_region_obligations( @@ -293,7 +293,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> { let result = tcx.normalize_projection_ty(c_data)?; // We don't expect ambiguity. if result.is_ambiguous() { - return Err(NoSolution); + bug!("unexpected ambiguity: {:?} {:?}", c_data, result); } let InferOk { value: result, obligations } = self.infcx.instantiate_query_response_and_region_obligations( |
