Commit graph

141326 commits

Author SHA1 Message Date
Oli Scherer
d81f5ab100 Inline some functions that suddenly show up more in traces 2021-04-01 09:22:12 +00:00
bors
803ddb8359 Auto merge of #83726 - the8472:large-trustedlen-fail-fast, r=kennytm
panic early when `TrustedLen` indicates a `length > usize::MAX`

Changes `TrustedLen` specializations to immediately panic when `size_hint().1 == None`.

As far as I can tell this is ~not a change~ a minimal change in observable behavior for anything except ZSTs because the fallback path would go through `extend_desugared()` which tries to `reserve(lower_bound)` which already is `usize::MAX` and that would also lead to a panic. Before it might have popped somewhere between zero and a few elements from the iterator before panicking while it now panics immediately.

Overall this should reduce codegen by eliminating the fallback paths.

While looking into the `with_capacity()` behavior I also noticed that its documentation didn't have a *Panics* section, so I added that.
2021-04-01 07:55:00 +00:00
bors
49e1ec0995 Auto merge of #83736 - JohnTitor:fix-unsafe_block_in_unsafe_fn-stabilized-version, r=jyn514
Fix the `unsafe_block_in_unsafe_fn`s stabilized version

Fixes #83735
2021-04-01 05:34:54 +00:00
Predrag Gruevski
2e4215cb72
Fix minor typo in once.rs 2021-04-01 00:52:02 -04:00
bors
cbd6ec7604 Auto merge of #83732 - ehuss:update-cargo, r=ehuss
Update cargo

