Merge attrs, better validation
This commit is contained in:
parent
91e5c3f2e5
commit
ca68cf0d46
16 changed files with 140 additions and 73 deletions
|
@ -53,12 +53,14 @@ pub struct TraitDef {
|
|||
/// must be implemented.
|
||||
pub must_implement_one_of: Option<Box<[Ident]>>,
|
||||
|
||||
/// Whether a type's built-in `dyn Trait: Trait` implementation is explicitly
|
||||
/// denied. This only applies to built-in trait, and is marked via
|
||||
/// `#[rustc_do_not_implement_via_object]`.
|
||||
pub do_not_implement_via_object: bool,
|
||||
/// Whether to add a builtin `dyn Trait: Trait` implementation.
|
||||
/// This is enabled for all traits except ones marked with
|
||||
/// `#[rustc_deny_explicit_impl(implement_via_object = false)]`.
|
||||
pub implement_via_object: bool,
|
||||
|
||||
/// Whether a trait is fully built-in, and any implementation is disallowed.
|
||||
/// This only applies to built-in traits, and is marked via
|
||||
/// `#[rustc_deny_explicit_impl(implement_via_object = ...)]`.
|
||||
pub deny_explicit_impl: bool,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue