Commit Graph

109614 Commits

Author SHA1 Message Date
Matthias Krüger
7e2ebb0789 submodules: update clippy from 8485d40a to 23549a8c
Changes:
````
rustup https://github.com/rust-lang/rust/pull/69738
rustup https://github.com/rust-lang/rust/pull/68944
Make use of `or_patterns` feature
rustup https://github.com/rust-lang/rust/pull/69589/
Rustup to rust-lang/rust#69076
Don't convert Path to lossy str
Use `into_path`
Use pattern matching instead of manually checking condition
Fix typo
Remove git2 dependency.
Document that wildcard_imports doesn't warn about `use ...::prelude::*;`
Change changelog formatting
Update changelog_update doc to reflect the actual ordering of the changelog
Update CHANGELOG.md
````

Fixes #70007
2020-03-16 19:06:15 +01:00
Oliver Scherer
7894509b00 Fiddle ParamEnv through to a place that used to use ParamEnv::empty in a buggy manner 2020-03-16 18:51:55 +01:00
Guillaume Gomez
496256c561 Update src/librustdoc/html/static/main.js
Fix variable name

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-03-16 18:30:26 +01:00
Guillaume Gomez
d964e60e4f Rename render::Type to improve naming 2020-03-16 18:30:26 +01:00
Guillaume Gomez
5654cde729 formatting 2020-03-16 18:30:26 +01:00
Guillaume Gomez
e78c451733 Add tests for new of variables 2020-03-16 18:30:26 +01:00
Guillaume Gomez
2f44857735 Update JS results tester 2020-03-16 18:29:19 +01:00
Guillaume Gomez
b9167e6c7d Support type search for arguments and returned types 2020-03-16 18:29:19 +01:00
Matthew Jasper
ec862703fd Make macro metavars respect (non-)hygiene 2020-03-16 17:13:48 +00:00
TyPR124
ef2957de13 allowing getting &mut OsStr from OsString 2020-03-16 13:13:07 -04:00
lzutao
e1bc9af9eb Fix wrong deref 2020-03-16 23:54:32 +07:00
lzutao
ce5e49f86f Use sublice patterns to avoid computing the len 2020-03-16 23:43:42 +07:00
Ralf Jung
a2160e6a4a make mem::{zeroed,uninitialized} inline(always) 2020-03-16 17:37:26 +01:00
bors
dd67187965 Auto merge of #67133 - oli-obk:it_must_be_a_sign, r=eddyb
Deduplicate pretty printing of constants

r? @eddyb for the pretty printing logic
cc @RalfJung
2020-03-16 16:31:23 +00:00
DutchGhost
0760803c06 rather than removing const_forget_box, stick an attribute on it and explain it cant be called in ctfe yet 2020-03-16 14:45:37 +01:00
Ralf Jung
996a51bcd0 init-large-type test needs optimizations 2020-03-16 14:38:33 +01:00
bors
59f4ba9504 Auto merge of #70040 - Dylan-DPC:rollup-id1k6lz, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #67335 (Refactor the `Qualif` trait)
 - #69122 (Backtrace Debug tweaks)
 - #69520 (Make error message clearer about creating new module)
 - #69738 (More Method -> AssocFn renaming)
 - #69867 (Add long error explanation for E0628 )
 - #69989 (resolve/hygiene: `macro_rules` are not "legacy")
 - #70036 (Make article_and_description primarily use def_kind)

Failed merges:

r? @ghost
2020-03-16 13:22:56 +00:00
DutchGhost
dcc23217b7 The const_forget_box was unused, and doesns't add anything to test by itself. 2020-03-16 13:24:59 +01:00
Dylan DPC
d8dbb3c041 Rollup merge of #70036 - mark-i-m:describe-it-4, r=eddyb
Make article_and_description primarily use def_kind

r? @eddyb

cc @matthewjasper
2020-03-16 13:16:45 +01:00
Dylan DPC
8872d90572 Rollup merge of #69989 - petrochenkov:nolegacy, r=eddyb,matthewjasper
resolve/hygiene: `macro_rules` are not "legacy"

The "modern" vs "legacy" naming was introduced by jseyfried during initial implementation of macros 2.0.
At this point it's clear that `macro_rules` are not going anywhere and won't be deprecated in the near future.
So this PR changes the naming "legacy" (when it implies "macro_rules") to "macro_rules".
This should also help people reading this code because it's wasn't obvious that "legacy" actually meant "macro_rules" in these contexts.

The most contentious renaming here is probably
```
fn modern -> fn normalize_to_macros_2_0
fn modern_and_legacy -> fn normalize_to_macro_rules
```
Other alternatives that I could think of are `normalize_to_opaque`/`normalize_to_semitransparent`, or `strip_non_opaque`/`strip_transparent`, but they seemed less intuitive.
The documentation to these functions can be found in `symbol.rs`.

r? @matthewjasper
2020-03-16 13:16:44 +01:00
Dylan DPC
8f2482b801 Rollup merge of #69867 - ayushmishra2005:doc/61137-add-long-error-code-e0628, r=Dylan-DPC
Add long error explanation for E0628

Add long explanation for the E0628 error code
Part of #61137

r? @GuillaumeGomez
2020-03-16 13:16:42 +01:00
Dylan DPC
0d7c82e7f2 Rollup merge of #69738 - mark-i-m:assoc-fn-2, r=eddyb
More Method -> AssocFn renaming

r? @Centril @eddyb

cc #60163

Blocked on #69674
2020-03-16 13:16:40 +01:00
Dylan DPC
1685264f12 Rollup merge of #69520 - kornelski:e69492, r=cramertj
Make error message clearer about creating new module

