about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-04-05Rollup merge of #109956 - compiler-errors:tweak-debug-outputs, r=oli-obkYuki Okushi-42/+42
Tweak debug outputs to make debugging new solver easier 1. Move the fields that are "most important" (I know this is subjective) to the beginning of the structs. For goals, I typically care more about the predicate than the param-env (which is significantly longer in debug output). For canonicalized things, I typically care more about what is *being* canonicalized. For a canonical response, I typically care about the response -- or at least, it's typically useful to put it first since it's short and affects the whether the solver recurses or not... 2. Add some more debug and instrument calls to functions to add more structure to tracing lines. r? `@oli-obk` or `@BoxyUwU` (since I think `@lcnr` is on holiday)
2023-04-05Rollup merge of #109932 - GuillaumeGomez:source-code-scrollbar, r=notriddleYuki Okushi-0/+8
Source code scrollbar Fixes https://github.com/rust-lang/rust/issues/109865. You can test it [here](https://rustdoc.crud.net/imperio/source-code-scrollbar/src/test_docs/lib.rs.html). It seems to introduce a few regressions (at least change of behaviour) about the scroll "saving" though. r? `@notriddle`
2023-04-05Auto merge of #109843 - scottmcm:better-transmute, r=WaffleLapkinbors-54/+194
Allow `transmute`s to produce `OperandValue`s instead of needing `alloca`s LLVM can usually optimize these away, but especially for things like transmutes of newtypes it's silly to generate the `alloc`+`store`+`load` at all when it's actually a nop at LLVM level.
2023-04-05Tweak debug outputs to make debugging new solver easierMichael Goulet-42/+42
2023-04-04Allow `transmute`s to produce `OperandValue`s instead of always using `alloca`sScott McMurray-54/+194
LLVM can usually optimize these away, but especially for things like transmutes of newtypes it's silly to generate the `alloc`+`store`+`load` at all when it's actually a nop at LLVM level.
2023-04-04Auto merge of #109944 - cjgillot:lint-cstring-macro, r=Nilstriebbors-2/+25
Do not suppress temporary_cstring_as_ptr in macros. There isn't really a reason to skip the lint when part of the expression comes from an expansion. Fixes https://github.com/rust-lang/rust/issues/94694
2023-04-04Auto merge of #109808 - jyn514:debuginfo-options, r=michaelwoeristerbors-1/+82
Extend -Cdebuginfo with new options and named aliases This is a rebase of https://github.com/rust-lang/rust/pull/83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below. Note that the changes in this PR have already been through FCP: https://github.com/rust-lang/rust/pull/83947#issuecomment-878384979 Closes https://github.com/rust-lang/rust/pull/109311. Helps with https://github.com/rust-lang/rust/pull/104968. r? `@michaelwoerister` cc `@cuviper` --- The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options. Fix https://github.com/rust-lang/rust/issues/60020 Fix https://github.com/rust-lang/rust/issues/64405
2023-04-04Do not suppress temporary_cstring_as_ptr in macros.Camille GILLOT-2/+25
2023-04-04Rollup merge of #109940 - JohnTitor:issue-93911, r=compiler-errorsMichael Goulet-0/+18
Add regression test for #93911 r? `@compiler-errors` Closes #93911
2023-04-04Rollup merge of #109938 - oli-obk:try_norm, r=compiler-errorsMichael Goulet-0/+51
Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible fixes #109743 This hack didn't need to live in the mir interpreter. For const-prop-lint it is entirely correct to avoid doing any const prop if normalization fails at this stage. Most likely we couldn't const propagate anything anyway, and if revealing was needed (so opaque types were involved), we wouldn't want to be too smart and leak the hidden type anyway.
2023-04-04Rollup merge of #109937 - compiler-errors:rustdoc-rpit-cant-be-documented, ↵Michael Goulet-0/+15
r=GuillaumeGomez Don't collect return-position impl traits for documentation #104889 modified the rustdoc ast collection step to use a HIR visitor, which more thoroughly walks the HIR tree. that means that we're going to encounter inner items (incl return-position impl traits and async fn opaque futures) that are not possible to document. FIxes (but does not close due to being a beta regression) #109931 r? `@GuillaumeGomez`
2023-04-04Rollup merge of #109919 - fmease:rustdoc-fix-issue-109488, r=notriddleMichael Goulet-0/+18
rustdoc: escape GAT args in more cases Fixes #109488. Previously we printed the *un*escaped form of GAT arguments not only when `f.alternate()` was true but *also* when we failed to compute the URL of the trait associated with the type projection, i.e. when `href(…)` returned an `Err(_)`. In this PR the argument printing logic is entirely separate from the link resolution code above as it should be. Further, we now only try to compute the URL if the HTML format was requested with `!f.alternate()`. Before, we would sometimes compute the `href` only to throw it away later.
2023-04-04Rollup merge of #109914 - compiler-errors:rtn-bad-parens, r=oli-obkMichael Goulet-3/+62
Emit feature error for parenthesized generics in associated type bounds We don't actually do AST->HIR lowering with some `-Zunpretty` flags, so it's not correct to just delay a bug instead of emitting a feature error. Some diagnostics regressed because of the new errors, but oh well. :shrug: Fixes #109898
2023-04-04Rollup merge of #109838 - clubby789:non-exhaustive-span, r=NilstriebMichael Goulet-1/+23
Fix `non_exhaustive_omitted_patterns` lint span Fixes #109837 `DUMMY_SP` was being passed as the span in many cases where we have a span available to use. This meant that the location of the violating pattern wasn't shown, or the list of un-covered variants r? `@Nilstrieb`
2023-04-04Rollup merge of #109723 - oli-obk:ast_refactor, r=NilstriebMichael Goulet-43/+43
Pull some tuple variant fields out into their own struct This is groundwork for adding more fields to those new structs, but I believe the change to be useful on its own. r? `@Nilstrieb` but feel free to reroll for `compiler`
2023-04-05Add regression test for #93911Yuki Okushi-0/+18
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-04-04Rename `ast::Static` to `ast::StaticItem` to match `ast::ConstItem`Oli Scherer-43/+43
2023-04-04Add GUI test for scrollbar position on source code pageGuillaume Gomez-0/+8
2023-04-04Don't collect return-position impl traits for documentationMichael Goulet-0/+15
2023-04-04Move a const-prop-lint specific hack from mir interpret to const-prop-lint ↵Oli Scherer-0/+51
and make it fallible
2023-04-04Auto merge of #109891 - the8472:llvm-16-fixes-79308, r=nikicbors-11/+31
llvm 16 finally reconizes some additional vec in-place conversions as noops closes #79308 r? `@nikic`
2023-04-04Auto merge of #109599 - notriddle:notriddle/use-redundant-glob, r=petrochenkovbors-0/+121
diagnostics: account for glob shadowing when linting redundant imports Fixes #92904
2023-04-04rustdoc: escape GAT args in more casesLeón Orell Valerian Liehr-0/+18
2023-04-03Emit feature error for parenthesized generics in associated type boundsMichael Goulet-3/+62
2023-04-04Rollup merge of #109902 - Nilstrieb:107414test, r=compiler-errorsYuki Okushi-0/+24
Add async-await test for #107414 fixes #107414 r? `@cjgillot`
2023-04-04Rollup merge of #109896 - ↵Yuki Okushi-0/+10
Nilstrieb:integers-are-not-fn-ptrs-remember-this-dear-transmuter, r=compiler-errors Never consider int and float vars for `FnPtr` candidates This solves a regression where `0.0.cmp()` was ambiguous when a custom trait with a `cmp` method was in scope. For integers it shouldn't be a problem in practice so I wasn't able to add a test. I'm not sure whether there could be more issues hidden in the shadows as mentioned in the issue, but this should at least fix the problematic regression immediately. fixes #109892 r? oli-obk
2023-04-03Add testNilstrieb-0/+24
2023-04-03Never consider int and float vars for `FnPtr` candidatesNilstrieb-0/+10
This solves a regression where `0.0.cmp()` was ambiguous when a custom trait with a `cmp` method was in scope. FOr integers it shouldn't be a problem in practice so I wasn't able to add a test.
2023-04-03llvm 16 finally reconizes some additional vec in-place conversions as noopsThe 8472-11/+31
2023-04-03Rollup merge of #109873 - jyn514:subdirectories, r=compiler-errorsMatthias Krüger-0/+0
Move some UI tests into subdirectories
2023-04-03Rollup merge of #109856 - bvanjoi:fix-issue-109304, r=compiler-errorsMatthias Krüger-76/+5
fix(middle): emit error rather than delay bug when reaching limit close #109304
2023-04-03fix(middle): emit error rather than delay bug when reaching limitbohan-76/+5
2023-04-03Auto merge of #109770 - jyn514:run-make-fulldeps, r=Mark-Simulacrumbors-95/+226
Move almost all run-make-fulldeps tests to run-make They pass fine, and this avoids having to build the compiler twice. There are few enough tests left that I think it should be possible to get rid of this test suite altogether, but I expect this PR to fail at least a few times in bors and want to get it merged before tackling further changes. cc https://github.com/rust-lang/rust/pull/83775 Fixes https://github.com/rust-lang/rust/issues/66085. Fixes https://github.com/rust-lang/rust/issues/83773.
2023-04-02Move some UI tests into subdirectoriesjyn-0/+0
to avoid going over the existing limit now that the ui-fulldeps tests have been moved to ui.
2023-04-02try to fix test-variousjyn-1/+4
2023-04-02Fix `non_exhaustive_omitted_patterns` lint spanclubby789-1/+23
2023-04-02Auto merge of #109008 - clubby789:drop-elaborate-array, r=davidtwcobors-0/+16
Drop array patterns using subslices Fixes #109004 Drops contiguous subslices of an array when moving elements out with a pattern, which improves perf for large arrays r? `@compiler-errors`
2023-04-01Fix `non_exhaustive_omitted_patterns` on argumentsclubby789-1/+32
2023-04-01diagnostics: account for glob shadowing when linting redundant importsMichael Howell-0/+121
Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2023-04-01Auto merge of #109801 - aliemjay:test-implied-normalization, r=petrochenkovbors-0/+57
add test for normalization in implied bounds query See https://github.com/rust-lang/rust/issues/109799.
2023-03-31Auto merge of #109165 - aliemjay:fix-ice-annotation, r=davidtwcobors-0/+40
allow ReError in CanonicalUserTypeAnnotation Why not? we already allow `TyKind::Error`. Fixes #109072.
2023-03-31Auto merge of #109824 - GuillaumeGomez:rollup-i5r4uts, r=GuillaumeGomezbors-113/+607
Rollup of 7 pull requests Successful merges: - #109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2) - #109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`) - #109680 (Fix subslice capture in closure) - #109798 (fluent_messages macro: don't emit the OS error in a note) - #109805 (Source map cleanups) - #109818 (rustdoc: Add GUI test for jump to collapsed item) - #109820 (rustdoc-search: update docs for comma in `?` help popover) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-31Rollup merge of #109818 - GuillaumeGomez:test-collapsed-item, r=notriddleGuillaume Gomez-0/+21
rustdoc: Add GUI test for jump to collapsed item Part of https://github.com/rust-lang/rust/issues/66181. I updated `browser-ui-test` version because I needed to add a new command `property`: https://github.com/GuillaumeGomez/browser-UI-test/pull/452. r? `@notriddle`
2023-03-31Rollup merge of #109798 - est31:ftl_test_note, r=davidtwcoGuillaume Gomez-10/+6
fluent_messages macro: don't emit the OS error in a note This makes it possible to make the normalization of the error message precise, allowing us to not normalize all notes away. See https://github.com/rust-lang/rust/pull/109700#discussion_r1152489053
2023-03-31Rollup merge of #109680 - clubby789:array-subslice-2229, r=davidtwcoGuillaume Gomez-0/+39
Fix subslice capture in closure Fixes #109298 by refining captures in the same way for Subslices and Indexes. The comment `// we never capture this` seems to have been inaccurate, as changing it to an assert causes many test failures `@rustbot` label +A-closures
2023-03-31Rollup merge of #109443 - GuillaumeGomez:doc-primitive-hard-error, r=notriddleGuillaume Gomez-56/+81
Move `doc(primitive)` future incompat warning to `invalid_doc_attributes` Fixes #88070. It's been a while since this was turned into a "future incompatible lint" so I think we can now turn it into a hard error without problem. r? `@jyn514`
2023-03-31Rollup merge of #109104 - ↵Guillaume Gomez-47/+460
GuillaumeGomez:fix-invalid-suggestion-ambiguous-intra-doc2, r=oli-obk,notriddle rustdoc: Fix invalid suggestions on ambiguous intra doc links v2 Fixes https://github.com/rust-lang/rust/issues/108653. This is another approach to fixing the same issue. This time, we keep the computed information around instead of re-computing it. Strangely enough, the order for ambiguities seem to have been changed. Not an issue but it creates a lot of diff... So which version do you prefer? r? `@notriddle`
2023-03-31Auto merge of #109010 - compiler-errors:rtn, r=eholkbors-0/+311
Initial support for return type notation (RTN) See: https://smallcultfollowing.com/babysteps/blog/2023/02/13/return-type-notation-send-bounds-part-2/ 1. Only supports `T: Trait<method(): Send>` style bounds, not `<T as Trait>::method(): Send`. Checking validity and injecting an implicit binder for all of the late-bound method generics is harder to do for the latter. * I'd add this in a follow-up. 3. ~Doesn't support RTN in general type position, i.e. no `let x: <T as Trait>::method() = ...`~ * I don't think we actually want this. 5. Doesn't add syntax for "eliding" the function args -- i.e. for now, we write `method(): Send` instead of `method(..): Send`. * May be a hazard if we try to add it in the future. I'll probably add it in a follow-up later, with a structured suggestion to change `method()` to `method(..)` once we add it. 7. ~I'm not in love with the feature gate name 😺~ * I renamed it to `return_type_notation` :heavy_check_mark: Follow-up PRs will probably add support for `where T::method(): Send` bounds. I'm not sure if we ever want to support return-type-notation in arbitrary type positions. I may also make the bounds require `..` in the args list later. r? `@ghost`
2023-03-31allow ReError in CanonicalUserTypeAnnotationAli MJ Al-Nasrawy-0/+40
2023-03-31Add tests to check that collapsed content is expanded when jumping to itGuillaume Gomez-0/+21