Commit Graph

158631 Commits

Author SHA1 Message Date
Mark Rousskov
b221c877e8 Apply cfg-bootstrap switch 2021-11-30 10:51:42 -05:00
Mark Rousskov
e9bc25dc34 Bump bootstrap compiler 2021-11-30 10:44:21 -05:00
bors
1c0287830e Auto merge of #91388 - JohnTitor:rollup-640o1e5, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #91243 (Don't treat unnormalized function arguments as well-formed)
 - #91250 (Refactor EmitterWriter::emit_suggestion_default )
 - #91317 (tests: Ignore `test/debuginfo/rc_arc.rs` on windows-gnu)
 - #91323 (CTFE: support assert_zero_valid and assert_uninit_valid)
 - #91358 (Fix small typo)
 - #91360 (⬆️ rust-analyzer)
 - #91368 (Don't re-export `MirPass`)
 - #91383 (Add `drop_while` as doc alias to `Iterator::skip_while`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-30 10:45:22 +00:00
Yuki Okushi
28176a4a33
Rollup merge of #91383 - ScriptDevil:drop-while-doc-alias, r=joshtriplett
Add `drop_while` as doc alias to `Iterator::skip_while`

`skip_while` is commonly referred to as `drop_while` in other languages (clojure/c++/haskell). This recently came up in [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.E2.9C.94.20DropWhile/near/262203352) as well.

This pull request adds 'drop_while' as a doc-alias for 'skip_while'.

r? `@joshtriplett`
2021-11-30 17:29:13 +09:00
Yuki Okushi
898f1e4717
Rollup merge of #91368 - ecstatic-morse:mir-pass-reexport, r=cjgillot
Don't re-export `MirPass`

`rust-analyzer` wants to use the `rustc_const_eval` one by default, which is weird.

r? ``@cjgillot``
2021-11-30 17:29:12 +09:00
Yuki Okushi
b93b483423
Rollup merge of #91360 - lnicola:rust-analyzer-2021-11-29, r=lnicola
⬆️ rust-analyzer

r? ```@ghost```
2021-11-30 17:29:11 +09:00
Yuki Okushi
56c838cdc7
Rollup merge of #91358 - kd-collective:fix_typo, r=cjgillot
Fix small typo

Fix a typo in code commenting!
`accross` -> `across`
2021-11-30 17:29:10 +09:00
Yuki Okushi
a940c68035
Rollup merge of #91323 - RalfJung:assert-type, r=oli-obk
CTFE: support assert_zero_valid and assert_uninit_valid

This ensures the implementation of all three type-based assert_ intrinsics remains consistent in Miri.

`assert_inhabited` recently got stabilized in https://github.com/rust-lang/rust/pull/90896 (meaning stable `const fn` can call it), so do the same with these other intrinsics.

Cc ```@rust-lang/wg-const-eval```
2021-11-30 17:29:09 +09:00
Yuki Okushi
ae1badb047
Rollup merge of #91317 - petrochenkov:debugnu, r=Mark-Simulacrum
tests: Ignore `test/debuginfo/rc_arc.rs` on windows-gnu

The tests checks some pretty-printer output, but pretty-printers are not embedded on windows-gnu.

Regressed in https://github.com/rust-lang/rust/pull/85448.
2021-11-30 17:29:08 +09:00
Yuki Okushi
626afa18b3
Rollup merge of #91250 - rukai:remove_trailing_whitespace, r=wesleywiser
Refactor EmitterWriter::emit_suggestion_default

Makes progress towards https://github.com/rust-lang/rust/issues/89979

Split into 2 commits:
* the first commit is purely a refactor and I verified that `./x.py test src/test/ui --stage 1` and  `./x.py test src/test/rustdoc-ui --stage 1` continue to pass on this commit.
* ~~the second commit removes the empty trailing line from diff style suggestions.~~ - I discovered an issue with this so its just the refactor now.

r? diagnostics
2021-11-30 17:29:07 +09:00
Yuki Okushi
6e7cf2e88b
Rollup merge of #91243 - jackh726:issue-91068, r=nikomatsakis
Don't treat unnormalized function arguments as well-formed

Partial revert of #88312

r? ``@pnkfelix``
cc ``@nikomatsakis``
2021-11-30 17:29:06 +09:00
bors
90912e68ab Auto merge of #91330 - cjgillot:no-ee-features, r=Aaron1011
Remove eval_always for lib_features.

r? `@Aaron1011`
2021-11-30 07:40:08 +00:00
Ashok Gautham Jadatharan
dea3494b31 Add drop_while as doc alias to Iterator::skip_while 2021-11-30 10:27:16 +05:30
bors
4c94896330 Auto merge of #91379 - ehuss:update-cargo, r=ehuss
Update cargo

