Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #91287

Closed
wants to merge 13 commits into from

Commits on Aug 11, 2021

  1. Weaken guarantee around advancing underlying iterators in zip

    The current guarantee is too strong as it would prevent adapters
    from exploiting knowledge about the iterator length and using counted
    loops for example because they would stop calling `next()` before
    it ever returned `None`. Additionally several nested zip iterators
    already fail to uphold this.
    
    This doesn't remove any of the specialization code that tries
    (and sometimes fails) to uphold the guarantee for `next()`
    because removing it would also affect `next_back()`
    in more surprising ways.
    the8472 committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    2ff677d View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2021

  1. Document non-guarantees for Hash

    Dependence on endianness and type sizes was reported for enum discriminants in rust-lang#74215 but it is a more general
    issue since for example the default implementation of `Hasher::write_usize` uses native endianness.
    Additionally the implementations of library types are occasionally changed as their internal fields
    change or hashing gets optimized.
    the8472 committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    fd1494e View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. Expand available_parallelism docs in anticipation of cgroup quotas

    The "fixed" in "fixed steady state limits" means to exclude load-dependent resource prioritization
    that would calculate to 100% of capacity on an idle system and less capacity on a loaded system.
    
    Additionally I also exclude "system load" since it would be silly to try to identify
    other, perhaps higher priority, processes hogging some CPU cores that aren't explicitly excluded
    by masks/quotas/whatever.
    the8472 committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    39b98e8 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Apply suggestions from code review

    Co-authored-by: pierwill <19642016+pierwill@users.noreply.github.com>
    the8472 and pierwill committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    53fc69f View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2021

  1. Simplify rendering of stylesheet links into HTML

    We carry around a list of stylesheets that can carry two different types
    of thing:
    
     1. Internal stylesheets specific to a page type (only for settings)
     2. Themes
    
    In this change I move the link generation for settings.css into
    settings(), so Context.style_files is reserved just for themes.
    
    We had two places where we extracted a base theme name from a list of
    StylePaths. I consolidated that code to be a method on StylePath.
    
    I moved generation of link tags for stylesheets into the page.html
    template. With that change, I made the template responsible for special
    handling of light.css (making it the default theme) and of the other
    themes (marking them disabled). That allowed getting rid of the
    `disabled` field on StylePath.
    jsha committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    3649b90 View commit details
    Browse the repository at this point in the history
  2. Move themes and version into rustdoc-vars

    We had been injecting the list of themes and the rustdoc version into
    main.js by rewriting it at doc generation time. By avoiding this
    rewrite, we can make it easier to edit main.js without regenerating all
    the docs.
    
    Added a more convenient accessor for rustdoc-vars.
    
    Changed storage.js to not rely on resourcesSuffix. It could in theory
    use rustdoc-vars, but because rustdoc-vars is at the end of the HTML,
    it's not available when storage.js runs (very early in page load).
    jsha committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    f0683f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9afca5 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Only check for errors in predicate when skipping impl assembly

    Prior to PR rust-lang#91205, checking for errors in the overall obligation
    would check checking the `ParamEnv`, due to an incorrect
    `super_visit_with` impl. With this bug fixed, we will now
    bail out of impl candidate assembly if the `ParamEnv` contains
    any error types.
    
    In practice, this appears to be overly conservative - when an error
    occurs early in compilation, we end up giving up early for some
    predicates that we could have successfully evaluated without overflow.
    By only checking for errors in the predicate itself, we avoid causing
    additional spurious 'type annotations needed' errors after a 'real'
    error has already occurred.
    
    With this PR, the diagnostic changes caused by PR rust-lang#91205 are reverted.
    Aaron1011 committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    6daa9f1 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Rollup merge of rust-lang#83791 - the8472:relax-zip-side-effect-guara…

    …ntee, r=dtolnay
    
    Weaken guarantee around advancing underlying iterators in zip
    
    The current guarantee (introduced in rust-lang#52279) is too strong as it prevents adapters from exploiting knowledge about the iterator length and using counted loops for example because they would stop calling `next()` before it ever returned `None`. Additionally several nested zip iterators already fail to uphold this.
    
    This does not yet remove any of the specialization code that tries (and sometimes fails) to uphold the guarantee for `next()`
    because removing it would also affect `next_back()` in more surprising ways.
    
    The intent is to be able to remove for example this branch
    
    https://github.com/rust-lang/rust/blob/36bcf4069717b9dff90270d13b53a3b130329960/library/core/src/iter/adapters/zip.rs#L234-L243
    
    or this test
    
    https://github.com/rust-lang/rust/blob/36bcf4069717b9dff90270d13b53a3b130329960/library/core/tests/iter/adapters/zip.rs#L177-L188
    
    Solves rust-lang#82303 by declaring it a non-issue.
    matthiaskrgr committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    8a1de25 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#90995 - the8472:hash-portability, r=dtolnay

    Document non-guarantees for Hash
    
    Dependence on endianness and type sizes was reported for enum discriminants in rust-lang#74215 but it is a more general
    issue since for example the default implementation of `Hasher::write_usize` uses native endianness.
    Additionally the implementations of library types are occasionally changed as their internal fields
    change or hashing gets optimized.
    
    ## Question
    
    Should this go on the module level documentation instead since it also concerns `Hasher` to some extent and not just `Hash`?
    
    resolves rust-lang#74215
    matthiaskrgr committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    0a40ade View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#91057 - the8472:clarify-parallelism-steady-…

    …state, r=dtolnay
    
    Expand `available_parallelism` docs in anticipation of cgroup quota support
    
    The "fixed" in "fixed steady state limits" means to exclude load-dependent resource prioritization
    that would calculate to 100% of capacity on an idle system and less capacity on a loaded system.
    
    Additionally I also exclude "system load" since it would be silly to try to identify
    other, perhaps higher priority, processes hogging some CPU cores that aren't explicitly excluded
    by masks/quotas/whatever.
    matthiaskrgr committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    ec408c9 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#91062 - jsha:static-file-replace, r=jyn514,…

    …GuillaumeGomez
    
    rustdoc: Consolidate static-file replacement mechanism
    
    There were a few places in rustdoc where we would take static JS or CSS and rewrite it at doc generation time to insert values. This consolidates all the CSS instances into one CSS file and replaces the JS examples with data- attributes on the rustdoc-vars div.
    
    Demo https://rustdoc.crud.net/jsha/static-file-replace/test_docs/
    
    r? `@GuillaumeGomez`
    matthiaskrgr committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    bdcc293 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#91254 - Aaron1011:impl-candidate-err-ty, r=…

    …lcnr
    
    Only check for errors in predicate when skipping impl assembly
    
    Prior to PR rust-lang#91205, checking for errors in the overall obligation
    would check checking the `ParamEnv`, due to an incorrect
    `super_visit_with` impl. With this bug fixed, we will now
    bail out of impl candidate assembly if the `ParamEnv` contains
    any error types.
    
    In practice, this appears to be overly conservative - when an error
    occurs early in compilation, we end up giving up early for some
    predicates that we could have successfully evaluated without overflow.
    By only checking for errors in the predicate itself, we avoid causing
    additional spurious 'type annotations needed' errors after a 'real'
    error has already occurred.
    
    With this PR, the diagnostic changes caused by PR rust-lang#91205 are reverted.
    matthiaskrgr committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    4102a2e View commit details
    Browse the repository at this point in the history