This is a partial improvement for #69492
2020-03-16 13:16:38 +01:00
Dylan DPC
2443eb46cf Rollup merge of #69122 - dtolnay:backtrace, r=cramertj
Backtrace Debug tweaks

- Change Debug representation of disabled and unsupported backtraces to use \<placeholder\> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    ```diff
    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
    ```

- Remove quotes around unresolved symbol names;

    ```diff
    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
    ```

- Add quotes around file paths;

    ```diff
    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
    ```

- Add test.
2020-03-16 13:16:35 +01:00
Dylan DPC
59b0058c0c Rollup merge of #67335 - ecstatic-morse:qualif-refactor, r=eddyb
Refactor the `Qualif` trait

This PR attempts to preserve the existing semantics of the `Qualif` trait while reducing its API to two significant methods with descriptive names, `in_any_value_of_ty` and `in_adt_inherently`. The other `in_*` methods have been made into free functions, since they should never be overloaded. Finally, I changed the bounds on the `in_local` argument to be less restrictive (`FnMut` instead of `Fn`), which addresses a FIXME in the const-checker.

r? @eddyb
cc @pnkfelix @oli-obk
2020-03-16 13:16:30 +01:00
Camille GILLOT
5557407fbb Remove QueryState type alias. 2020-03-16 11:06:53 +01:00
Camille GILLOT
3abd4753b7 Make QueryCache parameters associated types. 2020-03-16 11:06:50 +01:00
DutchGhost
57b1e7a428 Remove the call that makes miri fail 2020-03-16 10:51:00 +01:00
Camille GILLOT
7309b3cd8b Simplify type aliases. 2020-03-16 10:23:50 +01:00
Camille GILLOT
7d84f4fb16 Offload try_collect_active_jobs. 2020-03-16 10:22:45 +01:00
Camille GILLOT
5dc7c2ed1a Remove Q parameter from try_get_cached. 2020-03-16 09:48:38 +01:00
Camille GILLOT
fa0794db23 Remove Q parameter from JobOwner. 2020-03-16 09:46:27 +01:00
Camille GILLOT
d125bbb12b Remove Q parameter from query stats. 2020-03-16 09:44:39 +01:00
Camille GILLOT
a18aa81bd8 Remove Q parameter from alloc_self_profile_query_strings_for_query_cache. 2020-03-16 09:42:34 +01:00
Camille GILLOT
fa02dca428 Remove Q parameter from QueryCache::lookup. 2020-03-16 09:40:29 +01:00
Camille GILLOT
a0f57e24e3 Unpack type arguments for QueryState. 2020-03-16 09:39:11 +01:00
Camille GILLOT
486a082c58 Unpack type arguments for QueryLookup. 2020-03-16 09:36:28 +01:00
Camille GILLOT
b08943358e Unpack type arguments for QueryStateShard. 2020-03-16 09:34:57 +01:00
Camille GILLOT
1249032aab Move impl of Queries with its definition. 2020-03-16 09:12:31 +01:00
Camille GILLOT
cf238fd057 Inline QueryAccessor::query. 2020-03-16 09:11:30 +01:00
Camille GILLOT
fc82376bc4 Make QueryAccessor::dep_kind an associated const. 2020-03-16 09:10:16 +01:00
bors
8e6de3244c Auto merge of #70010 - Amanieu:fix-opt-catch, r=Mark-Simulacrum
Add a workaround for catch_unwind in stage1 mingw target

Fixes #70001

cc @petrochenkov

r? @Mark-Simulacrum
2020-03-16 08:08:51 +00:00
Camille GILLOT
0bf5cae489 Remove __query_compute module. 2020-03-16 09:07:58 +01:00
mark
2c2d41dc00 make article_and_description primarily use def_kind 2020-03-15 23:31:17 -05:00
bors
97eda01bb7 Auto merge of #70034 - Dylan-DPC:rollup-5yg771j, r=Dylan-DPC
Rollup of 8 pull requests

Successful merges:

 - #69686 (Use `pprust` to print attributes in rustdoc)
 - #69858 (std: on Windows, use GetSystemTimePreciseAsFileTime if it is available)
 - #69917 (Cleanup E0412 and E0422)
 - #69964 (Add Node.js to PR CI image)
 - #69992 (Block version-specific docs from search engines)
 - #69995 (Add more context to the literal overflow message)
 - #69998 (Add long error explanation for E0634)
 - #70014 (Small fixes in rustdoc book)

Failed merges:

r? @ghost
2020-03-16 02:52:47 +00:00
Mazdak Farrokhzad
4392a8b73c use direct imports for rustc::{lint, session}. 2020-03-16 02:52:06 +01:00
Mazdak Farrokhzad
73a625b5fb remove unnecessary hir::map imports 2020-03-16 02:49:19 +01:00
Mark Mansi
1b92e86a1c MethodData -> AssocFnData 2020-03-15 19:58:17 -05:00
Mark Mansi
e3c15ae6bc update comment 2020-03-15 19:58:09 -05:00
Dylan DPC
6b50a4cebb Rollup merge of #70014 - TimotheeGerber:small-fix-rustdoc-book, r=Dylan-DPC
Small fixes in rustdoc book

I read the `rustdoc` book today and noticed some small typos/problems. Mainly:

 - `# fn foo() {}` was displayed when not needed because fenced block code type was `text` instead of `rust`;
 - two path separators were missing and some Windows-style separators were not consistent with the rest of them (mainly Linux-style).

Here are my proposed fixes. It is my first PR for the rust project. Don't hesitate to tell me if I am doing it wrong or if you need anything else.

Have a nice day!
2020-03-16 01:30:41 +01:00