Commit Graph

149657 Commits

Author SHA1 Message Date
bjorn3
db4d8e2cab Store boxed metadata loader in CrateLoader 2021-06-08 19:24:16 +02:00
bjorn3
ecc68e7879 Replace Pin::new with .as_mut() 2021-06-08 19:24:16 +02:00
bjorn3
bddf151dea Use more accurate lifetimes 2021-06-08 19:24:16 +02:00
bjorn3
1b7ec34878 Inline PinnedGenerator 2021-06-08 19:24:16 +02:00
bjorn3
99e112d282 Inline the rest of box_region 2021-06-08 19:24:16 +02:00
bjorn3
86b3ebe2da Inline box_region macro calls 2021-06-08 19:24:15 +02:00
bjorn3
8f397bc8a0 Simplify box_region macros 2021-06-08 19:24:15 +02:00
bors
a50d72158e Auto merge of #86127 - JohnTitor:rollup-0c6mp3j, r=JohnTitor
Rollup of 11 pull requests

Successful merges:

 - #85906 (Use `Iterator::find` instead of open-coding it)
 - #85951 (Update the documentation of `-C force-unwind-tables` for #83482)
 - #85985 (Clarify documentation of slice sorting methods)
 - #85989 (Remove rustfmt tests from top-level .gitattributes)
 - #86074 (Default panic message should print Box<dyn Any>)
 - #86078 (Type page font weight)
 - #86090 (⬆️ rust-analyzer)
 - #86095 (Search description codeblock)
 - #86096 (Comment out unused error codes and add description for E0316)
 - #86101 (Correct type signature in doc for Bound::as_mut)
 - #86103 (Remove lifetime hack)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-08 07:04:31 +00:00
Yuki Okushi
b7fadfddcb
Rollup merge of #86103 - camsteffen:lifetime-hack, r=jackh726
Remove lifetime hack

It compiles without the hack. But I don't know why. I can't get the example in the referenced issue to compile...
2021-06-08 13:26:38 +09:00
Yuki Okushi
a416e05d27
Rollup merge of #86101 - glittershark:bound-as-mut-doc-fix, r=m-ou-se
Correct type signature in doc for Bound::as_mut

Thanks to ``@drmason13`` for pointing this out!
2021-06-08 13:26:37 +09:00
Yuki Okushi
2e8ffed861
Rollup merge of #86096 - FabianWolff:ec-E0316, r=GuillaumeGomez
Comment out unused error codes and add description for E0316

I have added an extended description of `E0316` and commented out a bunch of unused error codes to make clear the fact that they are no longer in use. You can check for yourself with
```shell
for ec in                                                \
    E0314 E0315   E0473 E0474 E0475   E0479 E0480 E0481  \
    E0483 E0484 E0485 E0486 E0487 E0488 E0489
do
    if [ ! -z "`grep -r $ec compiler/* --exclude-dir=rustc_error_codes`" ]
    then
        echo $ec
        false
    fi
done
```
i.e. these error codes appear nowhere in the compiler code and thus cannot be emitted.

r? ```@GuillaumeGomez```
2021-06-08 13:26:36 +09:00
Yuki Okushi
f99a892e6d
Rollup merge of #86095 - GuillaumeGomez:search-description-codeblock, r=jsha
Search description codeblock

The codeblocks are not displayed correctly:

![Screenshot from 2021-06-07 11-11-53](https://user-images.githubusercontent.com/3050060/120991915-5fb05680-c782-11eb-9b32-973a64b1f631.png)

This PR interprets the HTML correctly (and still prevent invalid HTML because of how it inserts it):

![Screenshot from 2021-06-07 11-12-00](https://user-images.githubusercontent.com/3050060/120991919-6048ed00-c782-11eb-8ac5-c3aa6508bc8b.png)

r? ```@jsha```
2021-06-08 13:26:35 +09:00
Yuki Okushi
e062121f03
Rollup merge of #86090 - lnicola:rust-analyzer-2021-06-07, r=jonas-schievink
⬆️ rust-analyzer
2021-06-08 13:26:33 +09:00
Yuki Okushi
c783e28905
Rollup merge of #86078 - GuillaumeGomez:type-page-font-weight, r=jsha
Type page font weight

Fixes https://github.com/rust-lang/rust/issues/86069.

r? ```@jsha```
2021-06-08 13:26:32 +09:00
Yuki Okushi
b7d05f8165
Rollup merge of #86074 - reaganmcf:iss-86039, r=jyn514
Default panic message should print Box<dyn Any>

Closes #86039

Prior to this patch, the panic message from running the following code would be `thread 'main' panicked at 'Box<Any>'...`
```rust
use std::panic::panic_any;
fn main() {
    panic_any(42);
}
```

This patch updates the phrasing to be more consistent. It now instead shows the following panic message:

```
thread 'main' panicked at 'Box<dyn Any>', ...
```

It's a very small fix 😄
2021-06-08 13:26:31 +09:00
Yuki Okushi
c3028101a2
Rollup merge of #85989 - jyn514:gitignore-cleanup, r=ehuss
Remove rustfmt tests from top-level .gitattributes

These are tracked in src/tools/rustfmt/.gitattributes already, they
don't need to be listed twice.

r? `@ehuss` since you suggested adding them in https://github.com/rust-lang/rust/pull/82208/#issuecomment-841440199; I think it should be ok now that bors isn't trying to merge the `subtree add` changes.

cc `@calebcartwright`
2021-06-08 13:26:30 +09:00
Yuki Okushi
2a23af6341
Rollup merge of #85985 - Lionelf329:master, r=joshtriplett
Clarify documentation of slice sorting methods

After reading about [this](https://polkadot.network/a-polkadot-postmortem-24-05-2021/), I realized that although the documentation of these methods is not ambiguous in its current state, it is very easy to read it and erroneously assume that their exact behaviour can be relied upon to be deterministic. Although the docs make no guarantees about which index is returned when there are multiple matches, being more explicit about when and how their determinism can be relied upon should help prevent people from making this mistake in the future.

r? ``@steveklabnik``
2021-06-08 13:26:29 +09:00
Yuki Okushi
3502bff900
Rollup merge of #85951 - hyd-dev:force-unwind-tables, r=steveklabnik
Update the documentation of `-C force-unwind-tables` for #83482

`panic=unwind` does not require `force-unwind-tables` to be "yes" anymore.
I forgot to update this in #83482.
2021-06-08 13:26:28 +09:00
Yuki Okushi
472dbec026
Rollup merge of #85906 - LingMan:iter_find, r=matthewjasper
Use `Iterator::find` instead of open-coding it

```@rustbot``` modify labels +C-cleanup +T-compiler
2021-06-08 13:26:28 +09:00
bors
376ec9487e Auto merge of #86115 - Xanewok:update-rls, r=Xanewok
Update RLS

This bumps racer to 2.1.48, which bumps rustc-ap-* crates to v722 in
order to unbreak the toolstate.

r? `@ghost`
2021-06-08 04:23:27 +00:00
bors
dda4a881e0 Auto merge of #83515 - tamird:string-remove-matches-rev, r=m-ou-se
String::remove_matches O(n^2) -> O(n)

Copy only non-matching bytes. Replace collection of matches into a
vector with iteration over rejections, exploiting the guarantee that we
mutate parts of the haystack that have already been searched over.

r? `@joshtriplett`
2021-06-08 01:05:48 +00:00
Lionel Foxcroft
fddf012177 Clarify documentation of slice sorting methods 2021-06-07 16:50:08 -04:00
Igor Matuszewski
5d7a990d36 Update RLS
This bumps racer to 2.1.48, which bumps rustc-ap-* crates to v722 in
order to unbreak the toolstate.
2021-06-07 22:19:58 +02:00
Griffin Smith
5aa188ac5d Correct type signature in doc for Bound::as_mut 2021-06-07 11:00:59 -04:00
Cameron Steffen
fb92c92a72 Remove lifetime hack 2021-06-07 10:00:58 -05:00
bors
e4a6032706 Auto merge of #85903 - bjorn3:rustc_serialize_cleanup, r=varkor
Remove unused functions and arguments from rustc_serialize
2021-06-07 14:40:26 +00:00
Fabian Wolff
09307a3e0d Bless ui/where-clauses/where-for-self.rs test 2021-06-07 15:00:47 +02:00
Fabian Wolff
c01d63ab76 Add E0316.md 2021-06-07 14:20:39 +02:00
Fabian Wolff
a20870bdb9 Comment out unused error codes in error_codes.rs 2021-06-07 13:01:04 +02:00
bors
2312ff1a85 Auto merge of #85891 - bjorn3:revert_merge_crate_disambiguator, r=Mark-Simulacrum
Revert "Merge CrateDisambiguator into StableCrateId"

This reverts https://github.com/rust-lang/rust/pull/85804
2021-06-07 10:42:56 +00:00
Guillaume Gomez
314ef592e2 Add test to ensure the result descripton is correctly handling codeblocks 2021-06-07 11:19:29 +02:00
Guillaume Gomez
4ca7a1119e Fix integration of codeblocks in search result description 2021-06-07 11:12:39 +02:00
bjorn3
8176ab8bc1 Revert "Merge CrateDisambiguator into StableCrateId"
This reverts commit d0ec85d3fb.
2021-06-07 10:37:45 +02:00
bjorn3
6c5b6985fd Revert "Fix test"
This reverts commit 3abdebe79d.
2021-06-07 10:25:32 +02:00
bjorn3
715c68fe90 Revert "Update tests"
This reverts commit c76b1b0317.
2021-06-07 10:25:32 +02:00
bjorn3
8d5fb5bf7d Revert "Update mir opt tests"
This reverts commit e0e0cfa649.
2021-06-07 10:25:32 +02:00
bors
022720bfcc Auto merge of #86091 - JohnTitor:rollup-wceot6d, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #84262 (Fix ICE during type layout when there's a `[type error]`)
 - #85973 (Replace a `match` with an `if let`)
 - #85996 (rustbuild: take changes to the standard library into account for `download-rustc`)
 - #86016 (Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.)
 - #86025 (Remove the install prefix from the rpath set when using -Crpath)
 - #86081 (Use `try_into` instead of asserting manually)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-07 08:01:45 +00:00
Yuki Okushi
7530c7d1bd
Rollup merge of #86081 - LingMan:try_into, r=jyn514
Use `try_into` instead of asserting manually

`@rustbot` modify labels +C-cleanup +T-compiler
2021-06-07 15:21:05 +09:00
Yuki Okushi
fa38fad5a2
Rollup merge of #86025 - bjorn3:no_rpath_cfg_prefix, r=jackh726
Remove the install prefix from the rpath set when using -Crpath

It was broken anyway for rustup installs and nobody seems to have noticed.

Fixes https://github.com/rust-lang/rust/issues/82392
2021-06-07 15:21:04 +09:00
Yuki Okushi
4144019847
Rollup merge of #86016 - luqmana:infer-linker-flavor, r=petrochenkov
Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.

The two methods were exactly the same so this removes the cranelift copy. This will help make sure both they don't get out of sync.
2021-06-07 15:21:03 +09:00
Yuki Okushi
7d07cfbbe7
Rollup merge of #85996 - jyn514:library-changes, r=Mark-Simulacrum
rustbuild: take changes to the standard library into account for `download-rustc`

Previously, changing the standard library with `download-rustc =
"if-unchanged"` would incorrectly reuse the cached compiler and standard
library from CI, which was confusing and led to incorrect test failures
or successes.

r? `@Mark-Simulacrum`
2021-06-07 15:21:02 +09:00
Yuki Okushi
7fcfe05680
Rollup merge of #85973 - LingMan:indentation, r=jyn514
Replace a `match` with an `if let`

Seems like a better fit here and saves one level of indentation.

`@rustbot` modify labels +C-cleanup +T-compiler
2021-06-07 15:21:01 +09:00
Yuki Okushi
ac6e239b3b
Rollup merge of #84262 - camelid:sized-ice, r=estebank
Fix ICE during type layout when there's a `[type error]`

Fixes #84108.

Based on estebank's [comment], except I used `delay_span_bug` because it
should work in more cases, and I think it expresses its intent more
clearly.

r? `@estebank`

[comment]: https://github.com/rust-lang/rust/issues/84108#issuecomment-818916848
2021-06-07 15:20:56 +09:00
Laurențiu Nicola
a0aabf7aed ⬆️ rust-analyzer 2021-06-07 08:15:15 +03:00
bors
cc9610bf5a Auto merge of #85810 - bjorn3:further_driver_cleanup, r=varkor
Driver improvements

This PR contains a couple of cleanups for the driver and a few small improvements for the custom codegen backend interface. It also implements `--version` and `-Cpasses=list` support for custom codegen backends.
2021-06-07 02:30:24 +00:00
bors
69e2f23a41 Auto merge of #86080 - GuillaumeGomez:rollup-vb5g14e, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #83433 (Pass --cfg=bootstrap for proc macros built by stage0)
 - #84940 (Don't run sanity checks for `x.py setup`)
 - #85912 (Use `Iterator::any` and `filter_map` instead of open-coding them)
 - #85965 (Remove dead code from `LocalAnalyzer`)
 - #86010 (Fix two ICEs in the parser)
 - #86040 (Fix display for search results)
 - #86058 (Remove `_`  from E0121 diagnostic suggestions)
 - #86077 (Fix corrected example in E0759.md)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-07 00:01:10 +00:00
Reagan McFarland
8330233ba7 Update testsuite to match new panic msg
This patch fixes tests from failing that were matching on `Box<Any>`,
which was the old panic message. Since the new panic message is `Box<dyn
Any>`, the tests have been updated to match against this instead.
2021-06-06 19:38:53 -04:00
LingMan
07dbd4d398 Use try_into instead of asserting manually 2021-06-07 01:27:40 +02:00
Guillaume Gomez
487200b438
Rollup merge of #86077 - FabianWolff:issue-86061, r=GuillaumeGomez
Fix corrected example in E0759.md

This pull request fixes #86061, which was probably caused by a copy-paste error, where the supposedly corrected code example was also marked with `compile_fail`. Thus, the fact that the "correct" example actually _isn't_ correct was not caught by the doc-tests. This pull request removes the incorrect `compile_fail` annotation and fixes the example.

r? ``@GuillaumeGomez``
2021-06-07 01:06:55 +02:00
Guillaume Gomez
d7d2548eb0
Rollup merge of #86058 - fee1-dead:E0121-improvements, r=jackh726
Remove `_`  from E0121 diagnostic suggestions

Fixes #86021.
2021-06-07 01:06:54 +02:00