summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-01-05Remove portable_simdMark Rousskov-86/+0
Stand-in for a backport of "Sync portable-simd to remove autosplats #91484".
2022-01-05Add test with `#[rustc_evaluate_where_clauses]`Wesley Wiser-1/+152
As suggested via reviewer feedback.
2022-01-05Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICEWesley Wiser-0/+117
Adds the minimial repro test case from #85360. The fix for #85360 was supposed to be #85868 however the repro was resolved in the 2021-07-05 nightly while #85360 didn't land until 2021-09-03. The reason for that is d34a3a401b4e44f289a4d5bf53da83367cbb6aa7 **also** resolves that issue. To test if #85868 actually fixes #85360, I reverted d34a3a401b4e44f289a4d5bf53da83367cbb6aa7 and found that #85868 does indeed resolve #85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to @lqd for helping track this down!
2022-01-05Make rustdoc headings black, and markdown blueJacob Hoffman-Andrews-3/+12
2022-01-05Fix HashStable implementation on InferTyMichael Goulet-0/+17
2021-11-29Don't treat unnormalized function arguments as well-formedjackh726-30/+49
2021-11-26Rollup merge of #91259 - jyn514:doctest-warnings, r=GuillaumeGomezMatthias Krüger-7/+47
Remove `--display-doctest-warnings` `--display-doctest-warnings` can be replicated in full with other existing features, there's no need to have a separate option for it. This removes the option and documents the combination of other features to replicate it. This also fixes a bug where `--test-args=--show-output` had no effect. cc `@ollie27,` https://github.com/rust-lang/rust/pull/73314#issuecomment-668317262 Fixes https://github.com/rust-lang/rust/issues/41574 r? `@GuillaumeGomez`
2021-11-26Rollup merge of #91223 - GuillaumeGomez:headings-indent, r=jshaMatthias Krüger-1/+47
Fix headings indent Fixes #91200. Screenshots with the fix: ![Screenshot from 2021-11-25 15-32-35](https://user-images.githubusercontent.com/3050060/143462481-f7e9ea13-72d5-46fe-90e0-9527e74599e3.png) ![Screenshot from 2021-11-25 15-32-49](https://user-images.githubusercontent.com/3050060/143462485-c010716a-0276-421b-a777-afff19c81c96.png) If the first element of a top docblock is a heading, we still need to keep the indent, but only on this one (I added a test to check it). We need it because otherwise the anchor will go over the `[-]` toggle. cc `@camelid` r? `@jsha`
2021-11-26Rollup merge of #90611 - fee1-dead:rustdoc-ice-fix, r=jyn514,willcrichtonMatthias Krüger-0/+4
Fix another ICE in rustdoc scrape_examples This has occurred to me when documenting a crate with the arguments. Not sure what could have caused it. r? `@willcrichton`
2021-11-26Remove `--display-doctest-warnings`Joshua Nelson-7/+47
This can be replicated in full with other existing features, there's no need to have a separate option for it. This also fixes a bug where `--test-args=--show-output` had no effect, and updates the documentation.
2021-11-26Update test for anchors and headings positionGuillaume Gomez-1/+47
2021-11-27Reduce the ICEDeadbeef-469/+1
2021-11-26Auto merge of #91253 - matthiaskrgr:rollup-dnlcjmr, r=matthiaskrgrbors-0/+27
Rollup of 4 pull requests Successful merges: - #91169 (Change cg_ssa's get_param to borrow the builder mutably) - #91176 (If the thread does not get the lock in the short term, yield the CPU) - #91212 (Fix ICE due to out-of-bounds statement index when reporting borrowck error) - #91225 (Fix invalid scrollbar display on source code page) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-11-27Add ICE testDeadbeef-0/+472
2021-11-26Rollup merge of #91212 - compiler-errors:issue91206, r=oli-obkMatthias Krüger-0/+27
Fix ICE due to out-of-bounds statement index when reporting borrowck error Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list). Fixes #91206 Cc ``@camsteffen`` r? ``@oli-obk``
2021-11-26Auto merge of #91164 - Badel2:usefulness-stack-overflow, r=davidtwcobors-0/+14
Fix stack overflow in `usefulness.rs` Fix #88747 Applied the suggestion from `@nbdd0121,` not sure if this has any drawbacks. The first call to `ensure_sufficient_stack` is not needed to fix the test case, but I added it to be safe.
2021-11-26Auto merge of #91205 - Aaron1011:visit_param_env, r=lcnrbors-16/+24
Visit `param_env` field in Obligation's `TypeFoldable` impl This oversight appears to have gone unnoticed for a long time without causing issues, but it should still be fixed.
2021-11-26Auto merge of #91181 - GuillaumeGomez:improve-rustdoc-gui-ci, r=jshabors-1/+4
Improve rustdoc-gui CI As commented [here](https://github.com/rust-lang/rust/pull/91179#discussion_r756023009): When the text isn't displayed, the color returned by puppeteer is always `rgba(0,0,0,0)`, which is definitely not the right value. To prevent this error from happening again, `browser-ui-test` will now fail if a CSS color check is run when the text isn't displayed. Either this PR or #91179 is merged first, they'll conflict because I made changes to the same test file. cc `@jyn514` r? `@jsha`
2021-11-26Auto merge of #85102 - estebank:point-at-assignment, r=oli-obkbors-95/+124
Diagnostic tweaks * On type mismatch caused by assignment, point at the source of the expectation * Hide redundant errors * Suggest `while let` when `let` is missing in some cases
2021-11-25Auto merge of #91037 - c410-f3r:testsssssss, r=petrochenkovbors-0/+0
Move some tests to more reasonable directories - 10 cc #73494 r? `@petrochenkov`
2021-11-25Visit `param_env` field in Obligation's `TypeFoldable` implAaron Hill-16/+24
This oversight appears to have gone unnoticed for a long time without causing issues, but it should still be fixed.
2021-11-25Account for type obligation coming from `const` and `static`Esteban Kuber-3/+4
2021-11-25On type mismatch caused by assignment, point at assigneeEsteban Küber-96/+124
* Do not emit unnecessary E0308 after E0070 * Show fewer errors on `while let` missing `let` * Hide redundant E0308 on `while let` missing `let` * Point at binding definition when possible on invalid assignment * do not point at closure twice * do not suggest `if let` for literals in lhs * account for parameter types
2021-11-25Add test demonstrating no more ICEMichael Goulet-0/+27
2021-11-25Rollup merge of #91185 - camelid:rm-force-overflow-checks, r=wesleywiserMatthias Krüger-3/+3
Remove `-Z force-overflow-checks` It was replaced several years ago by the stable option `-C overflow-checks`. The goal was to delete the `-Z` flag once users had migrated [1]. Now that it's been several years, it makes sense to delete the old flag. See also the discussion on Zulip [2]. [1]: https://github.com/rust-lang/rust/issues/33134#issuecomment-280484097 [2]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/overflow.20checks/near/262497224 r? ```@wesleywiser``` cc ```@RalfJung```
2021-11-25Rollup merge of #91111 - cjgillot:hir-no-lower-attrs, r=michaelwoeristerMatthias Krüger-19/+60
Do not visit attributes in `ItemLowerer`. By default, AST visitors visit expressions that appear in key-value attributes. Those expressions should not be lowered to HIR, as they do not correspond to actually compiled code. Since an attribute cannot produce meaningful HIR, just skip them altogether. Fixes https://github.com/rust-lang/rust/issues/81886 Fixes https://github.com/rust-lang/rust/issues/90873 r? `@michaelwoerister`
2021-11-25Rollup merge of #91096 - compiler-errors:elaborate_opaque_trait, r=estebankMatthias Krüger-72/+72
Print associated types on opaque `impl Trait` types This PR generalizes #91021, printing associated types for all opaque `impl Trait` types instead of just special-casing for future. before: ``` error[E0271]: type mismatch resolving `<impl Iterator as Iterator>::Item == u32` ``` after: ``` error[E0271]: type mismatch resolving `<impl Iterator<Item = usize> as Iterator>::Item == u32` ``` --- Questions: 1. I'm kinda lost in binders hell with this one. Is all of the `rebind`ing necessary? 2. Is there a map collection type that will give me a stable iteration order? Doesn't seem like TraitRef is Ord, so I can't just sort later.. 3. I removed the logic that suppresses printing generator projection types. It creates outputs like this [gist](https://gist.github.com/compiler-errors/d6f12fb30079feb1ad1d5f1ab39a3a8d). Should I put that back? 4. I also added spaces between traits, `impl A+B` -> `impl A + B`. I quite like this change, but is there a good reason to keep it like that? r? ````@estebank````
2021-11-25Rollup merge of #89359 - fee1-dead:const-it, r=oli-obkMatthias Krüger-0/+71
Various fixes for const_trait_impl A few problems I found while making `Iterator` easier to const-implement. 1. More generous `~const Drop` check. We check for nested fields with caller bounds. For example, an ADT type with fields of types `A`, `B`, `C`, check if all of them are either: - Bounded (`A: ~const Drop`, `B: Copy`) - Known to be able to destruct at compile time (`C = i32`, `struct C(i32)`, `C = some_fn`) 2. Don't treat trait functions marked with `#[default_method_body_is_const]` as stable const fns when checking `const_for` and `const_try` feature gates. I think anyone can review this, so no r? this time.
2021-11-25Improve testsGuillaume Gomez-1/+4
2021-11-25Move some tests to more reasonable directoriesCaio-0/+0
2021-11-25Auto merge of #88781 - estebank:emoji-idents, r=oli-obkbors-0/+99
Tokenize emoji as if they were valid identifiers In the lexer, consider emojis to be valid identifiers and reject them later to avoid knock down parse errors. Partially address #86102.
2021-11-25Auto merge of #85346 - estebank:issue-84946, r=nagisa,varkorbors-0/+62
Account for incorrect `impl Foo<const N: ty> {}` syntax Fix #84946
2021-11-25Do not visit attributes in `LateResolutionVisitor`.Camille GILLOT-22/+28
2021-11-24Auto merge of #91203 - GuillaumeGomez:rollup-kwtqvb1, r=GuillaumeGomezbors-43/+106
Rollup of 7 pull requests Successful merges: - #89542 (Partially stabilize `duration_consts_2`) - #90044 (Restrict aarch64 outline atomics to glibc for now.) - #90420 (Create rustdoc_internals feature gate) - #91075 (Reduce prominence of item-infos) - #91151 (Fix test in std::process on android) - #91179 (Fix more <a> color) - #91199 (rustdoc: Add test for mixing doc comments and attrs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-11-24Tweak span and add more testsEsteban Kuber-4/+38
2021-11-24Rollup merge of #91199 - camelid:test-mixing-docs, r=GuillaumeGomezGuillaume Gomez-0/+26
rustdoc: Add test for mixing doc comments and attrs This is a step toward adding more test coverage to make it easier to remove the distinction between collapsed and uncollapsed doc values.
2021-11-24Rollup merge of #91179 - GuillaumeGomez:a-color, r=jshaGuillaume Gomez-8/+29
Fix more <a> color Fixes #91175. Another bug I saw is: ![Screenshot from 2021-11-24 11-41-27](https://user-images.githubusercontent.com/3050060/143239845-f173cfeb-8f5c-4215-a5af-b71d4e1bcd84.png) I fixed it as well. r? ``@jsha``
2021-11-24Rollup merge of #91075 - jsha:chill-item-info, r=GuillaumeGomezGuillaume Gomez-9/+2
Reduce prominence of item-infos Fixes #59853 - Remove border. - Reduce size of emoji slightly. - Remove details disclosure for unstable reason. This was inconsistent with our other details disclosures, and the detail revealed was usually better explained by clicking on the issue link. Demo: https://rustdoc.crud.net/jsha/chill-item-info/std/mem/union.MaybeUninit.html#method.slice_assume_init_ref Compare vs: https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.slice_assume_init_ref <img src="https://user-images.githubusercontent.com/220205/142717815-09828c9e-6ff4-445a-8ccc-31e028fd4985.png" width=700>
2021-11-24Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelidGuillaume Gomez-26/+49
Create rustdoc_internals feature gate As suggested by ``@camelid`` [here](https://github.com/rust-lang/rust/pull/90398#issuecomment-955093851), since `doc_keyword` and `doc_primitive` aren't meant to be stabilized, we could put them behind a same feature flag. This is pretty much what it would look like (needs to update the tests too). The tracking issue is https://github.com/rust-lang/rust/issues/90418. What do you think ``@rust-lang/rustdoc`` ?
2021-11-24rustdoc: Add test for mixing doc comments and attrsNoah Lev-0/+26
This is a step toward adding more test coverage to make it easier to remove the distinction between collapsed and uncollapsed doc values.
2021-11-24Add test for merged featuresGuillaume Gomez-0/+24
2021-11-24Update error message for doc(keyword)Guillaume Gomez-2/+2
2021-11-24Add feature gate test for "rustdoc_internal" featureGuillaume Gomez-1/+18
2021-11-24Create rustdoc_internals feature gateGuillaume Gomez-25/+7
2021-11-24Account for incorrect `impl Foo<const N: ty> {}` syntaxEsteban Küber-0/+28
Fix #84946
2021-11-24Fix clicking on anchors inside summary tags.Jacob Hoffman-Andrews-0/+4
2021-11-24Remove `-Z force-overflow-checks`Noah Lev-3/+3
It was replaced several years ago by the stable option `-C overflow-checks`. The goal was to delete the `-Z` flag once users had migrated [1]. Now that it's been several years, it makes sense to delete the old flag. See also the discussion on Zulip [2]. [1]: https://github.com/rust-lang/rust/issues/33134#issuecomment-280484097 [2]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/overflow.20checks/near/262497224
2021-11-24Update GUI tests for <a> colorGuillaume Gomez-8/+29
2021-11-24Auto merge of #91171 - jsha:fix-rustdoc-gui-test, r=GuillaumeGomezbors-1/+1
Fix toggle-click-deadspace rustdoc-gui test In #91103 I introduced a rustdoc-gui test for clicks on toggles. I introduced some documentation on a method in lib2/struct.Foo.html so there would be something to toggle, but accidentally left the test checking test_docs/struct.Foo.html. That caused the test to reliably fail. I'm not sure how that test got past GitHub Actions and bors, but it's manifesting in test failures at https://github.com/rust-lang/rust/pull/91062#issuecomment-977589705 and https://github.com/rust-lang/rust/pull/91170#issuecomment-977636159. This fixes by pointing at the right file. r? `@GuillaumeGomez`
2021-11-24Fix toggle-click-deadspace rustdoc-gui testJacob Hoffman-Andrews-1/+1