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 11 pull requests #78512

Merged
merged 32 commits into from
Oct 29, 2020
Merged

Rollup of 11 pull requests #78512

merged 32 commits into from
Oct 29, 2020

Commits on Oct 22, 2020

  1. Configuration menu
    Copy the full SHA
    4a15a25 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2020

  1. Configuration menu
    Copy the full SHA
    83ecbb4 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2020

  1. Configuration menu
    Copy the full SHA
    eb8e8bd View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2020

  1. Configuration menu
    Copy the full SHA
    0217edb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c90ef97 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e60f45 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c73adf View commit details
    Browse the repository at this point in the history
  5. Remove irrelevant FIXME

    varkor committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    a6d01da View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fab79c2 View commit details
    Browse the repository at this point in the history
  7. Assert in every case.

    hameerabbasi committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    22060fa View commit details
    Browse the repository at this point in the history
  8. Fix typo "compiltest"

    GuillaumeGomez committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    f553c22 View commit details
    Browse the repository at this point in the history
  9. rustdoc: js: Use getSettingValue for all rustdoc-* values

    Currently, storage.js and main.js have many open-coded calls to
    getCurrentValue for "rustdoc-" values, but these are settings and
    should be handled by getSettingValue.
    
    So make getSettingValue part of storage.js (where everyone can call
    it) and use it everywhere.
    
    No functional change yet.  We are going to make getSettingValue do
    something more sophisticated in a moment.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    2e10475 View commit details
    Browse the repository at this point in the history
  10. Inline NonZeroN::from(n)

    petertodd committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    0617156 View commit details
    Browse the repository at this point in the history
  11. Update books

    ehuss committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    23167cb View commit details
    Browse the repository at this point in the history
  12. rustdoc: Provide a way to set the default settings from Rust code

    rustdoc has various user-configurable preferences.  These are recorded
    in web Local Storage (where available).  But we want to provide a way
    to configure the default default, including for when web storage is
    not available.
    
    getSettingValue is the function responsible for looking up these
    settings.  Here we make it fall back some in-DOM data, which
    ultimately comes from RenderOptions.default_settings.
    
    Using HTML data atrtributes is fairly convenient here, dsspite the
    need to transform between snake and kebab case to avoid the DOM
    converting kebab case to camel case (!)
    
    We cache the element and dataset lookup in a global variable, to
    ensure that getSettingValue remains fast.
    
    The DOM representation has to be in an element which precedes the
    inclusion of storage.js.  That means it has to be in the <head> and we
    should not use an empty <div> as the container (although most browsers
    will accept that).  An empty <script> element provides a convenient
    and harmless container object.  <meta> would be another possibility
    but runs a greater risk of having unwanted behaviours on weird
    browsers.
    
    We trust the RenderOptions not to contain unhelpful setting names,
    which don't fit nicely into an HTML attribute.  It's awkward to quote
    dataset keys.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    5cd96d6 View commit details
    Browse the repository at this point in the history
  13. rustdoc: Provide a general --default-setting SETTING[=VALUE] option

    We just plumb through what the user tells us.
    
    This is flagged as unstable, mostly because I don't understand the
    compatibility rules that rustdoc obeys for local storage data, and how
    error handling of invalid data works.
    
    We collect() the needed HashMap from Vec of Vecs of (key, value)
    pairs, so that there is a nice place to add new more-specific options.
    It would have been possible to use Extend::extend but doing it this
    way ensures that all the used inputs are (and will stay) right next to
    each other.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    d8a4497 View commit details
    Browse the repository at this point in the history
  14. rustdoc: Provide a --default-theme THEME option

    This is a fairly simple special case of --default-eetting.  We must
    set both "theme" and "use-system-theme".
    
    Providing it separately enables us to document a way to set the theme
    without expoosing the individual settings keywords, which are quite
    complex.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    709efd9 View commit details
    Browse the repository at this point in the history
  15. Fix typos

    bugadani committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    0fabbf9 View commit details
    Browse the repository at this point in the history
  16. rustdoc: Fix some nits

    * Remove a needless comma in the Rust code
    * Replace double spaces after full stops with single spaces
    
    Requested-by: @GuillaumeGomez
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    39b80cb View commit details
    Browse the repository at this point in the history
  17. Add a comment about non-panicking of splitn().next().unwrap()

    Co-authored-by: Joshua Nelson <joshua@yottadb.com>
    ijackson and Joshua Nelson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    1d6c860 View commit details
    Browse the repository at this point in the history
  18. rustdoc: Use Vec::into_iter() rather than drain()

    This allows removing a `mut` which is nicer.
    
    Suggested-by: @jyn514
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    776e204 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2020

  1. Rollup merge of rust-lang#77213 - ijackson:wip-rustdoc-settings, r=jy…

    …n514,GuillaumeGomez
    
    rustdoc options to set default theme (and other settings)
    
    Hi.  This is the MR I promised in rust-lang#77024
    
    It is a little more general than I envisaged there.  Once I had found the settings-handling machinery it seemed foolish to add this feature just for the theme.
    
    Closes rust-lang#77024
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    2008d1b View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#78224 - lcnr:repeat-expr, r=varkor

    min_const_generics: allow ty param in repeat expr
    
    implements https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/repeat.20expressions
    
    Even with `min_const_generics` active, now keeps resulting in future compat warnings instead of hard errors.
    Const parameters, for example `[0; N + 1]`, still result in hard errors during resolve.
    ```rust
    #![allow(dead_code)]
    
    fn foo<T>() {
        [0; std::mem::size_of::<*mut T>()];
    }
    
    struct Foo<T>(T);
    
    impl<T> Foo<T> {
        const ASSOC: usize = 4;
    
        fn test() {
            [0; Self::ASSOC];
        }
    }
    ```
    
    r? @varkor cc @petrochenkov
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    270d2e0 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#78428 - JulianKnodt:invalid_patterns, r=lcnr

    MinConstGenerics UI test for invalid values for bool & char
    
    This adds a test for `feature(min_const_generics)` with some invalid values for bools and chars and ensures that they do not ICE and error with understandable messages.
    
    r? @lcnr
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    2555e07 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#78460 - varkor:turbofish-string-generic, r=…

    …lcnr
    
    Adjust turbofish help message for const generics
    
    Types are no longer special. (This message arguably only makes sense with `min_const_generics` or more, but we'll be there soon.)
    
    r? @lcnr
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    a7a0538 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#78470 - camelid:fixup-std-path-intra-doc, r…

    …=jyn514
    
    Clean up intra-doc links in `std::path`
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    7eb7b5a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#78475 - RalfJung:validity-comment, r=oli-obk

    fix a comment in validity check
    
    A few things changed since that comment was written; update it to the current reality.
    
    r? @oli-obk
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    5e3cc6e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#78478 - hameerabbasi:const-generics-supertr…

    …aits, r=lcnr
    
    Add const generics tests for supertraits + dyn traits.
    
    Partially addresses rust-lang#78433
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    572ea25 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#78487 - rust-lang:GuillaumeGomez-patch-1, r…

    …=steveklabnik
    
    Fix typo "compiltest"
    
    Part of rust-lang#70898.
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    ad10128 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#78491 - petertodd:2020-inline-from-nonzero,…

    … r=sfackler
    
    Inline NonZeroN::from(n)
    
    Currently this results in the generated assembly having a function call for this trivial conversion.
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    c779223 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#78492 - ehuss:update-books, r=ehuss

    Update books
    
    ## nomicon
    
    7 commits in 6e57e64501f61873ab80cb78a07180a22751a5d6..69333eddb1de92fd17e272ce4677cc983d3bd71d
    2020-09-14 11:40:23 -0400 to 2020-10-17 15:44:12 -0700
    - Tweak GHA config (rust-lang/nomicon#240)
    - Fix link for `[T]` (rust-lang/nomicon#239)
    - Update casts.md (rust-lang/nomicon#232)
    - [WIP] Add more links (rust-lang/nomicon#180)
    - Data Race definition should be more precise (rust-lang/nomicon#219)
    - Update the diagnostic of `error[E0597]` in dropck.md (rust-lang/nomicon#157)
    - fix typo in Lifetimes mutable reference aliasing section (rust-lang/nomicon#225)
    
    ## reference
    
    3 commits in 1b78182e71709169dc0f1c3acdc4541b6860e1c4..10c16caebe475d0d11bec0531b95d7697856c13c
    2020-10-11 13:53:47 -0700 to 2020-10-25 20:51:26 -0700
    - Add `unsafe` for `mod` and `extern`. (rust-lang/reference#898)
    - mention how unions interact with dropping (rust-lang/reference#897)
    - Add `move_ref_pattern` docs (rust-lang/reference#881)
    
    ## book
    
    2 commits in 451a1e30f2dd137aa04e142414eafb8d05f87f84..13e1c05420bca86ecc79e4ba5b6d02de9bd53c62
    2020-10-05 09:11:18 -0500 to 2020-10-20 14:57:32 -0500
    - Referencing to Appendix B (rust-lang/book#2481)
    - Use GITHUB_PATH instead of add-path (rust-lang/book#2477)
    
    ## rust-by-example
    
    2 commits in 152475937a8d8a1f508d8eeb57db79139bc803d9..99eafee0cb14e6ec641bf02a69d7b30f6058349a
    2020-10-09 09:29:50 -0300 to 2020-10-21 14:21:55 -0300
    - Formatting footer items. (rust-lang/rust-by-example#1385)
    - Add partial moves example for `move_ref_pattern` stabilization (rust-lang/rust-by-example#1377)
    
    ## edition-guide
    
    3 commits in 81f16863014de60b53de401d71ff904d163ee030..7bc9b7a5e800f79df62947cb7d566fd2fbaf19fe
    2020-08-27 13:56:31 -0700 to 2020-10-23 18:31:23 -0500
    - A few small updates. (rust-lang/edition-guide#221)
    - Clarify the limitation of ? in main and tests (rust-lang/edition-guide#219)
    - Update deprecated GitHub Actions commands. (rust-lang/edition-guide#220)
    JohnTitor committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    218af6f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    30d1d8f View commit details
    Browse the repository at this point in the history