Commit Graph

139102 Commits

Author SHA1 Message Date
Michael Howell
dcf49916e4 Fix formatting for description rustdoc UI tests 2021-02-20 17:50:01 -07:00
Michael Howell
8b3b1c922e Add rustdoc UI tests for new description behaviour 2021-02-20 17:43:13 -07:00
Michael Howell
bcef5e7077 Revert changes to all.html
This code wasn't actually working, and trying to SEO optimize that page is pointless anyway.
2021-02-20 17:26:05 -07:00
bors
a31c16212d Auto merge of #82253 - RalfJung:miri, r=RalfJung
update Miri

Fixes Miri breakage (no issue was created as the toolstate tracking is currently broken: https://github.com/rust-lang/rust/issues/82254)
2021-02-21 00:19:45 +00:00
Tomasz Miąsko
88753cead8 test: Print test name only once on timeout
Pretty formatter when using multiple test threads displays test name twice on
timeout event. This implicitly suggest that those are two different events,
while in fact they are always printed together.

Print test name only once.

Before:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) ... test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```

After:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```
2021-02-21 00:00:00 +00:00
Michael Howell
1bedd4d678 Cut off plain text descriptions after headers
Before:

    The Rust Standard LibraryThe Rust Standard Library is the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem. It offers core types, like `Vec<T>` and `Option<T>`, library-defined operations on language primitives, standard macros, I/O and multithreading, among many other things.

After:

    The Rust Standard Library
2021-02-20 16:48:37 -07:00
Michael Howell
553852806d Use the first paragraph, instead of cookie-cutter text, for rustdoc descriptions
Fixes #82283
2021-02-20 16:48:37 -07:00
kennytm
45da2277a0 Fix some Python2->3 error in publish_toolstate.py by type-checking it 2021-02-20 18:48:22 -05:00
Morten Lohne
19a377510c Fix FP in inherent_to_string when the function has generic parameters 2021-02-21 00:11:17 +01:00
Esteban Küber
8ead8f57c6 Add A-diagnostics bug report template 2021-02-20 17:55:54 -05:00
Camille GILLOT
a87de890fd Move print_query_stack to rustc_query_system. 2021-02-20 23:40:56 +01:00
Camille GILLOT
c26d965714 Move report_cycle to rustc_query_system.
The call to `ty::print::with_forced_impl_filename_line`
is done when constructing the description,
at the construction of the QueryStackFrame.
2021-02-20 23:36:31 +01:00
Joshua Nelson
b1a4bca3e6 Use the new name for split-debuginfo 2021-02-20 17:19:30 -05:00
Mark Rousskov
7179be8789 Don't apply semicolon in expressions from macros yet
std_detect is still using this and as it's in a submodule updating it will be a
pain. We can catch this either after a stdarch submodule bump or just on the
next cycle.
2021-02-20 17:19:30 -05:00
Joshua Nelson
3733275854 Update the bootstrap compiler
Note this does not change `core::derive` since it was merged after the
beta bump.
2021-02-20 17:19:30 -05:00
The8472
c07197046d remove redundant box wrapper 2021-02-20 23:12:56 +01:00
The8472
6dc948e723 limit rustfmt parallelism by taking -j into account 2021-02-20 23:12:56 +01:00
The8472
211d49c73c parallelize x.py test tidy
old:

```
real	0m11.123s
user	0m14.495s
sys	0m5.227s
```

new:

```
real	0m2.767s
user	0m13.014s
sys	0m1.691s
```
2021-02-20 23:12:53 +01:00
Camille GILLOT
3897395787 Move Query to rustc_query_system.
Rename it to QueryStackFrame and document a bit.
2021-02-20 22:53:47 +01:00
Camille GILLOT
0144d6a3b7 Do not hold query key in Query. 2021-02-20 22:53:46 +01:00
Camille GILLOT
f96e960ccf Access the session directly from DepContext. 2021-02-20 22:53:46 +01:00
Jan-Erik Rediger
8d6ad11ab2
iOS simulator: pick the target based on the environment variable
LLVM picks the right things to put into the compiled object file based
on the target deployment version.
We need to communicate it through the target triple.
Only with that LLVM will use the right commands in the file to make it
look and behave like code compiled for the arm64 iOS simulator target.
2021-02-20 16:45:00 -05:00
bors
d2b38d6b3c Auto merge of #82341 - GuillaumeGomez:rollup-t7y7tyg, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #80595 (`impl PartialEq<Punct> for char`; symmetry for #78636)
 - #81991 (Fix panic in 'remove semicolon' when types are not local)
 - #82176 (fix MIR fn-ptr pretty-printing)
 - #82244 (Keep consistency in example for Stdin StdinLock)
 - #82260 (rustc: Show ``@path`` usage in stable)
 - #82316 (Fix minor mistake in LTO docs.)
 - #82332 (Don't generate src link on dummy spans)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-20 21:38:53 +00:00
Giacomo Stevanato
3ec1a28418 Add FIXME for safety comments that are invalid when T is a ZST 2021-02-20 15:44:17 -05:00
Giacomo Stevanato
9b4e61255c Document BinaryHeap unsafe functions 2021-02-20 15:44:17 -05:00
Reese Williams
d8540ae5a9 Fix suggestion span and move suggestions into new subwindow. 2021-02-20 15:33:08 -05:00
Yoshitomo Nakanishi
d646aa2ae7 Fix unnecessary_sort_by.rs that fails the dogfood test 2021-02-21 05:05:13 +09:00
Yoshitomo Nakanishi
d23038944a New lint: inconsistent_struct_constructor 2021-02-21 05:05:11 +09:00
Guillaume Gomez
fc0cb5d5eb
Rollup merge of #82332 - GuillaumeGomez:no-src-link-on-dummy-spans, r=jyn514
Don't generate src link on dummy spans

Just realized that the "auto trait impls" had `[src]` links were leading to the crate root because they were dummy spans. This PR fixes this issue.

cc `@jyn514`
r? `@camelid`
2021-02-20 20:37:04 +01:00
Guillaume Gomez
77b6f96054
Rollup merge of #82316 - ehuss:lto-doc-fix, r=GuillaumeGomez
Fix minor mistake in LTO docs.

`-C lto=true` isn't a valid option.
2021-02-20 20:37:03 +01:00
Guillaume Gomez
8c095619cb
Rollup merge of #82260 - ojeda:rustc-argfile, r=jyn514
rustc: Show `@path` usage in stable

The feature was stabilized in #66172, but the usage string was not updated to be shown.
2021-02-20 20:37:02 +01:00
Guillaume Gomez
c26a8bbd6d
Rollup merge of #82244 - pickfire:patch-6, r=dtolnay
Keep consistency in example for Stdin StdinLock

Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
2021-02-20 20:37:01 +01:00
Guillaume Gomez
2d39300e2f
Rollup merge of #82176 - RalfJung:mir-fn-ptr-pretty, r=oli-obk
fix MIR fn-ptr pretty-printing

An uninitialized function pointer would get printed as `{{uninit  fn()}` (notice the unbalanced parentheses), and a dangling fn ptr would ICE. This fixes both of that.

However, I have no idea how to add tests for this.

Also, I don't understand this MIR pretty-printing code. Somehow the print function `pretty_print_const_scalar` actually *returns* a transformed form of the const (but there is no doc comment explaining what is being returned); some match arms do `p!` while others do `self =`, and there's a wild mixture of `p!` and `write!`... all very mysterious and confusing.^^

r? ``@oli-obk``
2021-02-20 20:37:00 +01:00
Guillaume Gomez
39af025741
Rollup merge of #81991 - osa1:issue81839, r=estebank
Fix panic in 'remove semicolon' when types are not local

