Fix BinOp ty assertion and fn_sig
for closures
Also added a few more util methods to TyKind to check for specific types.
This commit is contained in:
parent
8a3765582c
commit
2f790af726
4 changed files with 167 additions and 12 deletions
|
@ -69,9 +69,15 @@ pub trait Context {
|
|||
/// Returns if the ADT is a box.
|
||||
fn adt_is_box(&self, def: AdtDef) -> bool;
|
||||
|
||||
/// Returns whether this ADT is simd.
|
||||
fn adt_is_simd(&self, def: AdtDef) -> bool;
|
||||
|
||||
/// Retrieve the function signature for the given generic arguments.
|
||||
fn fn_sig(&self, def: FnDef, args: &GenericArgs) -> PolyFnSig;
|
||||
|
||||
/// Retrieve the closure signature for the given generic arguments.
|
||||
fn closure_sig(&self, args: &GenericArgs) -> PolyFnSig;
|
||||
|
||||
/// The number of variants in this ADT.
|
||||
fn adt_variants_len(&self, def: AdtDef) -> usize;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue