Implement #[rustc_default_body_unstable]
This attribute allows to mark default body of a trait function as unstable. This means that implementing the trait without implementing the function will require enabling unstable feature. This is useful in conjunction with `#[rustc_must_implement_one_of]`, we may want to relax requirements for a trait, for example allowing implementing either of `PartialEq::{eq, ne}`, but do so in a safe way -- making implementation of only `PartialEq::ne` unstable.
This commit is contained in:
parent
96b9bb4620
commit
177af47104
14 changed files with 206 additions and 17 deletions
|
@ -1094,6 +1094,11 @@ rustc_queries! {
|
|||
separate_provide_extern
|
||||
}
|
||||
|
||||
query lookup_default_body_stability(def_id: DefId) -> Option<attr::DefaultBodyStability> {
|
||||
desc { |tcx| "looking up default body stability of `{}`", tcx.def_path_str(def_id) }
|
||||
separate_provide_extern
|
||||
}
|
||||
|
||||
query should_inherit_track_caller(def_id: DefId) -> bool {
|
||||
desc { |tcx| "computing should_inherit_track_caller of `{}`", tcx.def_path_str(def_id) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue