about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-10-23Auto merge of #90188 - matthiaskrgr:rollup-74cwv5c, r=matthiaskrgrbors-949/+3089
Rollup of 11 pull requests Successful merges: - #83233 (Implement split_array and split_array_mut) - #88300 (Stabilise unix_process_wait_more, extra ExitStatusExt methods) - #89416 (nice_region_error: Include lifetime placeholders in error output) - #89468 (Report fatal lexer errors in `--cfg` command line arguments) - #89730 (add feature flag for `type_changing_struct_update`) - #89920 (Implement -Z location-detail flag) - #90070 (Add edition configuration to compiletest) - #90087 (Sync rustfmt subtree) - #90117 (Make RSplit<T, P>: Clone not require T: Clone) - #90122 (CI: make docker cache download and `docker load` time out after 10 minutes) - #90166 (Add comment documenting why we can't use a simpler solution) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-23Rollup merge of #90122 - rusticstuff:ci_curl_max_time, r=Mark-SimulacrumMatthias Krüger-2/+7
CI: make docker cache download and `docker load` time out after 10 minutes Might help to prevent timeouts we have been seeing: * https://github.com/rust-lang-ci/rust/runs/3946294286?check_suite_focus=true#step:25:23 * https://github.com/rust-lang-ci/rust/runs/3956799200?check_suite_focus=true#step:25:22 * https://github.com/rust-lang-ci/rust/runs/3962928502?check_suite_focus=true#step:25:23 * https://github.com/rust-lang-ci/rust/runs/3967892291?check_suite_focus=true * https://github.com/rust-lang-ci/rust/runs/3971202204?check_suite_focus=true If the download or loading the images into docker times out the CI will still continue and rebuild the docker image from scratch.
2021-10-23Rollup merge of #90117 - calebsander:fix/rsplit-clone, r=yaahcMatthias Krüger-0/+11
Make RSplit<T, P>: Clone not require T: Clone This addresses a TODO comment. The behavior of `#[derive(Clone)]` *does* result in a `T: Clone` requirement. Playground example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a8b1a9581ff8893baf401d624a53d35b Add a manual `Clone` implementation, mirroring `Split` and `SplitInclusive`. `(R)?SplitN(Mut)?` don't have any `Clone` implementations, but I'll leave that for its own pull request.
2021-10-23Rollup merge of #90087 - calebcartwright:rustfmt-subtree, r=calebcartwrightMatthias Krüger-918/+2904
Sync rustfmt subtree There's a large number of small fixes and new features, but nothing too big. Detailed changelog for those interested can be found in https://github.com/rust-lang/rustfmt/blob/master/CHANGELOG.md#1438-2021-10-20
2021-10-23Rollup merge of #90070 - llogiq:compiletest-config-edition, r=Mark-SimulacrumMatthias Krüger-1/+12
Add edition configuration to compiletest This allows the compiletest configuration to set a default edition that can still be overridden with header annotations. Doing this will make it far easier for clippy to get our tests to the newest edition. r? ```@Manishearth```
2021-10-23Rollup merge of #89920 - hudson-ayers:location-detail-control, r=davidtwcoMatthias Krüger-0/+80
Implement -Z location-detail flag This PR implements the `-Z location-detail` flag as described in https://github.com/rust-lang/rfcs/pull/2091 . `-Z location-detail=val` controls what location details are tracked when using `caller_location`. This allows users to control what location details are printed as part of panic messages, by allowing them to exclude any combination of filenames, line numbers, and column numbers. This option is intended to provide users with a way to mitigate the size impact of `#[track_caller]`. Some measurements of the savings of this approach on an embedded binary can be found here: https://github.com/rust-lang/rust/issues/70579#issuecomment-942556822 . Closes #70580 (unless people want to leave that open as a place for discussion of further improvements). This is my first real PR to rust, so any help correcting mistakes / understanding side effects / improving my tests is appreciated :) I have one question: RFC 2091 specified this as a debugging option (I think that is what -Z implies?). Does that mean this can never be stabilized without a separate MCP? If so, do I need to submit an MCP now, or is the initial RFC specifying this option sufficient for this to be merged as is, and then an MCP would be needed for eventual stabilization?
2021-10-23Rollup merge of #89730 - crlf0710:type_changing_feature, r=jackh726Matthias Krüger-0/+38
add feature flag for `type_changing_struct_update` This implements the PR0 part of the mentoring notes within #86618. overrides the previous inactive #86646 pr. r? ```@nikomatsakis```
2021-10-23Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726Matthias Krüger-0/+9
Report fatal lexer errors in `--cfg` command line arguments Fixes #89358. The erroneous behavior was apparently introduced by `@Mark-Simulacrum` in https://github.com/rust-lang/rust/commit/a678e3191197f145451c97c6cc884e15cae38186; the idea is to silence individual parser errors and instead emit one catch-all error message after parsing. However, for the example in #89358, a fatal lexer error is created here: https://github.com/rust-lang/rust/blob/edebf77e0090195bf80c0d8cda821e1bf9d03053/compiler/rustc_parse/src/lexer/mod.rs#L340-L349 This fatal error aborts the compilation, and so the call to `new_parser_from_source_str()` never returns and the catch-all error message is never emitted. I have therefore changed the `SilentEmitter` to silence only non-fatal errors; with my changes, for the rustc invocation described in #89358: ```sh rustc --cfg "abc\"" ``` I get the following output: ``` error[E0765]: unterminated double quote string | = note: this error occurred on the command line: `--cfg=abc"` ```
2021-10-23Auto merge of #90054 - michaelwoerister:v0-mangling-in-compiler, ↵bors-3/+21
r=Mark-Simulacrum Make new symbol mangling scheme default for compiler itself. As suggest in https://github.com/rust-lang/rust/pull/89917#issuecomment-945888574, this PR enables the new symbol mangling scheme for the compiler itself. The standard library is still compiled using the legacy mangling scheme so that the new symbol format does not show up in user code (yet). r? `@Mark-Simulacrum`
2021-10-22nice_region_error: Include lifetime placeholders in error outputMichael Howell-28/+28
As you can see in src/test/ui/traits/self-without-lifetime-constraint.stderr you can get very confusing type names if you don't have this. Fixes #87763
2021-10-22add feature flag for `type_changing_struct_update`Charles Lew-0/+38
2021-10-22Rollup merge of #90115 - samlich:test-issue-78561, r=oli-obkYuki Okushi-0/+23
Add test for issue #78561 Adds test for and closes #78561 which previously crashed compiler.
2021-10-22Rollup merge of #90114 - BoxyUwU:cg_defaults_tests, r=lcnrYuki Okushi-2/+294
Add some tests for const_generics_defaults I think this covers some of the stuff required for stabilisation report, some of these tests are probably covering stuff we already have but it can't hurt to have more :) r? ````@lcnr````
2021-10-22Rollup merge of #90078 - JohnTitor:test-83479, r=Mark-SimulacrumYuki Okushi-1/+61
Add a regression test for issue-83479 Add a regression test for https://github.com/rust-lang/rust/issues/83479#issue-841147340, but not close the issue, see https://github.com/rust-lang/rust/issues/83479#issuecomment-947255641.
2021-10-22Rollup merge of #90069 - tmiasko:promoted-const-qualif, r=oli-obkYuki Okushi-0/+9
Fix const qualification when executed after promotion The const qualification was so far performed before the promotion and the implementation assumed that it will never encounter a promoted. With `const_precise_live_drops` feature, checking for live drops is delayed until after drop elaboration, which in turn runs after promotion. so the assumption is no longer true. When evaluating `NeedsNonConstDrop` it is now possible to encounter promoteds. Use type base qualification for the promoted. It is a sound approximation in general, and in the specific case of promoteds and `NeedsNonConstDrop` it is precise. Fixes #89938.
2021-10-22Rollup merge of #90028 - tmiasko:structural-match-closure, r=spastorinoYuki Okushi-0/+36
Reject closures in patterns Fixes #90013.
2021-10-22Rollup merge of #89922 - JohnTitor:update-e0637, r=jackh726Yuki Okushi-17/+32
Update E0637 description to mention `&` w/o an explicit lifetime name Deal with https://github.com/rust-lang/rust/issues/89824#issuecomment-941598647. Another solution would be splitting the error code into two as (I think) it's a bit unclear to users why they have the same error code.
2021-10-22Rollup merge of #89895 - camsteffen:for-loop-head-span, r=davidtwcoYuki Okushi-11/+5
Don't mark for loop iter expression as desugared We typically don't mark spans of lowered things as desugared. This helps Clippy rightly discern when code is (not) from expansion. This was discovered by ``@flip1995`` at https://github.com/rust-lang/rust-clippy/pull/7789#issuecomment-939289501.
2021-10-22Rollup merge of #89257 - aDotInTheVoid:macro-error-2, r=estebankYuki Okushi-0/+52
Give better error for `macro_rules name` follow up to #89221 r? ``@estebank`` ``@rustbot`` modify labels: +A-diagnostics +A-parser
2021-10-21Make RSplit<T, P>: Clone not require T: CloneCaleb Sander-0/+11
This addresses a TODO comment. The behavior of #[derive(Clone)] *does* result in a T: Clone requirement. Add a manual Clone implementation, matching Split and SplitInclusive.
2021-10-21Auto merge of #90126 - flip1995:clippyup, r=Manishearthbors-628/+4334
Update Clippy r? `@Manishearth` This adds a new dep to Clippy: [indoc](https://crates.io/crates/indoc) And transitively: [unindent](https://crates.io/crates/unindent)
2021-10-21fix doc issue in rustfmtCaleb Cartwright-1/+1
2021-10-21Time out docker load after 10 minutes, kill after 12 due to CI hangs.Hans Kratz-1/+4
2021-10-21add tests for -Zlocation-detailHudson Ayers-0/+37
2021-10-21document the unstable location-detail flagHudson Ayers-0/+43
2021-10-21Merge commit '91496c2ac6abf6454c413bb23e8becf6b6dc20ea' into clippyupflip1995-628/+4334
2021-10-21Add test for issue #78561samlich-0/+23
2021-10-21Debug output before loading docker images as that might hang.Hans Kratz-0/+1
2021-10-21CI: make cache download attempt time out after 10 minutesHans Kratz-1/+2
2021-10-21Rollup merge of #90098 - ↵Yuki Okushi-1/+10
GuillaumeGomez:add-test-foreign-impl-missing-doc-code-examples, r=jyn514 Add test to ensure that the missing_doc_code_examples is not triggered on foreign trait implementations Fixes #76450. r? ````@jyn514````
2021-10-21Rollup merge of #90097 - ↵Yuki Okushi-6/+19
GuillaumeGomez:duplicated-sidebar-entry-reexported-macro, r=notriddle Add test for duplicated sidebar entries for reexported macro Fixes #90015. r? ````@notriddle````
2021-10-21Rollup merge of #90048 - GuillaumeGomez:line-number-setting, r=jshaYuki Okushi-1/+24
Add test for line-number setting The first commit updates the version of the package to be able to have multi-line commands (which looks much nicer for this test). r? ````@jsha````
2021-10-21Rollup merge of #90031 - durin42:allow-llvm-tests, r=Mark-SimulacrumYuki Okushi-1/+7
config: add the option to enable LLVM tests I'm working on some LLVM patches in concert with a Rust patch, and it's helping me quite a bit to have this as an option. It doesn't seem that hard, so I figured I'd formalize it in x.py and send it upstream.
2021-10-21Rollup merge of #90029 - tgnottingham:incr-debug-logging-test, r=Mark-SimulacrumYuki Okushi-4/+25
Add test for debug logging during incremental compilation Debug logging during incremental compilation had been broken for some time, until #89343 fixed it (among other things). Add a test so this is less likely to break without being noticed. This test is nearly a copy of the `src/test/ui/rustc-rust-log.rs` test, but tests debug logging in the incremental compliation code paths.
2021-10-21Auto merge of #89998 - camelid:box-default, r=jyn514bors-13/+17
rustdoc: Box some fields of `GenericParamDefKind` to reduce size This change shrinks `GenericParamDef` from 120 to 56 bytes. `GenericParamDef` is used a lot, so the extra indirection should hopefully be worth the size savings. r? `@ghost`
2021-10-21*dust dust*Ellen-2/+2
2021-10-20OrderingEllen-1/+10
2021-10-20add fixmeEllen-1/+1
2021-10-20InferenceEllen-0/+26
2021-10-20WfnessEllen-0/+59
2021-10-20Return pos impl traitEllen-0/+94
2021-10-20Trait objectsEllen-0/+104
2021-10-20Add edition configuration to compiletestAndre Bogus-1/+12
2021-10-20ensure cargo-fmt tests are excluded from root workspaceCaleb Cartwright-0/+2
2021-10-20Add test to ensure that the missing_doc_code_examples is not triggered on ↵Guillaume Gomez-1/+10
foreign trait implementations
2021-10-20Auto merge of #90050 - michaelwoerister:fix-vtable-debug-name-crash-90019, ↵bors-0/+10
r=wesleywiser Erase late-bound regions before computing vtable debuginfo name. Fixes #90019. The `msvc_enum_fallback()` for computing enum type names needs to access the memory layout of niche enums in order to determine the type name. `compute_debuginfo_vtable_name()` did not properly erase regions before computing type names which made memory layout computation ICE when encountering un-erased regions. r? `@wesleywiser`
2021-10-20Add test for duplicated sidebar entries for reexported macroGuillaume Gomez-6/+19
2021-10-20Add test for line-number settingGuillaume Gomez-0/+23
2021-10-20Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtreeCaleb Cartwright-918/+2902
2021-10-19Merge branch 'master' into 1.4.38-subtreeCaleb Cartwright-518/+848