Fix typos in compiler
This commit is contained in:
parent
a73288371e
commit
677357d32b
71 changed files with 140 additions and 136 deletions
|
@ -53,7 +53,7 @@ pub struct AnnotationRequired<'a> {
|
|||
// Copy of `AnnotationRequired` for E0283
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(infer_type_annotations_needed, code = "E0283")]
|
||||
pub struct AmbigousImpl<'a> {
|
||||
pub struct AmbiguousImpl<'a> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub source_kind: &'static str,
|
||||
|
@ -954,8 +954,8 @@ pub struct OutlivesBound<'a> {
|
|||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(infer_fullfill_req_lifetime, code = "E0477")]
|
||||
pub struct FullfillReqLifetime<'a> {
|
||||
#[diag(infer_fulfill_req_lifetime, code = "E0477")]
|
||||
pub struct FulfillReqLifetime<'a> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub ty: Ty<'a>,
|
||||
|
|
|
@ -1808,7 +1808,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
// will try to hide in some case such as `async fn`, so
|
||||
// to make an error more use friendly we will
|
||||
// avoid to suggest a mismatch type with a
|
||||
// type that the user usually are not usign
|
||||
// type that the user usually are not using
|
||||
// directly such as `impl Future<Output = u8>`.
|
||||
if !self.tcx.ty_is_opaque_future(found_ty) {
|
||||
diag.note_expected_found_extra(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::errors::{
|
||||
AmbigousImpl, AmbigousReturn, AnnotationRequired, InferenceBadError, NeedTypeInfoInGenerator,
|
||||
AmbigousReturn, AmbiguousImpl, AnnotationRequired, InferenceBadError, NeedTypeInfoInGenerator,
|
||||
SourceKindMultiSuggestion, SourceKindSubdiag,
|
||||
};
|
||||
use crate::infer::error_reporting::TypeErrCtxt;
|
||||
|
@ -358,7 +358,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
bad_label,
|
||||
}
|
||||
.into_diagnostic(&self.tcx.sess.parse_sess.span_diagnostic),
|
||||
TypeAnnotationNeeded::E0283 => AmbigousImpl {
|
||||
TypeAnnotationNeeded::E0283 => AmbiguousImpl {
|
||||
span,
|
||||
source_kind,
|
||||
source_name,
|
||||
|
@ -563,7 +563,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
bad_label: None,
|
||||
}
|
||||
.into_diagnostic(&self.tcx.sess.parse_sess.span_diagnostic),
|
||||
TypeAnnotationNeeded::E0283 => AmbigousImpl {
|
||||
TypeAnnotationNeeded::E0283 => AmbiguousImpl {
|
||||
span,
|
||||
source_kind,
|
||||
source_name: &name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::errors::{
|
||||
note_and_explain, FullfillReqLifetime, LfBoundNotSatisfied, OutlivesBound, OutlivesContent,
|
||||
note_and_explain, FulfillReqLifetime, LfBoundNotSatisfied, OutlivesBound, OutlivesContent,
|
||||
RefLongerThanData, RegionOriginNote, WhereClauseSuggestions,
|
||||
};
|
||||
use crate::fluent_generated as fluent;
|
||||
|
@ -176,7 +176,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
let note = note_and_explain::RegionExplanation::new(
|
||||
self.tcx, sub, opt_span, prefix, suffix,
|
||||
);
|
||||
FullfillReqLifetime { span, ty: self.resolve_vars_if_possible(ty), note }
|
||||
FulfillReqLifetime { span, ty: self.resolve_vars_if_possible(ty), note }
|
||||
.into_diagnostic(&self.tcx.sess.parse_sess.span_diagnostic)
|
||||
}
|
||||
infer::RelateRegionParamBound(span) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue