diff options
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/errors.rs | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs index f6dd7898fb2..173671059ca 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs @@ -382,7 +382,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infer_subdiags, multi_suggestions, bad_label, - was_written: None, + was_written: false, path: Default::default(), }), TypeAnnotationNeeded::E0283 => self.dcx().create_err(AmbiguousImpl { @@ -393,7 +393,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infer_subdiags, multi_suggestions, bad_label, - was_written: None, + was_written: false, path: Default::default(), }), TypeAnnotationNeeded::E0284 => self.dcx().create_err(AmbiguousReturn { @@ -404,7 +404,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infer_subdiags, multi_suggestions, bad_label, - was_written: None, + was_written: false, path: Default::default(), }), } @@ -586,7 +586,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infer_subdiags, multi_suggestions, bad_label: None, - was_written: path.as_ref().map(|_| ()), + was_written: path.is_some(), path: path.unwrap_or_default(), }), TypeAnnotationNeeded::E0283 => self.dcx().create_err(AmbiguousImpl { @@ -597,7 +597,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infer_subdiags, multi_suggestions, bad_label: None, - was_written: path.as_ref().map(|_| ()), + was_written: path.is_some(), path: path.unwrap_or_default(), }), TypeAnnotationNeeded::E0284 => self.dcx().create_err(AmbiguousReturn { @@ -608,7 +608,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { infer_subdiags, multi_suggestions, bad_label: None, - was_written: path.as_ref().map(|_| ()), + was_written: path.is_some(), path: path.unwrap_or_default(), }), } diff --git a/compiler/rustc_trait_selection/src/errors.rs b/compiler/rustc_trait_selection/src/errors.rs index 78f1f7d9b9b..5384084f6d7 100644 --- a/compiler/rustc_trait_selection/src/errors.rs +++ b/compiler/rustc_trait_selection/src/errors.rs @@ -203,7 +203,7 @@ pub struct AnnotationRequired<'a> { #[subdiagnostic] pub multi_suggestions: Vec<SourceKindMultiSuggestion<'a>>, #[note(trait_selection_full_type_written)] - pub was_written: Option<()>, + pub was_written: bool, pub path: PathBuf, } @@ -224,7 +224,7 @@ pub struct AmbiguousImpl<'a> { #[subdiagnostic] pub multi_suggestions: Vec<SourceKindMultiSuggestion<'a>>, #[note(trait_selection_full_type_written)] - pub was_written: Option<()>, + pub was_written: bool, pub path: PathBuf, } @@ -245,7 +245,7 @@ pub struct AmbiguousReturn<'a> { #[subdiagnostic] pub multi_suggestions: Vec<SourceKindMultiSuggestion<'a>>, #[note(trait_selection_full_type_written)] - pub was_written: Option<()>, + pub was_written: bool, pub path: PathBuf, } |
