X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Ferror_reporting%2Fon_unimplemented.rs;h=9bfe527647deea58886ce82ce839ab8f3f175fd3;hb=d53962896075507ba88e489bd401f80b4fb71d83;hp=82f0440b3078bb17efbb8d7406f528986eab5b9f;hpb=2f8dbe3797aec9a37d16d80db2f9285f74d27786;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs index 82f0440b307..9bfe527647d 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs @@ -460,7 +460,7 @@ pub fn evaluate( info!("evaluate({:?}, trait_ref={:?}, options={:?})", self, trait_ref, options); let options_map: FxHashMap = - options.iter().filter_map(|(k, v)| v.as_ref().map(|v| (*k, v.to_owned()))).collect(); + options.iter().filter_map(|(k, v)| v.clone().map(|v| (*k, v))).collect(); for command in self.subcommands.iter().chain(Some(self)).rev() { if let Some(ref condition) = command.condition && !attr::eval_condition(