Commit Graph

121304 Commits

Author SHA1 Message Date
Oliver Scherer
20abc70e04 Don't intern memory in const prop.
This isn't sound without validation. We don't want to report errors in case of failure to intern and validate, we just don't want to const prop. Interning and const prop is not built for this, let's not do it until we have a clearer picture on aggregate propagation.
2020-06-07 10:22:20 -04:00
bors
a2fc33e0c8 Auto merge of #73072 - arcnmx:lld-noload, r=nikic
Update LLVM submodule to include lld NOLOAD fix

> Rust nightly 2020-05-22 and later ships lld with a regression related to linker scripts: NOLOAD sections incorrectly generate sections filled with 0s. This causes gdb and other elf loaders to write to reserved or otherwise invalid addresses (gdb also seems confused by the resulting ELF files and spits out a warning about the sections). This is particularly a problem for embedded rust projects that use lld by default and have affected linker scripts (cortex-m-rt based projects for instance).

https://github.com/rust-lang/llvm-project/pull/64

Note that this also pulls in llvm changes from #72937
2020-06-07 05:58:49 +00:00
bors
450abe80f1 Auto merge of #73081 - Dylan-DPC:rollup-1aqk215, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72810 (validate basic sanity for TerminatorKind)
 - #72989 (Revert pr 71840)
 - #72993 (Count the beta prerelease number just from master)
 - #73057 (Clean up E0644 explanation)
 - #73059 (remove outdated comment)

Failed merges:

r? @ghost
2020-06-07 00:34:54 +00:00
Dylan DPC
b117a3956f
Rollup merge of #73059 - lcnr:outdated-comment, r=matthewjasper
remove outdated comment

r? @matthewjasper
2020-06-07 02:29:02 +02:00
Dylan DPC
71230e135b
Rollup merge of #73057 - GuillaumeGomez:cleanup-e0644, r=Dylan-DPC
Clean up E0644 explanation

r? @Dylan-DPC
2020-06-07 02:29:00 +02:00
Dylan DPC
101e59361e
Rollup merge of #72993 - cuviper:beta-number, r=Mark-Simulacrum
Count the beta prerelease number just from master

We were computing a merge-base between the remote beta and master
branches, but this was giving incorrect answers for the first beta if
the remote hadn't been pushed yet. For instance, `1.45.0-beta.3359`
corresponds to the number of merges since the 1.44 beta, but we really
want just `.1` for the sole 1.45 beta promotion merge.

We don't really need to query the remote beta at all -- `master..HEAD`
suffices if we assume that we're on the intended beta branch already.
2020-06-07 02:28:58 +02:00
Dylan DPC
6f8760bda3
Rollup merge of #72989 - pnkfelix:revert-pr-71840, r=matthewjasper
Revert pr 71840

Revert7 PR #71840 to fix issue #72470

This will need a backport to beta if we do not want #72470 to hit stable.
2020-06-07 02:28:56 +02:00
Dylan DPC
63b314c367
Rollup merge of #72810 - RalfJung:mir-terminate-sanity, r=jonas-schievink
validate basic sanity for TerminatorKind

r? @jonas-schievink

This mainly checks that all `BasicBlock` actually exist. On top of that, it checks that `Call` actually calls something of `FnPtr`/`FnDef` type, and `Assert` has to work on a `bool`. Also `SwitchInt` cannot have an empty target list.
2020-06-07 02:28:54 +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
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
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
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
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
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
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
3c23798718
Update RELEASES.md
try fix the f64 as u32 line
2020-06-05 03:30:56 +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
marmeladema
d0fccb552b Remove unsused NodeId related APIs in hir map 2020-06-04 20:32:35 +01:00
bors
47c3158c3d Auto merge of #72995 - Dylan-DPC:rollup-7gsyb8x, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72946 (remove outdated fixme)
 - #72971 (Hexagon libstd: fix typo for c_ulonglong)
 - #72986 (Add more assert to Vec with_capacity docs)
 - #72987 (Add myself to mailmap)
 - #72990 (Fix missing word in RELEASES.md)

Failed merges:

