if $c:expr { Some($r:expr) } else { None }
=>> $c.then(|| $r)
This commit is contained in:
parent
af3c8b2726
commit
8751fa1a9a
54 changed files with 159 additions and 281 deletions
|
@ -378,11 +378,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
let self_ty = trait_ref.self_ty();
|
||||
let (trait_desc, self_desc) = with_no_trimmed_paths!({
|
||||
let trait_desc = trait_ref.print_only_trait_path().to_string();
|
||||
let self_desc = if self_ty.has_concrete_skeleton() {
|
||||
Some(self_ty.to_string())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let self_desc =
|
||||
self_ty.has_concrete_skeleton().then(|| self_ty.to_string());
|
||||
(trait_desc, self_desc)
|
||||
});
|
||||
let cause = if let Conflict::Upstream = conflict {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue