Skip to content

Commit ae28c07

Browse files
committed
Rename (assoc/foreign)_type to (assoc/foreign)_ty
1 parent d9e8e42 commit ae28c07

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
12421242
}) => {
12431243
self.check_defaultness(fi.span, *defaultness);
12441244
self.check_foreign_kind_bodyless(fi.ident, "type", ty.as_ref().map(|b| b.span));
1245-
self.check_type_no_bounds(bounds, |span| ForeignTypeWithBound { span });
1245+
self.check_type_no_bounds(bounds, |span| ForeignTyWithBound { span });
12461246
self.check_foreign_ty_genericless(generics, where_clauses.0.1);
12471247
self.check_foreign_item_ascii_only(fi.ident);
12481248
}
@@ -1535,12 +1535,12 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15351535
..
15361536
}) => {
15371537
if ty.is_none() {
1538-
self.session.emit_err(AssocTypeWithoutBody {
1538+
self.session.emit_err(AssocTyWithoutBody {
15391539
span: item.span,
15401540
replace_span: self.ending_semi_or_hi(item.span),
15411541
});
15421542
}
1543-
self.check_type_no_bounds(bounds, |span| ImplAssocTypeWithBound { span });
1543+
self.check_type_no_bounds(bounds, |span| ImplAssocTyWithBound { span });
15441544
if ty.is_some() {
15451545
self.check_gat_where(
15461546
item.id,

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub struct AssocFnWithoutBody {
160160
}
161161

162162
#[derive(Diagnostic)]
163-
#[diag(ast_passes_assoc_type_without_body)]
163+
#[diag(ast_passes_assoc_ty_without_body)]
164164
pub struct AssocTypeWithoutBody {
165165
#[primary_span]
166166
pub span: Span,
@@ -225,23 +225,23 @@ pub enum ExternBlockSuggestion {
225225
},
226226
}
227227

228-
#[derive(SessionDiagnostic)]
229-
#[diag(ast_passes::ty_alias_with_bound)]
228+
#[derive(Diagnostic)]
229+
#[diag(ast_passes_ty_alias_with_bound)]
230230
pub struct TyAliasWithBound {
231231
#[primary_span]
232232
pub span: Span,
233233
}
234234

235-
#[derive(SessionDiagnostic)]
236-
#[diag(ast_passes::foreign_type_with_bound)]
237-
pub struct ForeignTypeWithBound {
235+
#[derive(Diagnostic)]
236+
#[diag(ast_passes_foreign_ty_with_bound)]
237+
pub struct ForeignTyWithBound {
238238
#[primary_span]
239239
pub span: Span,
240240
}
241241

242-
#[derive(SessionDiagnostic)]
243-
#[diag(ast_passes::impl_assoc_type_with_bound)]
244-
pub struct ImplAssocTypeWithBound {
242+
#[derive(Diagnostic)]
243+
#[diag(ast_passes_impl_assoc_ty_with_bound)]
244+
pub struct ImplAssocTyWithBound {
245245
#[primary_span]
246246
pub span: Span,
247247
}

compiler/rustc_error_messages/locales/en-US/ast_passes.ftl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ast_passes_assoc_fn_without_body =
6969
associated function in `impl` without body
7070
.suggestion = provide a definition for the function
7171
72-
ast_passes_assoc_type_without_body =
72+
ast_passes_assoc_ty_without_body =
7373
associated type in `impl` without body
7474
.suggestion = provide a definition for the type
7575
@@ -94,8 +94,8 @@ ast_passes_extern_block_suggestion = if you meant to declare an externally defin
9494
ast_passes_ty_alias_with_bound =
9595
bounds on `type`s in this context have no effect
9696
97-
ast_passes_foreign_type_with_bound =
97+
ast_passes_foreign_ty_with_bound =
9898
bounds on `type`s in `extern` blocks have no effect
9999
100-
ast_passes_impl_assoc_type_with_bound =
100+
ast_passes_impl_assoc_ty_with_bound =
101101
bounds on `type`s in `impl`s have no effect

0 commit comments

Comments
 (0)