5 commits in 1e8703890f285befb5e32627ad4e0a0454dde1fb..3c44c3c4b7900b8b13c85ead25ccaa8abb7d8989
2021-03-26 16:59:39 +0000 to 2021-03-31 21:21:15 +0000
- Fix semver docs for 1.51. (rust-lang/cargo#9316)
- Add `cargo config` subcommand. (rust-lang/cargo#9302)
- Give one more example for the --featuers CLI (rust-lang/cargo#9313)
- Bump to 0.54.0, update changelog (rust-lang/cargo#9308)
- Make the URL to the tracking issue for `--out-dir` into a link (rust-lang/cargo#9309)
2021-04-01 03:13:39 +00:00
Yuki Okushi
fe9c4fbb9e Fix the unsafe_block_in_unsafe_fns stabilized version 2021-04-01 10:56:51 +09:00
Eric Huss
cb969e86a5 Update cargo 2021-03-31 17:45:03 -07:00
bors
4896450e7e Auto merge of #83731 - Dylan-DPC:rollup-v2z3gkt, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #83015 (Add regression tests for #79825 and #81555)
 - #83699 (Add a regression test for issue-68830)
 - #83700 (Fix documentation of conversion from String to OsString)
 - #83711 (Clarify `--print target-list` is a rustc's option)
 - #83712 (Update LLVM with another wasm simd fix)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-04-01 00:42:50 +00:00
Dylan DPC
578cfa3535
Rollup merge of #83712 - alexcrichton:more-wasm-simd-llvm-updates, r=nikic
Update LLVM with another wasm simd fix

Just a small bug fix for opcode numberings, not too major.
2021-04-01 02:41:48 +02:00
Dylan DPC
1ef52ac5f5
Rollup merge of #83711 - JohnTitor:more-friendly-unknown-target-error, r=davidtwco
Clarify `--print target-list` is a rustc's option

Fixes #68238
2021-04-01 02:41:47 +02:00
Dylan DPC
ea277f1909
Rollup merge of #83700 - steffahn:string_to_pathbuf_conversion_documentation, r=JohnTitor
Fix documentation of conversion from String to OsString

From [this question on URLO](https://users.rust-lang.org/t/does-converting-a-string-into-a-pathbuf-allocate-new-buffer/57678), I noticed that the documentation of `From<String> for OsString` incorrectly claims to be copying data.

````@rustbot```` modify labels: T-doc, T-libs
2021-04-01 02:41:46 +02:00
Dylan DPC
e40601e952
Rollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPC
Add a regression test for issue-68830

Closes #68830
2021-04-01 02:41:45 +02:00
Dylan DPC
9e30e57eeb
Rollup merge of #83015 - hyd-dev:test-79825-81555, r=Aaron1011
Add regression tests for #79825 and #81555

Closes #79825.
Closes #81555.

`@rustbot` label A-proc-macros T-compiler
2021-04-01 02:41:44 +02:00
Joshua Nelson
413938d7a9 Fix --external-css to be invocation-specific and note main.js should be invocation specific 2021-03-31 17:24:27 -04:00
The8472
ad3a791e2a panic early when TrustedLen indicates a length > usize::MAX 2021-03-31 23:09:28 +02:00
Guillaume Gomez
828179d687 Add a button to copy the "use statement" 2021-03-31 22:13:47 +02:00
bors
4fdac23f31 Auto merge of #76814 - jackh726:binder-refactor, r=nikomatsakis
Refactor `Binder` to track bound vars

c.c. `@rust-lang/wg-traits`

This is super early (and might just get closed at some point), but want to get at least an initial idea of the perf impact.

r? `@ghost`
2021-03-31 18:06:06 +00:00
Alex Crichton
9acf558db4 Update LLVM with another wasm simd fix
Just a small bug fix for opcode numberings, not too major.
2021-03-31 10:24:41 -07:00
JohnTitor
82c6709d6f Clarify --print target-list is a rustc's option 2021-04-01 01:59:50 +09:00
Joshua Nelson
1086d9b7b5 Rename CrateSpecific -> InvocationSpecific 2021-03-31 11:55:34 -04:00
Joshua Nelson
d4f3f91c48 Enforce that Toolchain files are static and Crate files are dynamic
This also changes custom themes from Toolchain to Crate files.
2021-03-31 11:55:30 -04:00
Hameer Abbasi
38b31691a7 Fix compiletest to use correct bitwidth stderr files. 2021-03-31 15:30:07 +00:00
Camille GILLOT
f3dde45d2a Enable debugging the dep-graph without debug-assertions.
It may also be useful in these cases,
and some CI configurations test without debug assertions.
2021-03-31 17:12:06 +02:00
Jack Huey
7108918db6 Cleanups and comments 2021-03-31 10:16:37 -04:00
Jack Huey
0c98dc66fd Fix tests and AstConv -> dyn AstConv 2021-03-31 10:16:37 -04:00
Jack Huey
4ff65ec782 Fmt and test revert 2021-03-31 10:16:37 -04:00
Jack Huey
8ad7e5685e Fix new problem from rebase and a little cleanup 2021-03-31 10:16:37 -04:00
Jack Huey
6d5efa9f04 Add var to BoundRegion. Add query to get bound vars for applicable items. 2021-03-31 10:16:37 -04:00
Jack Huey
666859a6f8 Make late and late_anon regions track the bound var position 2021-03-31 10:15:56 -04:00
Jack Huey
84f82d348c Revert explicit lifetimes 2021-03-31 10:15:56 -04:00
Jack Huey
30187c81f6 Track bound vars 2021-03-31 10:15:27 -04:00
Jack Huey
62a49c3bb8 Add tcx lifetime to Binder 2021-03-31 10:13:57 -04:00
Jack Huey
74851f4cf3 count bound vars 2021-03-31 10:11:47 -04:00
Frank Steffahn
7509aa108c Apply suggestions from code review
More links, one more occurrence of “a OsString”

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2021-03-31 16:09:25 +02:00
Jack Huey
97a22a4f9c Add u32 for bound variables to Binder 2021-03-31 10:05:32 -04:00
Jack Huey
4955d755d3 Some rebinds and dummys 2021-03-31 10:05:32 -04:00
Frank Steffahn
f5e7dbb20a Add a few missing links, fix a typo 2021-03-31 16:02:59 +02:00
Frank Steffahn
e7821e5475 Fix documentation of conversion from String to OsString 2021-03-31 16:02:52 +02:00
Oli Scherer
74af01b989 Revert tests 2021-03-31 11:33:15 +00:00
Oli Scherer
d139968d19 bail out early when substituting mir constants that don't need substituting 2021-03-31 10:40:45 +00:00
Oli Scherer
4e8edfb5c2 Forward some layouts to prevent recomputation 2021-03-31 10:40:45 +00:00
Oli Scherer
dbacfbc368 Add a new normalization query just for mir constants 2021-03-31 10:40:42 +00:00
JohnTitor
ce6658818d Add a regression test for issue-68830 2021-03-31 18:48:28 +09:00
Hameer Abbasi
f80b9acf20 Add 32bit.stderr files. 2021-03-31 09:33:45 +00:00
Oli Scherer
c7c39ce6d0 We should never see unevaluated type-level constants after monomorphization unless errors occurred 2021-03-31 09:13:45 +00:00
Oli Scherer
1d56b8a2bc Make unevaluated DefId rendering deterministic 2021-03-31 09:13:45 +00:00
Aman Arora
e78fac5601 Handle the case of partially captured drop type 2021-03-31 04:40:31 -04:00
bors
a5029ac0ab Auto merge of #83684 - cjgillot:csp, r=petrochenkov
Remove hir::CrateItem.

The crate span is exactly the crate module's inner span. There is no need to store it twice.
2021-03-31 08:34:40 +00:00
Hameer Abbasi
091433d699 Rename stderr->64bit.stderr where needed. 2021-03-31 08:23:11 +00:00
Hameer Abbasi
c3ec0add8b Add allocation information to undefined behaviour errors. 2021-03-31 07:21:08 +00:00