Commit Graph

121524 Commits

Author SHA1 Message Date
flip1995
1a8a69d012
Merge remote-tracking branch 'upstream/master' into rustup 2020-06-07 02:17:49 +02:00
marmeladema
a7c18e021f save_analysis: fix panic in write_sub_paths_truncated 2020-06-06 23:40:24 +01:00
Joshua Nelson
ff327c87e3 Add comments to Resolve::get_module 2020-06-06 17:09:31 -04:00
Poliorcetics
53984569e2
Only mention u8 and not booleans
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2020-06-06 22:30:09 +02:00
bors
9c1857fad8 Auto merge of #73073 - RalfJung:rollup-i24dh28, r=RalfJung
Rollup of 3 pull requests

Successful merges:

 - #71796 (de-promote Duration::from_secs)
 - #72508 (Make `PolyTraitRef::self_ty` return `Binder<Ty>`)
 - #72708 (linker: Add a linker rerun hack for gcc versions not supporting -static-pie)

Failed merges:

r? @ghost
2020-06-06 19:58:27 +00:00
Ralf Jung
d112d8bf3b
Rollup merge of #72708 - petrochenkov:linkhack, r=cuviper
linker: Add a linker rerun hack for gcc versions not supporting -static-pie

Which mirrors the existing `-no-pie` linker rerun hack, but the logic is a bit more elaborated in this case.

If the linker (gcc or clang) errors on `-static-pie` we rerun in with `-static` instead.
We must also replace CRT objects corresponding to `-static-pie` with ones corresponding to `-static` in this case.

(One sanity check for CRT objects in target specs is also added as a drive-by fix.)

To do in the future: refactor all linker rerun hacks into separate functions and share more code with `add_(pre,post)_link_objects`.

This PR accompanies https://github.com/rust-lang/rust/pull/71804 and unblocks https://github.com/rust-lang/rust/pull/70740.
2020-06-06 21:57:39 +02:00
Ralf Jung
161474b7f7 Rollup merge of #72508 - ecstatic-morse:poly-self-ty, r=nikomatsakis
Make `PolyTraitRef::self_ty` return `Binder<Ty>`

This came up during review of #71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of #72507.
2020-06-06 21:57:38 +02:00
Ralf Jung
de4d5ce11e
Rollup merge of #72508 - ecstatic-morse:poly-self-ty, r=nikomatsakis
Make `PolyTraitRef::self_ty` return `Binder<Ty>`

This came up during review of #71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of #72507.
2020-06-06 21:57:38 +02:00
Ralf Jung
64c27f9fee
Rollup merge of #71796 - RalfJung:from-secs, r=nikomatsakis
de-promote Duration::from_secs

In https://github.com/rust-lang/rust/pull/67531, we removed the `rustc_promotable` attribute from a bunch of `Duration` methods, but not from `Duration::from_secs`. This makes the current list of promotable functions the following (courtesy of @ecstatic-morse):

* `INT::min_value`, `INT::max_value`
* `std::mem::size_of`, `std::mem::align_of`
* `RangeInclusive::new` (backing `x..=y`)
* `std::ptr::null`, `std::ptr::null_mut`
* `RawWaker::new`, `RawWakerVTable::new` ???
* `Duration::from_secs`

I feel like the last one stands out a bit here -- the rest are all very core language primitives, and `RawWaker` has a strong motivation for getting a `'static` vtable. But a `&'static Duration`? That seems unlikely. So I propose we no longer promote calls to `Duration::from_secs`, which is what this PR does.

https://github.com/rust-lang/rust/pull/67531 saw zero regressions and I am not aware of anyone complaining that this broke their (non-cratered) code, so I consider it likely the same will be true here, but of course we'd do a crater run.