6 commits in 7f08ace4f1305de7f3b1b0e2f765911957226bd4..294967c53f0c70d598fc54ca189313c86c576ea7
2021-11-24 17:54:39 +0000 to 2021-11-29 19:04:22 +0000
- Fix some tests with output collisions. (rust-lang/cargo#10137)
- Description of the targets that can be applied (rust-lang/cargo#10109)
- Improve unused patch message when source URLs mismatched (rust-lang/cargo#10130)
- Add a note about doctest xcompile. (rust-lang/cargo#10132)
- book: add edit links to specific pages (rust-lang/cargo#10124)
- Add crate type flag to rustc command (rust-lang/cargo#10093)
2021-11-30 04:15:31 +00:00
Eric Huss
05461d3676 Update cargo 2021-11-29 18:11:17 -08:00
bors
94bec90702 Auto merge of #91244 - dtolnay:lossy, r=Mark-Simulacrum
Eliminate bunch of copies of error codepath from Utf8LossyChunksIter

Using a macro to stamp out 7 identical copies of the nontrivial slicing logic to exit this loop didn't seem like a necessary use of a macro. The early return case can be handled by `break` without practically any changes to the logic inside the loop.

All this code is from early 2014 (#12062—nearly 8 years ago; pre-1.0) so it's possible there were compiler limitations that forced the macro way at the time.

Confirmed that `x.py bench library/alloc --stage 0 --test-args from_utf8_lossy` is unaffected on my machine.
2021-11-30 01:08:56 +00:00
Dylan MacKenzie
188d670125 Don't re-export MirPass 2021-11-29 12:58:15 -08:00
Jack Huey
692e96c327 Bless nll 2021-11-29 15:24:44 -05:00
Laurențiu Nicola
dec0d83b41 ⬆️ rust-analyzer 2021-11-29 18:53:28 +02:00
Ralf Jung
6c3c3e0952 CTFE: support assert_zero_valid and assert_uninit_valid 2021-11-29 11:49:31 -05:00
kijima
3c42a11895 Fix small typo 2021-11-30 01:31:10 +09:00
bors
6db0a0e9a4 Auto merge of #91299 - cjgillot:expect-ldid, r=petrochenkov
Take a LocalDefId in expect_*item.

Items and item-likes are always HIR owners.
When trying to find such nodes, there is no ambiguity, the `LocalDefId` and the `HirId::owner` always match.
In such cases, `local_def_id_to_hir_id` does not carry any meaningful information, so we can just skip calling it altogether.
2021-11-29 15:02:01 +00:00
bors
8b954910c5 Auto merge of #91350 - matthiaskrgr:rollup-nleabdj, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #91049 (Add a caveat to std::os::windows::fs::symlink_file)
 - #91281 (Add demonstration test for #91161)
 - #91327 (Delete an unreachable codepath from format_args implementation)
 - #91336 (Remove unused root_parent.)
 - #91349 (Accumulate all values of `-C remark` option)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-29 10:34:52 +00:00
Matthias Krüger
e15e0ba45c
Rollup merge of #91349 - tmiasko:accumulate-remark-args, r=nikic
Accumulate all values of `-C remark` option

When `-C remark=...` option is specified multiple times,
accumulate all values instead of using only the last one.

r? `@nikic`
2021-11-29 10:41:38 +01:00
Matthias Krüger
b8a4a4c232
Rollup merge of #91336 - cjgillot:root_parent, r=matthewjasper
Remove unused root_parent.
2021-11-29 10:41:37 +01:00
Matthias Krüger
7df49eff10
Rollup merge of #91327 - dtolnay:exact, r=michaelwoerister
Delete an unreachable codepath from format_args implementation
2021-11-29 10:41:36 +01:00
Matthias Krüger
a2f924a255
Rollup merge of #91281 - scottmcm:non-exhaustive-as-test, r=Mark-Simulacrum
Add demonstration test for #91161

Since cross-crate things are hard to demonstrate in playground, here's a test showing that something currently works that shouldn't.

cc https://github.com/rust-lang/rust/issues/91161 that tracks fixing the problem (and updating this test)
2021-11-29 10:41:34 +01:00
Matthias Krüger
80277dcc4f
Rollup merge of #91049 - dimo414:patch-1, r=kennytm
Add a caveat to std::os::windows::fs::symlink_file

This is similar to the note on [Python's `os.symlink()`](https://docs.python.org/3/library/os.html#os.symlink). Some additional notes in https://github.com/dimo414/bkt/issues/3.
2021-11-29 10:41:33 +01:00
Tomasz Miąsko
e74e39a699 Accumulate all values of -C remark option
When `-C remark=...` option is specified multiple times,
accumulate all values instead of using only the last one.
2021-11-29 09:12:01 +01:00
bors
44723c5d59 Auto merge of #91043 - camsteffen:descendant-eq, r=petrochenkov
Add fast path to `is_descendant_of`
2021-11-29 07:46:36 +00:00
bors
9981e56d3b Auto merge of #91344 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/91289
2021-11-29 04:40:31 +00:00
Ralf Jung
8a7e90ab9e update Miri 2021-11-28 20:37:49 -05:00
bors
a19e748baa Auto merge of #91338 - matthiaskrgr:rollup-46ry8wi, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #90131 (Fix a format_args span to be expansion)
 - #90832 (Add 1.57.0 release notes)
 - #90833 (Emit LLVM optimization remarks when enabled with `-Cremark`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-29 01:35:33 +00:00
Matthias Krüger
67762ffe35
Rollup merge of #90833 - tmiasko:optimization-remarks, r=nikic
Emit LLVM optimization remarks when enabled with `-Cremark`

The default diagnostic handler considers all remarks to be disabled by
default unless configured otherwise through LLVM internal flags:
`-pass-remarks`, `-pass-remarks-missed`, and `-pass-remarks-analysis`.
This behaviour makes `-Cremark` ineffective on its own.

Fix this by configuring a custom diagnostic handler that enables
optimization remarks based on the value of `-Cremark` option. With
`-Cremark=all` enabling all remarks.

Fixes #90924.

r? `@nikic`
2021-11-28 23:45:17 +01:00
Matthias Krüger
9ef0bcfc68
Rollup merge of #90832 - cuviper:relnotes-1.57.0, r=Mark-Simulacrum
Add 1.57.0 release notes
2021-11-28 23:45:16 +01:00
Matthias Krüger
9715724006
Rollup merge of #90131 - camsteffen:fmt-args-span-fix, r=cjgillot
Fix a format_args span to be expansion

I found this while exploring solutions for rust-lang/rust-clippy#7843.

r? `@m-ou-se`
2021-11-28 23:45:15 +01:00
Cameron Steffen
ac8d514376 Add parent crate assert to register_expn_id 2021-11-28 16:35:54 -06:00
Cameron Steffen
768cfac705 Add fast path to is_descendant_of 2021-11-28 16:35:54 -06:00
bors
350158dd6d Auto merge of #90681 - workingjubilee:update-libc, r=JohnTitor
Update libc to 0.2.108

Changelog:
https://github.com/rust-lang/libc/releases/tag/0.2.107
https://github.com/rust-lang/libc/releases/tag/0.2.108
Primarily intended to pull in rust-lang/libc@fd331f65f2
This should help with https://github.com/rust-lang/rust/pull/90044
2021-11-28 22:29:57 +00:00
Camille GILLOT
06b2e659d3 Remove unused root_parent. 2021-11-28 21:48:28 +01:00
Camille GILLOT
877b2d79d9 Remove eval_always for lib_features. 2021-11-28 21:13:36 +01:00
Camille GILLOT
5fb4648757 Take a LocalDefId in expect_*item. 2021-11-28 21:09:45 +01:00
David Tolnay
cc53f1356d
Delete an unreachable codepath from format_args implementation 2021-11-28 11:52:38 -08:00
bors
db9d361a47 Auto merge of #91320 - matthiaskrgr:rollup-r209seq, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #91251 (Perform Sync check on static items in wf-check instead of during const checks)
 - #91308 (Fix ICE when lowering `trait A where for<'a> Self: 'a`)
 - #91319 (Change output path to {{build-base}} for rustdoc scrape_examples ui test)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-28 17:14:04 +00:00
Matthias Krüger
a7639b67ac
Rollup merge of #91319 - fee1-dead:rustdoc-ice-fix, r=jyn514
Change output path to {{build-base}} for rustdoc scrape_examples ui test

See https://github.com/rust-lang/rust/pull/90611#issuecomment-981092909

r? `@jyn514`

cc `@petrochenkov`
2021-11-28 17:11:12 +01:00
Matthias Krüger
67d175515f
Rollup merge of #91308 - BGR360:issue-88586, r=jackh726
Fix ICE when lowering `trait A where for<'a> Self: 'a`

Fixes #88586.

r? `@jackh726`

Jack, this fix is much smaller in scope than what I think you were proposing in the issue. Let me know if you had a vision for a larger refactor here.

cc `@JohnTitor`
2021-11-28 17:11:11 +01:00
Matthias Krüger
233c50e79e
Rollup merge of #91251 - oli-obk:wf_sync_statics, r=matthewjasper
Perform Sync check on static items in wf-check instead of during const checks

r? `@RalfJung`

This check is solely happening on the signature of the static item and not on its body, therefor it belongs into wf-checking instead of const checking.
2021-11-28 17:11:10 +01:00
Deadbeef
e13562c118 Change output path to {{build-base}} 2021-11-28 23:42:47 +08:00
Vadim Petrochenkov
b6f9416863 tests: Ignore test/debuginfo/rc_arc.rs on windows-gnu
The tests checks some pretty-printer output, but pretty-printers are not embedded on windows-gnu
2021-11-28 23:09:33 +08:00
Ben Reeves
6df2c78e1c Address PR feedback 2021-11-28 07:05:23 -06:00