remove defaulting to unit
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
This commit is contained in:
parent
fab632f975
commit
9b15ddb29e
57 changed files with 107 additions and 243 deletions
|
@ -1322,7 +1322,7 @@ fn external_path_params(cx: &DocContext, trait_did: Option<DefId>, has_self: boo
|
|||
Some(did) if cx.tcx.lang_items().fn_trait_kind(did).is_some() => {
|
||||
assert_eq!(types.len(), 1);
|
||||
let inputs = match types[0].sty {
|
||||
ty::TyTuple(ref tys, _) => tys.iter().map(|t| t.clean(cx)).collect(),
|
||||
ty::TyTuple(ref tys) => tys.iter().map(|t| t.clean(cx)).collect(),
|
||||
_ => {
|
||||
return PathParameters::AngleBracketed {
|
||||
lifetimes,
|
||||
|
@ -1334,7 +1334,7 @@ fn external_path_params(cx: &DocContext, trait_did: Option<DefId>, has_self: boo
|
|||
let output = None;
|
||||
// FIXME(#20299) return type comes from a projection now
|
||||
// match types[1].sty {
|
||||
// ty::TyTuple(ref v, _) if v.is_empty() => None, // -> ()
|
||||
// ty::TyTuple(ref v) if v.is_empty() => None, // -> ()
|
||||
// _ => Some(types[1].clean(cx))
|
||||
// };
|
||||
PathParameters::Parenthesized {
|
||||
|
@ -1377,7 +1377,7 @@ impl<'tcx> Clean<TyParamBound> for ty::TraitRef<'tcx> {
|
|||
// collect any late bound regions
|
||||
let mut late_bounds = vec![];
|
||||
for ty_s in self.input_types().skip(1) {
|
||||
if let ty::TyTuple(ts, _) = ty_s.sty {
|
||||
if let ty::TyTuple(ts) = ty_s.sty {
|
||||
for &ty_s in ts {
|
||||
if let ty::TyRef(ref reg, _) = ty_s.sty {
|
||||
if let &ty::RegionKind::ReLateBound(..) = *reg {
|
||||
|
@ -2731,7 +2731,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
|
|||
Never
|
||||
}
|
||||
}
|
||||
ty::TyTuple(ref t, _) => Tuple(t.clean(cx)),
|
||||
ty::TyTuple(ref t) => Tuple(t.clean(cx)),
|
||||
|
||||
ty::TyProjection(ref data) => data.clean(cx),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue