Commit Graph

149669 Commits

Author SHA1 Message Date
Yuki Okushi
d7186a8efe
Rollup merge of #86124 - Aaron1011:ambig-macro-name, r=varkor
Include macro name in 'local ambiguity' error

Currently, we only point at the span of the macro argument. When the
macro call is itself generated by another macro, this can make it
difficult or impossible to determine which macro is responsible for
producing the error.
2021-06-09 12:04:06 +09:00
Yuki Okushi
c961a0fc88
Rollup merge of #86121 - nickshiling:forwarding_impl_for_seek_trait_stream_position, r=dtolnay
Forwarding implementation for Seek trait's stream_position method

Forwarding implementations for `Seek` trait's `stream_position` were missed when it was stabilized in `1.51.0`
2021-06-09 12:04:05 +09:00
Yuki Okushi
da1a4498ca
Rollup merge of #85982 - alexcrichton:doc-safe-wasm, r=jyn514
Enable rustdoc to document safe wasm intrinsics

This commit fixes an issue not found during #84988 where rustdoc is used
to document cross-platform intrinsics but it was requiring that
functions which use `#[target_feature]` are `unsafe` erroneously, even
if they're WebAssembly specific. Rustdoc today, for example, already has
a special case where it enables annotations like
`#[target_feature(enable = "simd128")]` on platforms other than
WebAssembly. The purpose of this commit is to relax the "require all
`#[target_feature]` functions are `unsafe`" requirement for all targets
whenever rustdoc is running, enabling all targets to fully document
other targets, such as WebAssembly, where intrinsics functions aren't
always `unsafe`.
2021-06-09 12:04:04 +09:00
Yuki Okushi
606feba5bb
Rollup merge of #85957 - BoxyUwU:rustdoc-const-generic-defaults, r=oli-obk
Display defaults on const params- rustdoc

previously rustdoc would render this struct declaration:
`pub struct Foo<const N: usize = 10>;`
as:
`pub struct Foo<const N: usize>;`
this PR changes it to render correctly
2021-06-09 12:04:03 +09:00
Yuki Okushi
3bc8221558
Rollup merge of #85791 - CDirkx:is_unicast, r=joshtriplett
Add `Ipv6Addr::is_unicast`

Adds an unstable utility method `Ipv6Addr::is_unicast` under the feature flag `ip` (tracking issue: #27709).

Added for completeness with the other unicast methods (see also https://github.com/rust-lang/rust/issues/85604#issuecomment-848220455) and opposite of `is_multicast`.
2021-06-09 12:04:01 +09:00
Yuki Okushi
58f4c0f949
Rollup merge of #85715 - fee1-dead:document-string, r=JohnTitor
Document `From` impls in string.rs
2021-06-09 12:03:59 +09:00
Yuki Okushi
e6763c966c
Rollup merge of #85676 - CDirkx:ip-style, r=JohnTitor
Fix documentation style inconsistencies for IP addresses

Pulled out of #85655 as it is unrelated. Fixes some inconsistencies in the docs for IP addresses:
- Currently some addresses are backticked, some are not, this PR backticks everything consistently. (looks better imo)
- Lowercase hex-literals are used when writing addresses.
2021-06-09 12:03:54 +09:00
bors
ed597e7e19 Auto merge of #86139 - hyd-dev:miri, r=RalfJung
Update Miri

Fixes #86133.

r? `@RalfJung`
2021-06-08 18:33:51 +00:00
hyd-dev
18049647e1
Update Miri 2021-06-08 23:33:39 +08: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
Aaron Hill
822f800ad7
Include macro name in 'local ambiguity' error
Currently, we only point at the span of the macro argument. When the
macro call is itself generated by another macro, this can make it
difficult or impossible to determine which macro is responsible for
producing the error.
2021-06-07 20:17:48 -05: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
Alex Crichton
aba85ff820 Enable rustdoc to document safe wasm intrinsics
This commit fixes an issue not found during #84988 where rustdoc is used
to document cross-platform intrinsics but it was requiring that
functions which use `#[target_feature]` are `unsafe` erroneously, even
if they're WebAssembly specific. Rustdoc today, for example, already has
a special case where it enables annotations like
`#[target_feature(enable = "simd128")]` on platforms other than
WebAssembly. The purpose of this commit is to relax the "require all
`#[target_feature]` functions are `unsafe`" requirement for all targets
whenever rustdoc is running, enabling all targets to fully document
other targets, such as WebAssembly, where intrinsics functions aren't
always `unsafe`.
2021-06-07 17:14:35 -07:00
myshylin
ed8a775b71 Forwarding implementation for Seek trait's stream_position method 2021-06-07 19:21:22 -04: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
Ellen
f7117f8c17 format version 2021-06-07 09:47:05 +01: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