Commit Graph

149837 Commits

Author SHA1 Message Date
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
Santiago Pastorino
c80d062084
Add more TAIT multiple defining uses test cases 2021-06-07 19:10:14 -03:00
Santiago Pastorino
9e547b4464
Differentiate different defining uses of taits when they reference distinct generic parameters 2021-06-07 19:10:12 -03:00
Santiago Pastorino
e386373514
Remove substs from OpaqueTypeDecl, use the one in OpaqueTypeKey 2021-06-07 19:09:32 -03:00
Santiago Pastorino
5dabd55d7d
Use substs from opaque type key instead of using it from opaque_decl 2021-06-07 19:08:43 -03:00
Santiago Pastorino
37ab718350
Make opaque type map key be of type OpaqueTypeKey 2021-06-07 19:07:24 -03:00
Santiago Pastorino
7294f49d52
Remove ResolvedOpaqueTy and just use Ty, SubstsRef is already there 2021-06-07 19:07:07 -03:00
Santiago Pastorino
7f8cad2019
Make OpaqueTypeKey the key of opaque types map 2021-06-07 19:04:52 -03:00
Santiago Pastorino
3405725e00
Change concrete opaque type to be a VecMap 2021-06-07 19:04:19 -03:00
Santiago Pastorino
2bc723fbca
Change opaque type map to be a VecMap 2021-06-07 19:03:57 -03:00
Santiago Pastorino
aa7024b0c7
Add VecMap to rustc_data_structures 2021-06-07 19:03:51 -03:00
Fabian Wolff
6206247335 Suggest a trailing comma if a 1-tuple is expected 2021-06-07 23:16:03 +02: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
The8472
0ddc3afbb5 build doctests with lld if use-lld = true 2021-06-07 21:17:11 +02:00
Anatol Ulrich
39ba856151 fix off by one 2021-06-07 19:55:33 +02:00
Pietro Albini
12d37e615f
add the x86_64-gnu-stable job to test with stable channel
During the 1.52 release process we had to deal with some commits that
passed the test suite on the nightly branch but failed on the beta or
stable branch. In that case it was due to some UI tests including the
channel name in the output, but other changes might also be dependent on
the channel.

This commit adds a new CI job that runs the Linux x86_64 test suite with
the stable branch, ensuring nightly changes also work as stable.
2021-06-07 18:55:43 +02:00
Pietro Albini
b52bf1b41c
use channel-relative urls in rustdoc/intra-doc/field.rs 2021-06-07 18:55:43 +02:00
Smitty
2f1c2193d1 Peephole optimize x == false and x != true 2021-06-07 12:33:00 -04:00
Pietro Albini
a1c884682c
ignore ui-fulldeps/session-derive-errors.rs on beta and stable
The session-derive-errors test ensures the internal SessionDiagnostic
derive macro outputs the right error messages when misused.

The macro relies on the proc_macro2 crate though, which changes its span
behavior depending on whether the channel is nightly or not. This caused
test failures when bumping the channel from nightly to beta/stable.

Since SessionDiagnostic is internal-only we don't care about its
diagnostics quality outside of nightly, as the compiler itself is
developed on nightly. Thus the easiest solution is to ignore that test
on the beta and stable channels.

This also implements `// only-{channel}` and `// ignore-{channel}` in
compiletest to properly support the change.
2021-06-07 18:09:12 +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
21078c140f note uwuuu 2021-06-07 10:09:47 +01: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
Tomasz Miąsko
4237a05233 Use preorder traversal when checking for SSA locals
When rebuilding the standard library, this change reduces the number of
locals that require an alloca from 62452 to 62348.
2021-06-07 05:33:49 +02: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