Migrate trait_fn_const
This commit is contained in:
parent
e3d4c4039a
commit
8d042f4483
2 changed files with 12 additions and 0 deletions
|
@ -82,3 +82,11 @@ pub struct TraitFnAsync {
|
||||||
#[label]
|
#[label]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic)]
|
||||||
|
#[error(ast_passes::trait_fn_const, code = "E0379")]
|
||||||
|
pub struct TraitFnConst {
|
||||||
|
#[primary_span]
|
||||||
|
#[label]
|
||||||
|
pub span: Span,
|
||||||
|
}
|
||||||
|
|
|
@ -27,3 +27,7 @@ ast_passes_trait_fn_async =
|
||||||
.label = `async` because of this
|
.label = `async` because of this
|
||||||
.note = `async` trait functions are not currently supported
|
.note = `async` trait functions are not currently supported
|
||||||
.note2 = consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
.note2 = consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
||||||
|
|
||||||
|
ast_passes_trait_fn_const =
|
||||||
|
functions in traits cannot be declared const
|
||||||
|
.label = functions in traits cannot be const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue