Commit Graph

158924 Commits

Author SHA1 Message Date
Matthias Krüger
dc78cd4c61
Rollup merge of #91294 - cjgillot:process-elem, r=jackh726
Visit type in process_projection_elem.

Instead of reimplementing it for each visitor.
2021-11-30 23:43:31 +01:00
Camille GILLOT
aa2450f41b Merge Implicit and ImplicitMissing. 2021-11-30 22:56:47 +01:00
Camille GILLOT
72dc29c260 Handle allow(elided_lifetimes_in_paths). 2021-11-30 22:55:07 +01:00
Camille GILLOT
c07a6d2ef0 Complete test. 2021-11-30 22:55:07 +01:00
Camille GILLOT
b621133200 Simplify lowering. 2021-11-30 22:55:07 +01:00
Camille GILLOT
5ea7ea8a57 Lint elided lifetimes in path during lifetime resolution. 2021-11-30 22:55:07 +01:00
Camille GILLOT
ac03470c3b Flatten match. 2021-11-30 22:55:06 +01:00
Camille GILLOT
c44e93086d Move report_elision_failure in diagnostics.rs. 2021-11-30 22:55:06 +01:00
Rich Kadel
0c57fab5fc Add conditional support for coverage map version 6
This commit augments Swatinem's initial commit in uncommitted PR #90047,
which was a great starting point, but did not fully support LLVM
Coverage Mapping Format version 6.

Version 6 requires adding the compilation directory when file paths are
relative, and since Rustc coverage maps use relative paths, we should
add the expected compilation directory entry.

Note, however, that with the compilation directory, coverage reports
from `llvm-cov show` can now report file names (when the report includes
more than one file) with the full absolute path to the file.

This would be a problem for test results, but the workaround (for the
rust coverage tests) is to include an additional `llvm-cov show`
parameter: `--compilation-dir=.`
2021-11-30 13:54:53 -08:00
Guillaume Gomez
02782bba60 Return ConstStability instead of &ConstStability in Item::const_stability 2021-11-30 22:53:20 +01:00
Guillaume Gomez
b647c90262 Improve code by replacing &str with Symbol in render_stability_since_raw 2021-11-30 22:53:20 +01:00
Guillaume Gomez
0c1b0f7757 Add test for const deref methods display 2021-11-30 22:46:29 +01:00
Guillaume Gomez
588a99bbdd Fix display for "const" deref methods in rustdoc 2021-11-30 22:46:28 +01:00
Michael Howell
d4f71d8f86
Update src/librustdoc/clean/types.rs
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-11-30 14:22:15 -07:00
Michael Howell
7bb50d4f30
Update src/librustdoc/clean/types.rs
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-11-30 14:22:03 -07:00
Joshua Nelson
bd894a0877 Emit a warning on generic parameters with doc comments 2021-11-30 18:49:55 +00:00
Mark Rousskov
971c549ca3 re-format with new rustfmt 2021-11-30 13:08:41 -05:00
Graydon Hoare
7907fa8ec4
Clarify and tidy up explanation of E0038 2021-11-30 09:25:17 -08:00
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
207c80f105 Auto merge of #91352 - nnethercote:RawVec-reserve_for_push, r=dtolnay
Introduce `RawVec::reserve_for_push`.

If `Vec::push`'s capacity check fails it calls `RawVec::reserve`, which
then also does a capacity check.

This commit introduces `reserve_for_push` which skips the redundant
capacity check, for some slight compile time speed-ups.

I tried lots of minor variations on this, e.g. different inlining
attributes. This was the best one I could find.

r? `@ghost`
2021-11-30 13:52:38 +00: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
Dylan MacKenzie
bfd95e1f08 Bless duplicate test 2021-11-29 22:38:26 -08:00
Dylan MacKenzie
4c1d3173ab Bless tests with new suggestion 2021-11-29 22:20:34 -08:00
Dylan MacKenzie
f6b499da16 Suggest the pat_param specifier before | on 2021 edition
We have a migration warning but no lint for users who have enabled the
new edition.
2021-11-29 22:20:34 -08: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
Amanieu d'Antras
41e2a53c00 Android: -ldl must appear after -lgcc when linking 2021-11-30 02:42:35 +00:00
Cédric Barreteau
29f5c98a17 Remove unnecessary check in VecDeque::grow
All callers already check that the buffer is full before calling
`grow()`. This is where it makes the most sense, since `grow()` is
`inline(never)` and we don't want to pay for a function call just for
that check.
It could also be argued that it would be correct to call `grow()` even
if the buffer wasn't full yet.
This change breaks no code since `grow()` is not `pub`.
2021-11-29 21:14:20 -05: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&mdash;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
Lucas Kent
abd704b844 Remove all migrate.nll.stderr files 2021-11-30 12:05:34 +11:00
Nicholas Nethercote
6a83352aa3 Introduce RawVec::reserve_for_push.
If `Vec::push`'s capacity check fails it calls `RawVec::reserve`, which
then also does a capacity check.

This commit introduces `reserve_for_push` which skips the redundant
capacity check, for some slight compile time speed-ups.

I tried lots of minor variations on this, e.g. different inlining
attributes. This was the best one I could find.
2021-11-30 08:10:47 +11: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
Yacin Tmimi
1f28683ffa Update nightly only test with #[nightly_only_test] attribute 2021-11-29 14:02:02 -06:00
Michael Howell
85ba6c7b34 Only show notable traits if both types are the same
Checking only their DefId doesn't work because all slices have the same
fake DefId.

Fixes #91347
2021-11-29 12:23:07 -07:00
Esteban Kuber
c02710530c review comments: clean up 2021-11-29 18:39:08 +00:00
Fabian Wolff
821b92b102 Improve error message for incorrect field accesses through raw pointers 2021-11-29 19:31:17 +01: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