It's not possible to check if removing a semicolon fixes the type error
when checking match arms and one or both of the last arm's and the
current arm's return types are imported "opaque" types. In these cases
we don't generate a "consider removing semicolon" suggestions.

Fixes #81839

---

I'm not sure how to add a test for this. I think the test would need at least two crates. Do we have any existing tests that do this so that I can take a look?
2021-02-20 20:36:57 +01:00
Guillaume Gomez
d38f6e82a4
Rollup merge of #80595 - pthariensflame:patch-1, r=m-ou-se
`impl PartialEq<Punct> for char`; symmetry for #78636

Also fixes the "since" version of the original.

Pinging ``@dtolnay`` and ``@petrochenkov.``
2021-02-20 20:36:54 +01:00
bors
83b30a639d Auto merge of #70951 - cjgillot:anarchy, r=oli-obk
Move the query engine out of rustc_middle

The handling of queries is moved to a trait `QueryEngine`.
It replaces `query::Queries` in the `TyCtxt`, allowing to move the query engine out of librustc_middle.

There are 2 modes to access the query engine: through `TyCtxt` and dynamic dispatch,
or through a `QueryCtxt`. The `QueryCtxt` is  required for everything touching the `OnDiskCache`.

For now, I put it in librustc_incremental, which is very small.
This may not be the best place.

A significant part of the codegen time for librustc_middle is moved to the recipient crate.

This PR may require a perf run.

cc #65031
r? `@Zoxc`
2021-02-20 18:58:05 +00:00
Guillaume Gomez
0c511c9115 Add test for no src links on dummy spans 2021-02-20 19:51:38 +01:00
Guillaume Gomez
3071685505 Don't render [src] link on dummy spans 2021-02-20 19:51:38 +01:00
ThibsG
5af6f96c8f Fix camel case postfix for enum_variant_names lint 2021-02-20 19:48:04 +01:00
Ralf Jung
d496bfc161 all InterpError allocate now, so adjust alloc-error-check 2021-02-20 19:01:25 +01:00
Ralf Jung
3b81b47617 update Miri 2021-02-20 18:55:50 +01:00
r00ster91
447ce27198 Make "missing field" error message more natural 2021-02-20 18:32:02 +01:00
Simonas Kazlauskas
925ed4828d Update LLVM to pull in fixes to llvm-dwp
Includes https://github.com/rust-lang/llvm-project/pull/90 in
particular.
2021-02-20 15:56:36 +02:00
Simonas Kazlauskas
a0e8103ea3 Test CU directory is the work_dir
Make sure that we don't regress setting of the CU directory to the
working directory.
2021-02-20 15:56:36 +02:00
Henry Boisdequin
a9c6188889 make super_projection take a PlaceRef 2021-02-20 16:56:08 +05:30
Ralf Jung
e90674574d fn ptr pretty printing: fall back to raw ptr printing 2021-02-20 11:34:35 +01:00
bors
e7c23ab933 Auto merge of #82124 - tmiasko:op-ty-ref, r=oli-obk
Pass large interpreter types by reference, not value

r? `@ghost`
2021-02-20 10:20:42 +00:00
Dániel Buga
10f234240d Remove some P-s 2021-02-20 10:51:26 +01:00
bors
67087a1b4e Auto merge of #6717 - booleancoercion:master, r=llogiq
Add the from_str_radix_10 lint

changelog: added the new `from_str_radix_10` which sometimes replaces calls to `primitive::from_str_radix` to `str::parse`

This is ready to be merged, although maybe the category should be `pedantic` instead of `style`? I'm not sure where it fits better.

Closes #6713.
2021-02-20 09:33:11 +00:00
bors
da5f7f1093 Auto merge of #81427 - klensy:eat-digits, r=m-ou-se
simplify eat_digits

Simplify eat_digits by checking values in iterator, plus decrease function size, by returning unchecked slices.

https://godbolt.org/z/cxjav4
2021-02-20 07:31:43 +00:00