Auto merge of #74929 - Manishearth:rollup-z2vflrp, r=Manishearth

Rollup of 10 pull requests

Successful merges:

 - #74742 (Remove links to rejected errata 4406 for RFC 4291)
 - #74819 (Point towards `format_spec`; it is in other direction)
 - #74852 (Explain why inlining default ToString impl)
 - #74869 (Make closures and generators a must use types)
 - #74873 (symbol mangling: use ty::print::Print for consts)
 - #74902 (Remove deprecated unstable `{Box,Rc,Arc}::into_raw_non_null` functions)
 - #74904 (Fix some typos in src/librustdoc/clean/auto_trait.rs)
 - #74910 (fence docs: fix example Mutex)
 - #74912 (Fix broken link in unstable book `plugin`)
 - #74927 (Change the target data layout to specify more values)

Failed merges:

r? @ghost
This commit is contained in:
bors 2020-07-30 00:17:51 +00:00
commit fb0b1237b1
47 changed files with 373 additions and 137 deletions

View file

@ -430,14 +430,14 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
}
// Converts the calculated ParamEnv and lifetime information to a clean::Generics, suitable for
// display on the docs page. Cleaning the Predicates produces sub-optimal WherePredicate's,
// display on the docs page. Cleaning the Predicates produces sub-optimal `WherePredicate`s,
// so we fix them up:
//
// * Multiple bounds for the same type are coalesced into one: e.g., 'T: Copy', 'T: Debug'
// becomes 'T: Copy + Debug'
// * Fn bounds are handled specially - instead of leaving it as 'T: Fn(), <T as Fn::Output> =
// K', we use the dedicated syntax 'T: Fn() -> K'
// * We explcitly add a '?Sized' bound if we didn't find any 'Sized' predicates for a type
// * We explicitly add a '?Sized' bound if we didn't find any 'Sized' predicates for a type
fn param_env_to_generics(
&self,
tcx: TyCtxt<'tcx>,
@ -588,7 +588,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
.args;
match args {
// Convert somethiung like '<T as Iterator::Item> = u8'
// Convert something like '<T as Iterator::Item> = u8'
// to 'T: Iterator<Item=u8>'
GenericArgs::AngleBracketed {
ref mut bindings, ..
@ -712,7 +712,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
// since FxHasher has different behavior for 32-bit and 64-bit platforms.
//
// Obviously, it's extremely undesirable for documentation rendering
// to be depndent on the platform it's run on. Apart from being confusing
// to be dependent on the platform it's run on. Apart from being confusing
// to end users, it makes writing tests much more difficult, as predicates
// can appear in any order in the final result.
//