See [this document](https://github.com/rust-lang/const-eval/blob/master/promotion.md) for some more background on promotion and https://github.com/rust-lang/const-eval/issues/19 for some of the concerns around promoting function calls.
2020-06-06 21:57:33 +02:00
Ivan Tham
758aa23e44 Elide type on liballoc vec 2020-06-06 23:07:02 +08:00
Bastian Kauschke
32c488f045 remove outdated comment 2020-06-06 15:54:07 +02:00
Guillaume Gomez
392c6f45a4 Clean up E0644 explanation 2020-06-06 13:16:26 +02:00
bors
5699672b5b Auto merge of #5674 - ThibsG:DocTypeDefinesMethod, r=yaahc,phansch,flip1995
Add doc for checking if type defines specific method

This PR adds documentation on how:
- check if a type defines a specific method
- check an expr is calling a specific method

closes: #3843

changelog: none
2020-06-06 10:32:02 +00:00
bors
e6f05ad912 Auto merge of #5528 - phansch:same-tys, r=flip1995
Cleanup: Use rustc's `same_type` for our `same_tys`

This delegates our `same_tys` to [ty::TyS::same_type][same_type] to
remove some duplication.

Our `same_tys` was introduced 4 years ago in #730. Before, it was
building an inference context to be able to call
`can_eq` to compare the types. The `rustc-dev-guide` has some more details
about `can_eq` in [Type Inference -> Trying equality][try_eq].

Now, using the rustc function, we are essentially comparing the `DefId`s
of the given types, which also makes more sense, IMO.

I also confirmed that the FIXME is resolved via a bit of `dbg!`, however
no UI tests seem to have been affected.

[same_type]: 659951c4a0/src/librustc_middle/ty/util.rs (L777)
[try_eq]: https://rustc-dev-guide.rust-lang.org/type-inference.html#trying-equality

---

changelog: none
2020-06-06 10:04:21 +00:00
Philipp Hansch
623faac84e
Cleanup: Use rustc's same_types instead of our same_tys 2020-06-06 11:50:59 +02:00
bors
118b50524b Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum
Rename all remaining compiler crates to use the `rustc_foo` pattern

libarena -> librustc_arena
libfmt_macros -> librustc_parse_format
libgraphviz -> librustc_graphviz
libserialize -> librustc_serialize

Closes https://github.com/rust-lang/rust/issues/71177 in particular.
2020-06-06 09:00:51 +00:00
bors
b059c0a2e6 Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum
Rename all remaining compiler crates to use the `rustc_foo` pattern

libarena -> librustc_arena
libfmt_macros -> librustc_parse_format
libgraphviz -> librustc_graphviz
libserialize -> librustc_serialize

Closes https://github.com/rust-lang/rust/issues/71177 in particular.
2020-06-06 09:00:51 +00:00
marmeladema
84e4777ae2 save_analysis: fix ice in get_expr_data 2020-06-06 00:39:18 +01:00
bors
ea7066a01d Auto merge of #5688 - ebroto:fix_cargo_tests_in_rustc, r=flip1995
Fix cargo tests when running inside the rustlang/rust repo

It seems we hit https://github.com/rust-lang/cargo/issues/5418, so I've applied the suggested solution. Also added some more info when cargo-metadata fails to execute.

(there was no open issue for this)

changelog: none
2020-06-05 21:59:37 +00:00
Joey Hain
e7e6bc1126 properly handle feature gated lints
- lint: add `feature_gate` field, allow specifying it in `declare_lint!`

- generalize the lint feature gate check

- librustdoc: generalize whitelisting of feature-gated lints
2020-06-05 13:52:34 -07:00
Eduardo Broto
c325c120c2 Fix cargo ui tests when running inside rust repo 2020-06-05 22:30:14 +02:00
Eduardo Broto
413713c884 Add error info when cargo metadata fails to run 2020-06-05 22:28:58 +02:00
bors
826cb062a6 Auto merge of #72982 - tblah:riscv-ui-tests, r=estebank
resolve: Sort E0408 errors by Symbol str

This is a request for comments implementing my suggested solution to https://github.com/rust-lang/rust/issues/72913

Previously errors were sorted by Symbol index instead of the string. The indexes are not the same between architectures because Symbols for architecture extensions (e.g. x86 AVX or RISC-V d) are interned before the source file is parsed. RISC-V's naming of extensions after single letters led to it having errors sorted differently for test cases using single letter variable names. Instead sort the errors by the Symbol string so that it is stable across architectures.

While I was at it, there's also 8edb05c2  skipping some ui tests which I think are irrelevant for risc-v.
2020-06-05 18:55:52 +00:00
arcnmx
aa7e771d67 Update LLVM submodule to include lld NOLOAD fix
https://github.com/rust-lang/llvm-project/pull/64
2020-06-05 11:36:45 -07:00
Alexis Bourget
7897f60021 Improve the new documentation to be more precise about the necessary platform's capabilities 2020-06-05 19:07:24 +02:00
Felix S. Klock II
a9d5dffe99 Ignore windows in the test. 2020-06-05 12:11:33 -04:00
bors
e4124750c3 Auto merge of #73025 - Dylan-DPC:rollup-a1uzj5u, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72260 (Spell out `Self` in async function return)
 - #72996 (Remove unsused `NodeId` related APIs in hir map)
 - #73010 (Update RELEASES.md)
 - #73017 (Use assert_eq for liballoc test)
 - #73019 (add test for #72960)

Failed merges:

r? @ghost
2020-06-05 15:21:01 +00:00
bors
b16d10117a Auto merge of #5687 - flip1995:release_doc, r=phansch
Replace all remaining occurrences of submodule with subtree

r? @phansch

I should have included this in #5686, but forgot about it, so here we go again.

changelog: none
2020-06-05 13:34:19 +00:00
Ana-Maria Mihalache
00c19adeb5 Rename traits::ImplSourceImpl to ImplSourceUserDefined. 2020-06-05 13:31:48 +00:00
Ana-Maria Mihalache
e01896a36f Rename traits::Vtable to ImplSource. 2020-06-05 13:20:09 +00:00
flip1995
6b9e2e90bf
Replace all remaining occurrences of submodule with subtree 2020-06-05 14:53:23 +02:00
bors
6fc9939893 Auto merge of #5671 - ebroto:changelog_144_145, r=flip1995
Update changelog for stable:1.44 beta:1.45

[Rendered](https://github.com/ebroto/rust-clippy/blob/changelog_144_145/CHANGELOG.md)

changelog: none
2020-06-05 12:52:23 +00:00
bors
af9a094d98 Auto merge of #5686 - flip1995:release_doc, r=phansch
Reorder sections of release documentation

r? @phansch

[Rendered](https://github.com/flip1995/rust-clippy/blob/release_doc/doc/release.md)

changelog: none
2020-06-05 12:23:13 +00:00
flip1995
9ef15ae7c8
Reorder sections of release documentation
Before tagging a commit the beta branch has to be remerged
2020-06-05 13:56:07 +02:00
bors
f61840d220 Auto merge of #5685 - flip1995:backport_remerge, r=flip1995
Backport remerge

Part of the release process. Nothing to see here (literally).

d4092ac matches the current HEAD of the beta branch

changelog: none
2020-06-05 11:52:27 +00:00
flip1995
17bdc96646
Merge remote-tracking branch 'upstream/beta' into backport_remerge 2020-06-05 13:50:53 +02:00
bors
84ec8238b1 Auto merge of #72957 - Mark-Simulacrum:bootstrap-bump, r=sfackler
Bump bootstrap compiler to 1.45

Pretty standard update.
2020-06-05 11:11:26 +00:00
Dylan DPC
14fd5950a5
Rollup merge of #73019 - matthiaskrgr:test_72960, r=Xanewok
add test for #72960

Fixes #72960

r? @Xanewok
2020-06-05 13:07:10 +02:00
Dylan DPC
10d9e3c902
Rollup merge of #73017 - pickfire:liballoc-assert, r=Xanewok
Use assert_eq for liballoc test
2020-06-05 13:07:08 +02:00
Dylan DPC
27376d57b6
Rollup merge of #73010 - tshepang:patch-2, r=Mark-Simulacrum
Update RELEASES.md

try fix the f64 as u32 line
2020-06-05 13:07:06 +02:00
Dylan DPC
d01f7ae125
Rollup merge of #72996 - marmeladema:remove-hir-map-nodeid-apis, r=ecstatic-morse
Remove unsused `NodeId` related APIs in hir map

cc #50928

r? @ecstatic-morse
2020-06-05 13:07:05 +02:00
Dylan DPC
14dc34dd89
Rollup merge of #72260 - csmoe:issue-69276, r=estebank
Spell out `Self` in async function return

Closes #69276
r? @tmandry
2020-06-05 13:07:03 +02:00
Matthias Krüger
254f61ae43 add test for #72960
Fixes #72960
2020-06-05 12:08:54 +02:00
Ivan Tham
b54a917b14 Use assert_eq for liballoc test 2020-06-05 16:56:51 +08:00
Tshepang Lekhonkhobe
9d6ed2960c
address review comment 2020-06-05 03:41:21 +02:00
Tshepang Lekhonkhobe
3c23798718
Update RELEASES.md
try fix the f64 as u32 line
2020-06-05 03:30:56 +02:00
Tshepang Lekhonkhobe
e508db2840
Update RELEASES.md
make catch_unwind line more readable
2020-06-05 03:05:12 +02:00
bors
219380d840 Auto merge of #72901 - ehuss:update-cargo, r=Mark-Simulacrum
Update cargo

9 commits in 9fcb8c1d20c17f51054f7aa4e08ff28d381fe096..40ebd52206e25c7a576ee42c137cc06a745a167a
2020-05-25 16:25:36 +0000 to 2020-06-01 22:35:00 +0000
- Warn if using hash in git URL, Fixes rust-lang/cargo#8241 (rust-lang/cargo#8297)
- reset lockfile information between resolutions (rust-lang/cargo#8274)
- Disable strip_works test on macos. (rust-lang/cargo#8301)
- Fix typo in impl Display for Strip (rust-lang/cargo#8299)
- Add support for rustdoc root URL mappings. (rust-lang/cargo#8287)
- Fix tests with enoent error message on non-english systems. (rust-lang/cargo#8295)
- Fix fingerprinting for lld on Windows with dylib. (rust-lang/cargo#8290)
- Fix a typo (rust-lang/cargo#8289)
- Fix several issues with close_output test. (rust-lang/cargo#8286)
2020-06-04 23:17:05 +00:00
Eric Huss
e6582006e8 Enable lld for Cargo tests on Windows. 2020-06-04 14:32:23 -07:00
Alexis Bourget
817d6a078e Add a **Note**: comment in documentation when the type/method/function is not always available 2020-06-04 22:07:56 +02:00