about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-09-25Auto merge of #102265 - fee1-dead-contrib:rollup-a7fccbg, r=fee1-deadbors-142/+191
Rollup of 8 pull requests Successful merges: - #98111 (Clarify `[T]::select_nth_unstable*` return values) - #101431 (Look at move place's type when suggesting mutable reborrow) - #101800 (Constify slice.split_at_mut(_unchecked)) - #101997 (Remove support for legacy PM) - #102194 (Note the type when unable to drop values in compile time) - #102200 (Constify Default impl's for Arrays and Tuples.) - #102245 (Constify cmp_min_max_by.) - #102259 (Type-annotate and simplify documentation of Option::unwrap_or_default) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-25Rollup merge of #102194 - fee1-dead-contrib:improve-const-drop, r=oli-obkfee1-dead-139/+139
Note the type when unable to drop values in compile time
2022-09-25Rollup merge of #101997 - cuviper:drop-legacy-pm, r=nikicfee1-dead-3/+2
Remove support for legacy PM This removes support for optimizing with LLVM's legacy pass manager, as well as the unstable `-Znew-llvm-pass-manager` option. We have been defaulting to the new PM since LLVM 13 (except for s390x that waited for 14), and LLVM 15 removed support altogether. The only place we still use the legacy PM is for writing the output file, just like `llc` does. cc #74705 r? ``@nikic``
2022-09-25Rollup merge of #101431 - compiler-errors:move-place-ty-for-move-place-sugg, ↵fee1-dead-0/+50
r=cjgillot Look at move place's type when suggesting mutable reborrow Not sure why we are looking at the use site's ty instead of the move site's ty in order to suggest reborrowing the move site, but it was suppressing a perfectly valid reborrow suggestion. r? `@estebank` who i think touched this last in 520461f1fb2730f8edb17922f3bcc74fccdc52d3, though that was quite a while ago so feel free to reassign.
2022-09-25Auto merge of #100865 - compiler-errors:parent-substs-still, r=cjgillotbors-11/+23
Don't drop parent substs when we have no generic parameters in `create_substs_for_ast_path` This bug is being shadowed by an explicit check for `generics.params.is_empty()` in the only parent caller that could trigger it (`create_substs_for_associated_item`). I triggered it on another branch where I'm messing around with astconv stuff. Also, the second commit simplifies `create_substs_for_associated_item`. Removing that explicit check I mentioned above^ and also the special case call to `Astconv::prohibit_generics` causes the UI test `src/test/ui/structs/struct-path-associated-type.stderr` to change, but I think that it's clearer now. The suggestion to remove the generics is actually useful.
2022-09-25Rollup merge of #102216 - ehuss:rustdoc-diagnostic-width, r=notriddleMatthias Krüger-1/+1
rustdoc: Stabilize --diagnostic-width This stabilizes the `--diagnostic-width` flag for rustdoc. This flag was stabilized in rustc in #95635, but it isn't clear from the discussion there why it wasn't stabilized in rustdoc. I believe this flag works as expected, following the same behavior as rustc. I'd like to stabilize this so that the same support can be stabilized in cargo, and it would help simplify things if both rustc and rustdoc supported it.
2022-09-25Rollup merge of #102161 - compiler-errors:issue-102138, r=tmandryMatthias Krüger-0/+57
Resolve async fn signature even without body (e.g., in trait) Fixes #102138 This "bail if no body" behavior was introduced in #69539 to fix #69401, but that ICE does not reproduce any more. The error message changes a bit, but that's all, and I don't think it's a particularly diagnostic bad regression.
2022-09-25Rollup merge of #102016 - lcnr:given-OutlivesEnvironment, r=jackh726Matthias Krüger-0/+50
implied_bounds: deal with inference vars fixes #101951 while computing implied bounds for `<<T as ConstructionFirm>::Builder as BuilderFn<'_>>::Output` normalization replaces a projection with an inference var (adding a `Projection` obligation). Until we prove that obligation, this inference var remains unknown, which caused us to miss an implied bound necessary to prove that the unnormalized projection from the trait method signature is wf. r? types
2022-09-24Auto merge of #102040 - TaKO8Ki:separate-definitions-and-hir-owners, r=cjgillotbors-2/+4
Separate definitions and HIR owners in the type system Fixes #83158 r? `@cjgillot`
2022-09-24Note the type when unable to drop values in compile timeDeadbeef-139/+139
2022-09-24Add testMichael Goulet-0/+11
2022-09-24Only record extra lifetime params for async trait fn with no bodyMichael Goulet-50/+4
2022-09-24Resolve async fn signature even without body (in trait)Michael Goulet-4/+96
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-2/+4
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24Rollup merge of #102210 - notriddle:notriddle/did-you-mean, r=cjgillotMatthias Krüger-0/+51
diagnostics: avoid syntactically invalid suggestion in if conditionals Fixes #101065
2022-09-24Rollup merge of #102109 - petrochenkov:addids, r=oli-obkMatthias Krüger-2/+45
resolve: Set effective visibilities for imports more precisely Instead of setting them for all primary and additional IDs of the import, only set them for the binding's true ID.
2022-09-24Auto merge of #102064 - cjgillot:revert, r=Mark-Simulacrumbors-74/+19
Revert perf-regression 101620 Reverts #101862 #101620 r? `@Mark-Simulacrum`
2022-09-24Rollup merge of #102199 - GuillaumeGomez:improve-rustdoc-gui-tests, r=notriddleMatthias Krüger-5/+11
Improve rustdoc GUI tests I finally finished the update so we can now store values in variables and use them. It improves things nicely. r? ``@notriddle``
2022-09-24Rollup merge of #102152 - compiler-errors:issue-102140, r=fee1-deadMatthias Krüger-0/+59
Calculate `ProjectionTy::trait_def_id` for return-position `impl Trait` in trait correctly Fixes #102140
2022-09-24Rollup merge of #102146 - notriddle:notriddle/sidebar-jank, r=GuillaumeGomezMatthias Krüger-12/+27
rustdoc: CSS prevent sidebar width change jank This commit makes the `width` and `min-width` of the sidebar the same. They originally were when cad0fce2053d52b7ba04c458f4c124c8b5c6141e added the `min-width` rule, but 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c changed the `width` without changing the `min-width`, causing it to sometimes oscilate between 200 and 250 pixels depending on the main content. # Before [Screencast from 09-22-2022 10:25:29 AM.webm](https://user-images.githubusercontent.com/1593513/191813469-ea00f30f-6f49-40fc-9a26-e1dfd5068d2b.webm) # After [Screencast from 09-22-2022 10:32:20 AM.webm](https://user-images.githubusercontent.com/1593513/191813642-ae0902da-5262-403a-bbdf-995334201acb.webm)
2022-09-24Rollup merge of #102082 - andrewpollack:uid-ignore, r=tmandryMatthias Krüger-0/+1
Adding ignore fuchsia non-applicable commands Adding ignore fuchsia non-applicable commands cc `@djkoloski` r? `@tmandry`
2022-09-24Rollup merge of #102081 - andrewpollack:add-execvp-calls-ignore, r=tmandryMatthias Krüger-0/+1
Adding ignore fuchsia tests for execvp (pre_exec) Adding ignore fuchsia tests for pre_exec, which calls execvp cc. `@djkoloski` r? `@tmandry`
2022-09-24Auto merge of #102068 - cjgillot:erased-lifetime-print, r=eholkbors-57/+57
Always print '_, even for erased lifetimes. Explicit lifetime arguments are now the recommended syntax in rust 2018 and rust 2021. This PR applies this discipline to rustc itself.
2022-09-23rustdoc: Stabilize --diagnostic-widthEric Huss-1/+1
2022-09-23diagnostics: avoid syntactically invalid suggestion in if conditionalsMichael Howell-0/+51
Fixes #101065
2022-09-23Auto merge of #102192 - matthiaskrgr:rollup-0ctjzco, r=matthiaskrgrbors-97/+12
Rollup of 7 pull requests Successful merges: - #102094 (Add missing documentation for `bool::from_str`) - #102115 (Add examples to `bool::then` and `bool::then_some`) - #102134 (Detect panic strategy using `rustc --print cfg`) - #102137 (Don't convert valtree to constvalue during normalization) - #102148 (add regression test for miri issue 2433) - #102158 (rustdoc: clean up CSS/DOM for deprecation warnings) - #102177 (Fix a typo in `std`'s root docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-23Bless 32bit ui.Camille GILLOT-8/+8
2022-09-23Bless pretty tests.Camille GILLOT-3/+3
2022-09-23Bless cgu test.Camille GILLOT-3/+3
2022-09-23Always print '_, even for erased lifetimes.Camille GILLOT-43/+43
2022-09-23rustdoc: fix GUI tests to deal with slightly changed widthMichael Howell-12/+12
2022-09-23Improve GUI tests by using variablesGuillaume Gomez-5/+11
2022-09-23rustdoc: add regression test for sidebar width jankMichael Howell-0/+15
2022-09-23Rollup merge of #102137 - b-naber:lazy-const-val-conversion, r=lcnrMatthias Krüger-35/+6
Don't convert valtree to constvalue during normalization r? ``@lcnr``
2022-09-23Rollup merge of #102134 - flba-eb:master, r=bjorn3Matthias Krüger-62/+6
Detect panic strategy using `rustc --print cfg` Instead of relying on a command line parameter, detect if a target is able to unwind or not. Ignore tests that require unwinding on targets that don't support it. I did not find any place where the removed parameter has been used, but it feels a bit risky as I'm new to this test framework. r? bjorn3
2022-09-23Auto merge of #102056 - b-naber:unevaluated, r=lcnrbors-1/+1
Introduce mir::Unevaluated Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that. r? `@lcnr`
2022-09-23rename Unevaluated to UnevaluatedConstb-naber-1/+1
2022-09-23fix testb-naber-35/+6
2022-09-23Auto merge of #102165 - matthiaskrgr:rollup-n5oquhe, r=matthiaskrgrbors-17/+249
Rollup of 8 pull requests Successful merges: - #100734 (Split out async_fn_in_trait into a separate feature) - #101664 (Note if mismatched types have a similar name) - #101815 (Migrated the rustc_passes annotation without effect diagnostic infrastructure) - #102042 (Distribute rust-docs-json via rustup.) - #102066 (rustdoc: remove unnecessary `max-width` on headers) - #102095 (Deduplicate two functions that would soon have been three) - #102104 (Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests) - #102112 (Allow full relro on powerpc64-unknown-linux-gnu) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-23Repair stderr test result to added lineFlorian Bartels-1/+1
2022-09-23ignore test cases when checking emscriptenFlorian Bartels-0/+2
2022-09-23Auto merge of #102150 - matthiaskrgr:rollup-6xmd8f3, r=matthiaskrgrbors-1/+18
Rollup of 10 pull requests Successful merges: - #102113 (OpTy: fix a method taking self rather than &self) - #102118 (rustdoc: clean up line numbers on code examples) - #102123 (Add note to clippy::non_expressive_names doc) - #102125 (rustdoc: remove no-op CSS `.content .item-info { position: relative }`) - #102127 (Use appropriate variable names) - #102128 (Const unification is already infallible, remove the error handling logic) - #102133 (Use valtrees for comparison) - #102135 (Improve some AllTypes fields name) - #102144 (Extend const_convert with const {FormResidual, Try} for ControlFlow.) - #102147 (rustdoc: remove no-op CSS `.location:empty { border: none }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-23Adapt test resultsFlorian Bartels-6/+5
2022-09-23Restore ignore tagFlorian Bartels-57/+0
This test case actually requires std::process.
2022-09-23Auto merge of #100488 - khyperia:invalid-calling-convention-help-message, ↵bors-2/+49
r=nagisa,jyn514 Improve the help message for an invalid calling convention Fixes https://github.com/rust-lang/rust/issues/93601 I mostly followed the suggestions of `@nagisa` in that issue, ~~however, I wasn't sure how to check stability for the suggestion of "Do not suggest CCs that cannot be used due to them being unstable and feature not being enabled", so I did not implement that point.~~ I haven't contributed to rustc much, please feel free to point out suggestions! For example, the `.map(|s| Symbol::intern(s)).collect::<Vec<_>>()` seems pretty gross performance-wise, but maybe that's OK in error reporting code.
2022-09-23Rollup merge of #102104 - Aaron1011:no-test-backtrace, r=Mark-SimulacrumMatthias Krüger-2/+4
Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests This allows the tests to pass even if the user has RUST_BACKTRACE set when running 'x.py'
2022-09-23Rollup merge of #102066 - notriddle:notriddle/headers-max-width, ↵Matthias Krüger-1/+1
r=GuillaumeGomez rustdoc: remove unnecessary `max-width` on headers This code was added in 003b2bc1c65251ec2fc80b78ed91c43fb35402ec to prevent these headers from overlapping `.out-of-band` side items. That stopped being a problem when 3f92ff34b5a2fe8dd1a32aa27d437519e63782f0 switched rustdoc over to using `float`, rather than `position: absolute`, to implement this.
2022-09-23Rollup merge of #101664 - mejrs:similarity, r=fee1-deadMatthias Krüger-0/+132
Note if mismatched types have a similar name If users get a type error between similarly named types, it will point out that these are actually different types, and where they were defined.
2022-09-23Rollup merge of #100734 - ComputerDruid:afit_feature, r=compiler-errorsMatthias Krüger-14/+112
Split out async_fn_in_trait into a separate feature PR #101224 added support for async fn in trait desuraging behind the `return_position_impl_trait_in_trait` feature. Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
2022-09-23Auto merge of #101708 - compiler-errors:issue-101696, r=jackh726bors-0/+36
Normalize closure signature after construction Astconv can't normalize inputs or outputs with escaping bound vars ([see this](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/check/fn_ctxt/mod.rs.html#294)), so normalize them after we've wrapped them in a binder. Fixes #101696