about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-08-13Do not inline non-simple argument type errors into labelsMichael Goulet-13/+64
2022-08-13Label argument coercion errorsMichael Goulet-3/+6
2022-08-13Ban references to `Self` in trait object substs for projection predicates too.Camille GILLOT-1/+8
2022-08-13use `span_suggestion` instead of `span_suggestion_verbose`Takayuki Maeda-7/+4
2022-08-13rustdoc: Fix incorrect usage of `@!has` and `@!matches`Noah Lev-22/+24
`@!has` (and `@!matches`) with two arguments used to treat the second argument as a literal string of HTML code. Now, that feature has been renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has` version is an error. These uses thought the second argument was being treated as an XPath, as with the arity-3 version, but in fact was being treated as literal HTML. Because these were checking for the *absence* of the string, the tests silently did nothing -- an XPath string won't ever be showing up in the test's generated HTML!
2022-08-13Update `@!has` name in testsNoah Lev-127/+127
2022-08-13give a helpful diagnostic even when the next struct field has an attributeyukang-0/+44
2022-08-13Rename `@hastext` to `@hasraw` (same for `matches`)Noah Lev-168/+168
I think `@hasraw` is slightly clearer than `@hastext` since it is actually matching against the raw HTML, not the text nodes.
2022-08-13Update tests: arity-2 `@{has,matches}` -> `...text`Noah Lev-168/+168
2022-08-13`assert_{inhabited,zero_valid,uninit_valid}` intrinsics are safeTomasz Miąsko-6/+6
Those intrinsics either panic or do nothing. They are safe.
2022-08-12rustdoc-json: Use `@ismany` in testsNixon Enraght-Moony-36/+56
2022-08-12Change fluent_messages macro to expect _ slugs instead of - slugsest31-1/+38
For the most part, the macro actually worked with _ slugs, but the prefix_something -> prefix::something conversion was not implemented. We don't want to accept - slugs for consistency reasons. We thus error if a name is found with - inside. This ensures a consistent style.
2022-08-12Fix testsest31-7/+7
2022-08-12Adjust span of fn argumentsMichael Goulet-20/+14
2022-08-12Adjust span of closure paramMichael Goulet-1/+1
2022-08-12And for closuresMichael Goulet-3/+3
2022-08-12Point out a single arg if we have a single arg incompatibilityMichael Goulet-39/+104
2022-08-12[debuginfo] Update src/test/debuginfo/mutex.rs for new cpp-like enum ↵Michael Woerister-5/+7
debuginfo encoding.
2022-08-12enum variant ctor inherits stability of variantMichael Goulet-0/+16
2022-08-12Rollup merge of #100443 - est31:let_else_regression_tests, r=Mark-SimulacrumDylan DPC-0/+62
Add two let else regression tests Adds a regression test for #94176, as it was fixed by #98574 but doesn't have a regression test. The PR also incorporates a commit from #94012 which added a test for an issue discovered in that PR. Originally they have been part of #99291, but I've moved them out in the hopes of getting them merged more quickly, as that PR is already open since a month, and so that #99291 can focus on the drop order part of things. Closes #94176 Closes #96961 -- dupe of #94176
2022-08-12Rollup merge of #100409 - jsha:highlight-lighter, r=GuillaumeGomezDylan DPC-4/+1
rustdoc: don't generate DOM element for operator In our source page highlighting, we were generating `<span class="op">` tags for all "operators", including e.g. `<` `>` around generic parameters, `*`, `&`. This contributed significantly to DOM size, but we don't actually style `.op` except in the ayu theme. Remove the styles for `.op` in ayu, and stop generating the `<span>`s. This reduces DOM size of an example page[1] from 265,938 HTML elements to 242,165 elements, a 9% reduction. r? ``@GuillaumeGomez`` Demo: (warning - slow!) https://rustdoc.crud.net/jsha/highlight-lighter/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html [1]: https://doc.rust-lang.org/nightly/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html
2022-08-12Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkovDylan DPC-0/+14
Suggest const and static for global variable Fixing #100394
2022-08-12Rollup merge of #100366 - davidtwco:translation-never-fail, r=compiler-errorsDylan DPC-6/+25
errors: don't fail on broken primary translations If a primary bundle doesn't contain a message then the fallback bundle is used. However, if the primary bundle's message is broken (e.g. it refers to a interpolated variable that the compiler isn't providing) then this would just result in a compiler panic. While there aren't any primary bundles right now, this is the type of issue that could come up once translation is further along. r? ```@compiler-errors``` (since this comes out of a in-person discussion we had at RustConf)
2022-08-12Rollup merge of #100247 - cjgillot:verify-dyn-trait-alias-defaults, r=lcnrDylan DPC-53/+101
Generalize trait object generic param check to aliases. The current algorithm only checks that `Self` does not appear in defaults for traits. This is not sufficient for trait aliases. This PR moves the check to trait object elaboration, which sees through trait aliases. Fixes https://github.com/rust-lang/rust/issues/82927. Fixes https://github.com/rust-lang/rust/issues/84789.
2022-08-12Rollup merge of #100229 - RalfJung:extra-const-ub-checks, r=lcnrDylan DPC-0/+117
add -Zextra-const-ub-checks to enable more UB checking in const-eval Cc https://github.com/rust-lang/rust/issues/99923 r? `@oli-obk`
2022-08-12[debuginfo] Update codegen tests for new cpp-like enum debuginfo encoding.Michael Woerister-9/+12
2022-08-12make some const prop tests unit-testNilstrieb-38/+60
2022-08-12improve "try ignoring the field" diagnosticGoldstein-0/+56
Closes #95795
2022-08-12suggest removing a semicolon after impl/trait itemsTakayuki Maeda-0/+32
2022-08-12adapt test for msan message changeKrasimir Georgiev-1/+1
LLVM commit https://github.com/llvm/llvm-project/commit/057cabd997aeaef136e1e14f2ee645bd5bb197dd removed the function from the msan error message. This adapts our test accordingly. Found via our experimental rust + llvm @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12634#018289fe-b0bc-4bab-89b3-fb1d4e38f6db
2022-08-12[debuginfo] Add more test cases cpp-like enum debuginfo.Michael Woerister-4/+39
2022-08-12Support wrapping 128-bit tag ranges for cpp-like enum debuginfo.Michael Woerister-0/+32
2022-08-12Use enum2<_> instead of enum<_> for Cpp-like debuginfo enum type names.Michael Woerister-63/+62
And add more comments about niche tag enum encoding.
2022-08-12debuginfo: Change C++-like encoding for enums.Michael Woerister-50/+119
The updated encoding should be able to handle niche layouts where more than one variant has fields.
2022-08-12Add regression test for #94176est31-0/+29
2022-08-12let-else: add a test for warnings on let-else with diverging tailCormac Relf-0/+33
2022-08-11Add missing visit_pat_field in early lint visitor.Eric Huss-6/+27
This ensures that lint attributes on pattern fields can control early lints.
2022-08-11Make Node::ExprField a child of Node::Expr.Eric Huss-76/+76
This was incorrectly inserting the ExprField as a sibling of the struct expression. This required adjusting various parts which were looking at parent node of a field expression to find the struct.
2022-08-11Add visitors for PatField and ExprField.Eric Huss-1/+1
This helps simplify the code. It also fixes it to use the correct parent when lowering. One consequence is the `non_snake_case` lint needed to change the way it looked for parent nodes in a struct pattern. This also includes a small fix to use the correct `Target` for expression field attribute validation.
2022-08-11Honor lint level attributes in more places.Eric Huss-0/+1266
This extends the LintLevelBuilder to handle lint level attributes on struct expression fields and pattern fields. This also updates the early lints to honor lint levels on generic parameters.
2022-08-11Check attributes on struct expression fields.Eric Huss-2/+8
Attributes on struct expression fields were not being checked for validity. This adds the fields as HIR nodes so that `CheckAttrVisitor` can visit those nodes to check their attributes.
2022-08-11Check attributes on pattern fields.Eric Huss-1/+13
Attributes on pattern struct fields were not being checked for validity. This adds the fields as HIR nodes so that the `CheckAttrVisitor` can visit those nodes to check their attributes.
2022-08-12Erase regions better in promote_candidateMichael Goulet-0/+25
2022-08-12Auto merge of #99464 - nikic:llvm-15, r=cuviperbors-1/+1
Update to LLVM 15 For preliminary testing. Some LLVM 15 compatibility fixes were applied separately in #99512. Release timeline: * LLVM 15 branched on Jul 26. * The final LLVM 15.0.0 release is scheduled for Sep 6. * Current nightly (1.65.0) is scheduled for Nov 3. Changes in this PR (apart from the LLVM update): * Pass `--set llvm.allow-old-toolchain` for many Docker images. LLVM 16 will require GCC >= 7.1, while LLVM 15 still allows older compilers with an option. Specify the option for builders still using GCC 5.4. #95026 updated some of the used toolchains, but not all. * Use the `+atomics-32` target feature for thumbv6m. * Explicitly link libatomic when cross-compiling LLVM to 32-bit target. * Explicitly disable zstd support, to avoid libzstd.so dependency. New LLVM patches ([commits](https://github.com/rust-lang/llvm-project/commits/rustc/15.0-2022-08-09)): * [rust-only] Fix ICE with GCC 5.4 (https://github.com/nikic/llvm-project/commit/15be58d7f0342b1da5af219bac8bd71d01da6dff) * [rust-only] Fix build with GCC 5.4 (https://github.com/nikic/llvm-project/commit/774edc10fa45229c2aa678f1bef8b4812dc0f76a) * ~~[rust-only] Fix build with GCC 5.2 (https://github.com/nikic/llvm-project/commit/1a6069a7bb35ace1e40d566035cbf7ed2fa3b1f7)~~ * ~~[rust-only] Fix ICE with GCC 5.2 (https://github.com/nikic/llvm-project/commit/493081f2909206e0ed55af68a4058a76c0ad7a64)~~ * ~~[rust-only] Fix build with GCC 5.2 (https://github.com/nikic/llvm-project/commit/0fc5979d738c3a1f9510fe2d62417f7d2af37817)~~ * [backported] Addition of `+atomics` target feature (https://github.com/llvm/llvm-project/commit/57bdd9892d0eba5bdd25fc44799235be7b9f5153). * [backported] Revert compiler-rt change that broke powerpc (https://github.com/llvm/llvm-project/commit/9c68b43915fc1c9c0a07e935163ae8d638d7241b) * [awaiting backport] Fix RelLookupTableConverter on gnux32 (https://github.com/nikic/llvm-project/commit/639388a05f25772fb23eea5b1045e7df83bcfaa7 / https://github.com/llvm/llvm-project/issues/57021) Tested images: dist-x86_64-linux, armhf-gnu, arm-android, dist-s390x-linux, dist-x86_64-illumos, dist-x86_64-freebsd, wasm32, dist-x86_64-musl, dist-various-1, dist-riscv64-linux, dist-mips-linux, dist-mipsel-linux, dist-powerpc-linux, dist-aarch64-linux, dist-x86_64-apple, x86_64-msvc-1, x86_64-msvc-2, dist-various-2, dist-arm-linux Tested up to the usual ipv6 error: test-various, i686-gnu, x86_64-gnu-nopt r? `@ghost`
2022-08-12Fix HIR pretty printing of let elseMichael Goulet-0/+28
2022-08-11rustdoc: don't generate DOM element for operatorJacob Hoffman-Andrews-4/+1
In our source page highlighting, we were generating `<span class="op">` tags for all "operators", including e.g. `<` `>` around generic parameters, `*`, `&`. This contributed significantly to DOM size, but we don't actually style `.op` except in the ayu theme. Remove the styles for `.op` in ayu, and stop generating the `<span>`s. This reduces DOM size of an example page[1] from 265,938 HTML elements to 242,165 elements, a 9% reduction. [1]: https://doc.rust-lang.org/nightly/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html
2022-08-11Add support for generating unique *.profraw files by default when using the ↵ridwanabdillahi-0/+17
`-C instrument-coverage` flag. Respond to PR comments.
2022-08-11Suggest path separator when a dot is used on a traitLeón Orell Valerian Liehr-37/+357
2022-08-11Rollup merge of #100374 - ↵Matthias Krüger-26/+18
GuillaumeGomez:improve_rustdoc_search_results_page_crates_selection, r=notriddle Improve crate selection on rustdoc search results page Take over of #98855 (screenshots and explanations are there). You can test it [here](https://rustdoc.crud.net/imperio/improve_rustdoc_search_results_page_crates_selection/std/index.html?search=test). cc ``@steffahn`` ``@jsha`` r? ``@notriddle``
2022-08-11Rollup merge of #100350 - jhpratt:stringify-vis, r=cjgillotMatthias Krüger-2/+3
Stringify non-shorthand visibility correctly This makes `stringify!(pub(in crate))` evaluate to `pub(in crate)` rather than `pub(crate)`, matching the behavior before the `crate` shorthand was removed. Further, this changes `stringify!(pub(in super))` to evaluate to `pub(in super)` rather than the current `pub(super)`. If the latter is not desired (it is _technically_ breaking), it can be undone. Fixes #99981 `@rustbot` label +C-bug +regression-from-stable-to-beta +T-compiler