File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -82,3 +82,11 @@ pub struct TraitFnAsync {
82
82
#[ label]
83
83
pub span : Span ,
84
84
}
85
+
86
+ #[ derive( SessionDiagnostic ) ]
87
+ #[ error( ast_passes:: trait_fn_const, code = "E0379" ) ]
88
+ pub struct TraitFnConst {
89
+ #[ primary_span]
90
+ #[ label]
91
+ pub span : Span ,
92
+ }
Original file line number Diff line number Diff line change @@ -27,3 +27,7 @@ ast_passes_trait_fn_async =
27
27
.label = `async` because of this
28
28
.note = `async` trait functions are not currently supported
29
29
.note2 = consider using the `async-trait` crate: https://crates.io/crates/async-trait
30
+
31
+ ast_passes_trait_fn_const =
32
+ functions in traits cannot be declared const
33
+ .label = functions in traits cannot be const
You can’t perform that action at this time.
0 commit comments