diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-10-03 14:17:42 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-10-03 14:17:42 +0900 |
| commit | 82510b90c63c41abe2886048f0350f825b30b30f (patch) | |
| tree | 36af072dadc7b4663cbe416105a9196c8a39dadc | |
| parent | 65445a571c11f07f4ca1ed0f63bad247ae295bd0 (diff) | |
| download | rust-82510b90c63c41abe2886048f0350f825b30b30f.tar.gz rust-82510b90c63c41abe2886048f0350f825b30b30f.zip | |
return when obligation has references_error
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 451427a6980..1bca7ed8d32 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -899,6 +899,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { return; } + if obligation.references_error() { + return; + } + candidates.vec.push(TransmutabilityCandidate); } |
