1
Fork 0

move Constness into TraitPredicate

This commit is contained in:
Deadbeef 2021-07-22 21:56:07 +08:00
parent 04c9901a08
commit 32390a0df6
No known key found for this signature in database
GPG key ID: 027DF9338862ADDD
49 changed files with 157 additions and 124 deletions

View file

@ -2751,6 +2751,15 @@ pub enum Constness {
NotConst,
}
impl fmt::Display for Constness {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match *self {
Self::Const => "const",
Self::NotConst => "non-const",
})
}
}
#[derive(Copy, Clone, Encodable, Debug, HashStable_Generic)]
pub struct FnHeader {
pub unsafety: Unsafety,