r? @ghost
2020-06-04 19:31:59 +00:00
Dylan DPC
e6b5d88f6d
Rollup merge of #72990 - rust-lang:wesleywiser-patch-1, r=Dylan-DPC
Fix missing word in RELEASES.md
2020-06-04 21:31:22 +02:00
Dylan DPC
7651423f93
Rollup merge of #72987 - BatmanAoD:kjs-mailmap, r=Mark-Simulacrum
Add myself to mailmap

Now that I have (accidentally) made contributions using two separate email addresses, I've added the rest of the addresses I typical use.
2020-06-04 21:31:20 +02:00
Dylan DPC
e324c25fff
Rollup merge of #72986 - pickfire:vec-assert, r=Mark-Simulacrum
Add more assert to Vec with_capacity docs

Show assertion on len too to show them how adding new items will affect both the
length and capacity, before and after.
2020-06-04 21:31:19 +02:00
Dylan DPC
b584687f4f
Rollup merge of #72971 - androm3da:fixes_00, r=Dylan-DPC
Hexagon libstd: fix typo for c_ulonglong
2020-06-04 21:31:15 +02:00
Dylan DPC
6ab084c9b0
Rollup merge of #72946 - lcnr:remove-fixme, r=Dylan-DPC
remove outdated fixme

This function now accepts `impl Iterator<Item = ty::Predicate<'tcx>>`.
2020-06-04 21:31:12 +02:00
Josh Stone
37a24b34c7 Count the beta prerelease number just from master
We were computing a merge-base between the remote beta and master
branches, but this was giving incorrect answers for the first beta if
the remote hadn't been pushed yet. For instance, `1.45.0-beta.3359`
corresponds to the number of merges since the 1.44 beta, but we really
want just `.1` for the sole 1.45 beta promotion merge.

We don't really need to query the remote beta at all -- `master..HEAD`
suffices if we assume that we're on the intended beta branch already.
2020-06-04 12:24:43 -07:00
Wesley Wiser
61c2774436
Fix missing word in RELEASES.md 2020-06-04 14:36:23 -04:00
Kyle Strand
ea2984ae69 Add Kyle Strand to mailmap 2020-06-04 11:43:29 -06:00
Ivan Tham
29ab6b73e1 Add more assert to Vec with_capacity docs
Show assertion on len too to show them how adding new items will affect both the
length and capacity, before and after.
2020-06-05 01:11:01 +08:00
Felix S. Klock II
ce4c953b99 further bless tests. 2020-06-04 12:26:13 -04:00
Felix S. Klock II
8dabff84d7 placate tidy. 2020-06-04 12:25:18 -04:00
Felix S. Klock II
e1ebdeeefb Revert "Defer creating drop trees in MIR lowering until leaving that scope"
This reverts commit 611988551f.
2020-06-04 11:34:42 -04:00
Felix S. Klock II
7cde4ab0d0 Revert "Reduce the number of drop-flag assignments in unwind paths"
This reverts commit 54aa418a60.
2020-06-04 11:31:43 -04:00
Felix S. Klock II
336d812761 Revert "Add some more comments"
This reverts commit 1a19c1da73.
2020-06-04 11:31:24 -04:00
Felix S. Klock II
34c0f0599d Revert "Bless mir-opt tests"
This reverts commit a030c92341.
2020-06-04 11:29:10 -04:00
Felix S. Klock II
bbe1bc4a08 Revert "Address review comments"
This reverts commit b998497bd4.
2020-06-04 11:27:25 -04:00
Tom Eccles
41bfd18e02 resolve: Sort E0408 errors by Symbol str
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.
2020-06-04 16:00:31 +01:00
Tom Eccles
8edb05c2a0 test: ui: skip tests which aren't appropriate for RISC-V 2020-06-04 15:59:59 +01:00
bors
3d5d0f898c Auto merge of #72882 - marmeladema:save-analysis-hir-tree, r=Xanewok
save_analysis: work on HIR tree instead of AST

In order to reduce the uses of `NodeId`s in the compiler, `save_analysis` crate has been reworked to operate on the HIR tree instead of the AST.

cc #50928
2020-06-04 14:16:13 +00:00