• N
    Clarify args terminology. · 32c9ffb9
    Nicholas Nethercote 提交于
    The deriving code has inconsistent terminology to describe args.
    
    In some places it distinguishes between:
    - the `&self` arg (if present), versus
    - all other args.
    
    In other places it distinguishes between:
    - the `&self` arg (if present) and any other arguments with the same
      type (in practice there is at most one, e.g. in `PartialEq::eq`),
      versus
    - all other args.
    
    The terms "self_args" and "nonself_args" are sometimes used for the
    former distinction, and sometimes for the latter. "args" is also
    sometimes used for "all other args".
    
    This commit makes the code consistently uses "self_args"/"nonself_args"
    for the former and "selflike_args"/"nonselflike_args" for the latter.
    This change makes the code easier to read.
    
    The commit also adds a panic on an impossible path (the `Self_` case) in
    `extract_arg_details`.
    32c9ffb9
default.rs 9.3 KB