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 #71356

Merged
merged 12 commits into from
Apr 20, 2020
Merged

Rollup of 5 pull requests #71356

merged 12 commits into from
Apr 20, 2020

Commits on Apr 17, 2020

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

Commits on Apr 18, 2020

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

Commits on Apr 19, 2020

  1. Fix has_no_input_arg function has self check

    Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
    
    rename has_no_input_arg to has_only_self_parameter
    
    Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
    Rustin170506 committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    7c28dfe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    928eedb View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. Update pattern docs.

    ehuss committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    ca61fd5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77ee088 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b469d2d View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#71250 - GuillaumeGomez:use-json-instead-of-…

    …js, r=kinnison
    
    Replace big JS dict with JSON parsing
    
    Part of rust-lang#56545.
    
    @ollie27 suggested that using JSON instead of a JS dict might be faster, so I decided to test it. And the results far exceeded whatever expectations I had...
    
    I used https://github.com/adamgreig/stm32ral for my tests. If you want to build it locally:
    
    ```bash
    $ cargo doc --features doc --open
    ```
    
    But I strongly recommend to do it with this PR. Some numbers:
    
     * Loading a page with the JSON search-index: less than 1 second
     * Loading a page with the JS search-index: crashed after 30 seconds
    
    I think the results are clear enough...
    
    r? @ollie27
    
    cc @rust-lang/rustdoc
    Dylan-DPC committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    2f06ac0 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#71270 - Rustin-Liu:rustin-patch-has-self, r…

    …=estebank
    
    Fix `has_no_input_arg` check and rename it to `has_only_self_parameter`
    
    Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
    
    Fixes rust-lang#70643 (comment).
    Dylan-DPC committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    e80d303 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#71284 - JOE1994:serialize_id, r=petrochenkov

    fix -Zast-json to output correct JSON form
    
    fixes rust-lang#71086 (Reverts some of the changes made in rust-lang#70215)
    
    JSON output (from an empty library) after fix has something for **"id"** field
    ```shell
    lonelyjoe@lonelyjoe-desktop:~/workspace/empty_lib/src$ rustc lib.rs -Zast-json
    ```
    ```json
    {
       "module":{
          "inner":{
             "lo":0,
             "hi":94
          },
          "items":[
             {
                "attrs":[
                   {
                      "kind":{
                         "variant":"Normal",
                         "fields":[
                            {
                               "path":{
                                  "span":{
                                     "lo":0,
                                     "hi":0
                                  },
                                  "segments":[
                                     {
                                        "ident":{
                                           "name":"prelude_import",
                                           "span":{
                                              "lo":0,
                                              "hi":0
                                           }
                                        },
                                        "id":3,
                                        "args":null
                                     }
                                  ]
                               },
                               "args":"Empty"
                            }
                         ]
                      },
                      "id":null,
                      "style":"Outer",
                      "span":{
                         "lo":0,
                         "hi":0
                      }
                   }
                ],
                "id":4,
                "span":{
                   "lo":0,
                   "hi":0
                },
                "vis":{
                   "node":"Inherited",
                   "span":{
                      "lo":0,
                      "hi":0
                   }
                },
                "ident":{
                   "name":"",
                   "span":{
                      "lo":0,
                      "hi":0
                   }
                },
                "kind":{
                   "variant":"Use",
                   "fields":[
                      {
                         "prefix":{
                            "span":{
                               "lo":0,
                               "hi":0
                            },
                            "segments":[
                               {
                                  "ident":{
                                     "name":"{{root}}",
                                     "span":{
                                        "lo":0,
                                        "hi":0
                                     }
                                  },
                                  "id":5,
                                  "args":null
                               },
                               {
                                  "ident":{
                                     "name":"std",
                                     "span":{
                                        "lo":0,
                                        "hi":0
                                     }
                                  },
                                  "id":6,
                                  "args":null
                               },
                               {
                                  "ident":{
                                     "name":"prelude",
                                     "span":{
                                        "lo":0,
                                        "hi":0
                                     }
                                  },
                                  "id":7,
                                  "args":null
                               },
                               {
                                  "ident":{
                                     "name":"v1",
                                     "span":{
                                        "lo":0,
                                        "hi":0
                                     }
                                  },
                                  "id":8,
                                  "args":null
                               }
                            ]
                         },
                         "kind":"Glob",
                         "span":{
                            "lo":0,
                            "hi":0
                         }
                      }
                   ]
                },
                "tokens":null
             },
             {
                "attrs":[
                   {
                      "kind":{
                         "variant":"Normal",
                         "fields":[
                            {
                               "path":{
                                  "span":{
                                     "lo":0,
                                     "hi":0
                                  },
                                  "segments":[
                                     {
                                        "ident":{
                                           "name":"macro_use",
                                           "span":{
                                              "lo":0,
                                              "hi":0
                                           }
                                        },
                                        "id":9,
                                        "args":null
                                     }
                                  ]
                               },
                               "args":"Empty"
                            }
                         ]
                      },
                      "id":null,
                      "style":"Outer",
                      "span":{
                         "lo":0,
                         "hi":0
                      }
                   }
                ],
                "id":10,
                "span":{
                   "lo":0,
                   "hi":0
                },
                "vis":{
                   "node":"Inherited",
                   "span":{
                      "lo":0,
                      "hi":0
                   }
                },
                "ident":{
                   "name":"std",
                   "span":{
                      "lo":0,
                      "hi":0
                   }
                },
                "kind":{
                   "variant":"ExternCrate",
                   "fields":[
                      null
                   ]
                },
                "tokens":null
             }
          ],
          "inline":true
       },
       "attrs":[
    
       ],
       "span":{
          "lo":0,
          "hi":94
       },
       "proc_macros":[
    
       ]
    }
    ```
    Dylan-DPC committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    314b78c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#71328 - Mark-Simulacrum:stabilize-pathbuf-c…

    …apacity, r=sfackler
    
    Stabilize PathBuf capacity methods
    
    Closes rust-lang#58234.
    
    Stabilization FCP finished in rust-lang#58234 (comment).
    Dylan-DPC committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    7561714 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#71334 - ehuss:pattern-docs, r=kennytm

    Update pattern docs.
    
    A few changes to help clarify string pattern usage:
    
    * Add some examples and stability information in the `pattern` module.
    * Fixes the links at https://doc.rust-lang.org/std/str/pattern/ because intra-doc-links don't work with re-exported modules (rust-lang#65983 I think?).
    * Consistently use the same phrasing for `str` methods taking a pattern.
        * Also mention that array of `char` is also accepted.
    
    When `Pattern` is stabilized, the phrasing in the `str` methods can be updated to be more general to reflect the exact behavior. I'm reluctant to do this now because the stability story for `Pattern` is uncertain. It may perhaps look something like:
    
    > The pattern can be any type that implements the [`Pattern`] trait. Notable examples are `&str`, [`char`], arrays of [`char`], or functions or closures that determines if a character matches. Additional libraries might provide more complex patterns like regular expressions.
    
    This is complicated because methods like `trim_matches` have bounds, which for example don't support `str`, so those methods may need more elaboration.
    Dylan-DPC committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    b921587 View commit details
    Browse the repository at this point in the history