Deny more ~const trait bounds

This commit is contained in:
León Orell Valerian Liehr 2023-11-11 15:01:58 +01:00
parent 9ab0749ce3
commit 8ce5d784a6
No known key found for this signature in database
GPG key ID: D17A07215F68E713
25 changed files with 444 additions and 134 deletions

View file

@ -551,8 +551,6 @@ pub struct TildeConstDisallowed {
#[derive(Subdiagnostic)]
pub enum TildeConstReason {
#[note(ast_passes_trait)]
TraitObject,
#[note(ast_passes_closure)]
Closure,
#[note(ast_passes_function)]
@ -560,6 +558,20 @@ pub enum TildeConstReason {
#[primary_span]
ident: Span,
},
#[note(ast_passes_trait)]
Trait {
#[primary_span]
span: Span,
},
#[note(ast_passes_impl)]
Impl {
#[primary_span]
span: Span,
},
#[note(ast_passes_object)]
TraitObject,
#[note(ast_passes_item)]
Item,
}
#[derive(Diagnostic)]