about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-09-23Showcase a broken diagnosticOli Scherer-4/+4
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
2022-09-23Serialize RPITIT values in libsMichael Goulet-0/+20
2022-09-22Improve the help message for an invalid calling conventionkhyperia-2/+49
2022-09-22Calculate ProjectionTy::trait_def_id correctlyMichael Goulet-0/+59
2022-09-22Rollup merge of #102118 - notriddle:notriddle/line-numbers, r=GuillaumeGomezMatthias Krüger-1/+18
rustdoc: clean up line numbers on code examples * First commit switches from `display: inline-flex; width: 100%` to `display: flex`. `display: inline-flex` was used as part of https://github.com/rust-lang/rust/commit/e961d397cab900c55f8d8c104648852e2b63664e, the original commit that added these line numbers. Does anyone know why it was done this way? * Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does. Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html
2022-09-22Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk"Camille GILLOT-74/+19
This reverts commit 2cb9a65684dba47c52de8fa938febf97a73e70a9, reversing changes made to 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c.
2022-09-23Fix slight issues with stderrRageking8-2/+3
2022-09-23Change UI test stderrRageking8-4/+3
2022-09-22recover from struct nested in structRageking8-0/+17
2022-09-22Unify subdiagnostic attribute parsingXiretza-85/+221
2022-09-22Add missing code="" attributes to suggestion subdiagnosticsXiretza-1/+1
2022-09-22Extract subdiagnostic attribute parsingXiretza-83/+105
2022-09-22Point to previous applicability when declared multiple timesXiretza-2/+8
2022-09-22Ensure #[suggestion] is only applied to correct tuple typesXiretza-15/+55
2022-09-22Ensure code= in #[suggestion(...)] is only set onceXiretza-1/+21
2022-09-22Auto merge of #102139 - Dylan-DPC:rollup-ljlipt8, r=Dylan-DPCbors-5/+23
Rollup of 8 pull requests Successful merges: - #101598 (Update rustc's information on Android's sanitizers) - #102036 (Remove use of `io::ErrorKind::Other` in std) - #102037 (Make cycle errors recoverable) - #102069 (Skip `Equate` relation in `handle_opaque_type`) - #102076 (rustc_transmute: fix big-endian discriminants) - #102107 (Add missing space between notable trait tooltip and where clause) - #102119 (Fix a typo “pararmeter” in error message) - #102131 (Added which number is computed in compute_float.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-22Rollup merge of #102119 - steffahn:fix-pararmeter, r=dtolnayDylan DPC-4/+4
Fix a typo “pararmeter” in error message Issue reported on IRLO: https://internals.rust-lang.org/t/fixing-a-typo/17427
2022-09-22Rollup merge of #102107 - Urgau:rustdoc-missing-space-before-where-clause, ↵Dylan DPC-1/+18
r=GuillaumeGomez Add missing space between notable trait tooltip and where clause This PR add a missing space between the notable trait tooltip and the where clause. The issue can be seeing on the [BufRead](https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html) page. Added a simple snapshot regression test in `src/test/rustdoc/where.rs`. Before: ![image](https://user-images.githubusercontent.com/3616612/191566999-2f80e138-29c9-4f66-8bed-07781cbd9783.png) After: ![image](https://user-images.githubusercontent.com/3616612/191567025-0ed3f7d4-7cec-4788-901f-5980fc241daa.png) r? `@GuillaumeGomez`
2022-09-22Rollup merge of #102037 - jyn514:normalize-docs, r=lcnrDylan DPC-0/+1
Make cycle errors recoverable In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, ```@jackh726``` has said we need to be careful about overflow errors: https://github.com/rust-lang/rust/pull/91430#issuecomment-983997013 > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered. Helps with https://github.com/rust-lang/rust/issues/81091. r? ```@lcnr``` cc ```@matthewjasper```
2022-09-22Auto merge of #100980 - compiler-errors:normalize-opaque-w-bound-vars, r=lcnrbors-20/+1
Normalize opaques w/ bound vars First, we reenable normalization of opaque types with escaping late bound regions to fix rust-lang/miri#2433. This essentially reverts #89285. Second, we mitigate the perf regression found in #88862 by simplifying the way that we relate (sub and eq) GeneratorWitness types. This relies on the fact that we construct these GeneratorWitness types somewhat particularly (with all free regions found in the witness types replaced with late bound regions) -- but those bound regions really should be treated as existential regions, not universal ones. Those two facts leads me to believe that we do not need to use the full `higher_ranked_sub` machinery to relate two generator witnesses. I'm pretty confident that this is correct, but I'm glad to discuss this further.
2022-09-22resolve: Set effective visibilities for imports more preciselyVadim Petrochenkov-2/+2
Instead of setting them for all primary and additional IDs of the import, only set them for the binding's true ID.
2022-09-22effective visibility: Add test for a reexport of two namesVadim Petrochenkov-2/+45
in different namespaces, one public and another private.
2022-09-22bless testsb-naber-1/+1
2022-09-22Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, ↵bors-174/+248
r=oli-obk Require `#[const_trait]` on `Trait` for `impl const Trait` r? `@oli-obk`
2022-09-21Split out async_fn_in_trait into a separate featureDan Johnson-14/+112
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-22Optimize subtyping and equation of GeneratorWitnessMichael Goulet-20/+1
2022-09-21rustdoc: update test case for headers without max-widthMichael Howell-1/+1
2022-09-22Rollup merge of #102100 - GuillaumeGomez:stab-in-docblocks, r=notriddleYuki Okushi-0/+39
Prevent usage of .stab elements to create scrollable areas in doc blocks Fixes #101874. You can test it online [here](https://rustdoc.crud.net/imperio/stab-in-doblocks/foo/index.html). r? `@notriddle`
2022-09-22Rollup merge of #102084 - andrewpollack:add-issue-panic-unwind, r=bjorn3Yuki Okushi-2/+3
Adding needs-unwind for test using panic::catch_unwind Adding needs-unwind for test using panic::catch_unwind cc. `@djkoloski` r? `@tmandry`
2022-09-22Rollup merge of #102073 - andrewpollack:add-execvp-call-ignore, r=tmandryYuki Okushi-0/+1
Adding ignore fuchsia tests for execvp Adding ignore fuchsia tests for execvp cc. ``@djkoloski`` r? ``@tmandry``
2022-09-22Rollup merge of #102071 - andrewpollack:add-needs-unwind-for-binary-size, ↵Yuki Okushi-0/+3
r=tmandry Adding needs-unwind for tests testing memory size of Futures/Closures Adding needs-unwind for tests testing memory size of Futures/Closures cc. ``@djkoloski`` r? ``@tmandry``
2022-09-22Rollup merge of #102054 - GuillaumeGomez:sidebar-all-page, r=notriddleYuki Okushi-0/+35
Unify "all items" page's sidebar with other pages Currently, the "all types" page's sidebar doesn't list the different categories of type available. This PR fixes it. Before: ![Screenshot from 2022-09-20 17-11-15](https://user-images.githubusercontent.com/3050060/191296348-95d8771d-a887-432e-96bd-d5284d87d743.png) After: ![Screenshot from 2022-09-20 17-11-09](https://user-images.githubusercontent.com/3050060/191296344-8e7318a3-eb51-4037-ae94-7ae2115363ce.png) r? `@notriddle`
2022-09-22Rollup merge of #102033 - andrewpollack:add-unwind-on-pretty, r=tmandryYuki Okushi-0/+3
Adding needs-unwind to nicer-assert-messages compiler ui tests Tests where unwind is required for asserting on contents of error message cc. ``@djkoloski`` r? ``@tmandry``
2022-09-22Rollup merge of #102032 - andrewpollack:bad-signal-compiler-tests, r=tmandryYuki Okushi-0/+5
Adding ignore fuchsia tests for signal interpretation cases Tests where Signal interpreting is required. Since Fuchsia currently does not return signals of type `libc::SIGSEGV` etc., instead, use generalized `!status.success()` case. cc. `@djkoloski` r? `@tmandry`
2022-09-21rustdoc: adjust test to cope with slightly different scrolling behaviourMichael Howell-1/+1
2022-09-22Bless test output changesFrank Steffahn-4/+4
2022-09-21rustdoc: dynamically show-hide line numbers on code examplesMichael Howell-0/+17
2022-09-21Auto merge of #101558 - ↵bors-170/+170
JhonnyBillM:session-diagnostic-to-diagnostic-handler-refactor, r=davidtwco Move and rename `SessionDiagnostic` & `SessionSubdiagnostic` traits and macros After PR #101434, we want to: - [x] Move `SessionDiagnostic` to `rustc_errors`. - [x] Add `emit_` methods that accept `impl SessionDiagnostic` to `Handler`. - [x] _(optional)_ Rename trait `SessionDiagnostic` to `DiagnosticHandler`. - [x] _(optional)_ Rename macro `SessionDiagnostic` to `DiagnosticHandler`. - [x] Update Rustc Dev Guide and Docs to reflect these changes. https://github.com/rust-lang/rustc-dev-guide/pull/1460 Now I am having build issues getting the compiler to build when trying to rename the macro. <details> <summary>See diagnostics errors and context when building.</summary> ``` error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls --> compiler/rustc_attr/src/session_diagnostics.rs:13:10 | 13 | #[derive(DiagnosticHandler)] | ^^^^^^^^^^^^^^^^^ in this derive macro expansion | ::: /Users/jhonny/.cargo/registry/src/github.com-1ecc6299db9ec823/synstructure-0.12.6/src/macros.rs:94:9 | 94 | / pub fn $derives( 95 | | i: $crate::macros::TokenStream 96 | | ) -> $crate::macros::TokenStream { | |________________________________________- in this expansion of `#[derive(DiagnosticHandler)]` | note: the lint level is defined here --> compiler/rustc_attr/src/lib.rs:10:9 | 10 | #![deny(rustc::diagnostic_outside_of_impl)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` And also this one: ``` error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls --> compiler/rustc_attr/src/session_diagnostics.rs:213:32 | 213 | let mut diag = handler.struct_span_err_with_code( | ^^^^^^^^^^^^^^^^^^^^^^^^^ ``` > **Note** > Can't find where this message is coming from, because you can see in [this experimental branch](https://github.com/JhonnyBillM/rust/tree/experimental/trying-to-rename-session-diagnostic-macro) that I updated all errors and diags to say: > error: diagnostics should only be created in **`DiagnosticHandler`**/`AddSubdiagnostic` impls > and not: > error: diagnostics should only be created in **`SessionDiagnostic`**/`AddSubdiagnostic` impls </details> I tried building the compiler in different ways (playing with the stages etc), but nothing worked. ## Question **Do we need to build or do something different when renaming a macro and identifiers?** For context, see experimental commit https://github.com/JhonnyBillM/rust/commit/f2193a98b44db3f2af77a878824b152cdf0d34a5 where the macro and symbols are renamed, but it doesn't compile.
2022-09-21Auto merge of #102097 - Dylan-DPC:rollup-gc75oh4, r=Dylan-DPCbors-4/+179
Rollup of 7 pull requests Successful merges: - #89891 (`alloc`: add unstable cfg features `no_rc` and `no_sync`) - #101995 (Add another example for `uN::carrying_mul`) - #102031 (Adding ignore fuchsia tests for Backtrace, ErrorKind cases) - #102041 (Improve `-Zmeta-stats` some more) - #102045 (fix ConstProp handling of written_only_inside_own_block_locals) - #102058 (Clarify Path::extension() semantics in docs abstract) - #102059 (Use rebind instead of dummy binder in `SameTypeModuloInfer` relation) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-21Add missing space between notable trait tooltip and where clauseUrgau-1/+18
2022-09-21Adding ignore fuchsia tests for signal casesAndrew Pollack-0/+5