about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-10-10Rollup merge of #102862 - scottmcm:more-alignment-traits, r=thomccYuki Okushi-1/+1
From<Alignment> for usize & NonZeroUsize Since you mentioned these two in https://github.com/rust-lang/rust/pull/102072#issuecomment-1272390033, r? ``@thomcc`` Tracking Issue: https://github.com/rust-lang/rust/issues/102070
2022-10-10Rollup merge of #102845 - cjgillot:gat-object, r=fee1-deadYuki Okushi-0/+58
Elaborate trait ref to compute object safety. instead of building them manually from supertraits and associated items. This allows to have the correct substs for GATs. Fixes https://github.com/rust-lang/rust/issues/102751
2022-10-10Rollup merge of #102345 - chenyukang:fix-102182-impl-trait, r=estebankYuki Okushi-0/+17
Recover from impl Trait in type param bound Fixes #102182 r? ``@estebank``
2022-10-10Rollup merge of #102323 - Stoozy:master, r=cjgillotYuki Okushi-2/+10
Trying to suggest additional lifetime parameter ``@cjgillot`` This is what I have so far for #100615
2022-10-10Rollup merge of #102275 - Urgau:stabilize-half_open_range_patterns, r=cjgillotYuki Okushi-374/+279
Stabilize `half_open_range_patterns` This PR stabilize `feature(half_open_range_patterns)`: ``` Allows using `..=X` as a pattern. ``` And adds a new `feature(half_open_range_patterns_in_slices)` for the slice part, https://github.com/rust-lang/rust/pull/102275#issuecomment-1267422806. The FCP was completed in https://github.com/rust-lang/rust/issues/67264.
2022-10-09From<Alignment> for usize & NonZeroUsizeScott McMurray-1/+1
2022-10-09Add a regression test for #39137Ben Kimock-0/+20
2022-10-09Skip chained OpaqueCast when building captures.Camille GILLOT-0/+17
2022-10-10Rollup merge of #102831 - compiler-errors:rustdoc-norm-oops, r=jyn514Yuki Okushi-0/+13
Don't use unnormalized type in `Ty::fn_sig` call in rustdoc `clean_middle_ty` Self-explanatory Fixes #102828
2022-10-09Elaborate trait ref to compute object safety.Camille GILLOT-0/+58
2022-10-09fixup lint nameMaybe Waffle-2/+2
2022-10-09allow or avoid for loops over option in compiler and testsMaybe Waffle-7/+8
2022-10-09`for_loop_over_fallibles`: fix suggestion for "remove `.next()`" caseMaybe Waffle-3/+2
if the iterator is used after the loop, we need to use `.by_ref()`
2022-10-09Add a test for the `for_loop_over_fallibles` lintMaybe Waffle-0/+145
2022-10-09Add a test for C-style repr128 enum DWARF debuginfobeetrees-0/+39
2022-10-09Don't use unnormalized type in Ty::fn_sigMichael Goulet-0/+13
2022-10-08Rollup merge of #102782 - Hosshii:issue-102124, r=Mark-SimulacrumMichael Howell-0/+20
Add regression test for #102124 closes #102124, which was already fixed on nightly.
2022-10-08Rollup merge of #102514 - b-naber:binder-print-fixes, r=jackh726Michael Howell-7/+51
Don't repeat lifetime names from outer binder in print Fixes https://github.com/rust-lang/rust/issues/102392 Fixes https://github.com/rust-lang/rust/issues/102414 r? ```@lcnr```
2022-10-08Rollup merge of #99818 - aliemjay:fix-closure-normalize, r=jackh726Michael Howell-0/+135
don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes #102800 ~Fixess #99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by #101708, but the changes in this PR are still correct and should prevent potential future ICEs)
2022-10-08Rollup merge of #102815 - notriddle:notriddle/mobile-topbar, r=GuillaumeGomezMatthias Krüger-1/+1
rustdoc: remove mobile topbar from source pages instead of hiding it
2022-10-08Rollup merge of #102723 - pcc:run-make-cc, r=Mark-SimulacrumMatthias Krüger-5/+1
test: run-make: skip when cross-compiling This test fails when targeting aarch64 Android. Instead of adding yet another architecture here (and one that's increasingly more common as the host), let's replace the growing list of architectures with ignore-cross-compile.
2022-10-08Rollup merge of #102524 - notriddle:notriddle/unsafe-function, r=GuillaumeGomezMatthias Krüger-0/+41
rustdoc: remove weird `<a href="#">` wrapper around unsafe triangle This DOM cleanup changes the color of the triangle, from blue to black, but since it's still a different color from the link it's next to, it should still be noticeable. # Before ![image](https://user-images.githubusercontent.com/1593513/193352428-929b3026-acc3-448e-9bac-44dddf206b1d.png) # After ![image](https://user-images.githubusercontent.com/1593513/193352500-2f7a0112-b478-4cc4-9ddb-32ba11575530.png)
2022-10-08Auto merge of #102315 - RalfJung:assert_unsafe_precondition, r=thomccbors-5/+6
add a few more assert_unsafe_precondition Add debug-assertion checking for `ptr.read()`, `ptr.write(_)`, and `unreachable_unchecked.` This is quite useful for [cargo-careful](https://github.com/RalfJung/cargo-careful).
2022-10-08rustdoc: add test case for dimensions and color of unsafe `<sup>`Michael Howell-0/+41
2022-10-08rustdoc: remove mobile topbar from source pages instead of hiding itMichael Howell-1/+1
2022-10-08handle late-bound vars from inner binders correctly and add testb-naber-0/+24
2022-10-08Auto merge of #102809 - matthiaskrgr:rollup-qq62vuv, r=matthiaskrgrbors-187/+260
Rollup of 8 pull requests Successful merges: - #101520 (Allow transmutes between the same types after erasing lifetimes) - #102675 (Remove `mir::CastKind::Misc`) - #102778 (Fix MIR inlining of asm_unwind) - #102785 (Remove `DefId` from some `SelectionCandidate` variants) - #102788 (Update rustc-dev-guide) - #102789 (Update browser UI test version) - #102797 (rustdoc: remove no-op CSS `.rightside { position: initial }`) - #102798 (rustdoc: add main-heading and example-wrap link CSS to big selector) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-08Rollup merge of #102789 - GuillaumeGomez:update-browser-ui-test-version, ↵Matthias Krüger-149/+149
r=notriddle Update browser UI test version It added the possibility to concatenate strings and numbers and updated the `goto` command so it doesn't stand on its own anymore. r? ````@notriddle````
2022-10-08Rollup merge of #102778 - nbdd0121:mir, r=tmiaskoMatthias Krüger-0/+67
Fix MIR inlining of asm_unwind The MIR inlining currently doesn't handle inline asm's unwind edge correctly. This code will cause ICE: ```rust struct D; impl Drop for D { fn drop(&mut self) {} } #[inline(always)] fn foo() { let _d = D; unsafe { std::arch::asm!("", options(may_unwind)) }; } pub fn main() { foo(); } ``` This PR fixes this issue. I also take the opportunity to extract common code into a method.
2022-10-08Rollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obkMatthias Krüger-16/+16
Remove `mir::CastKind::Misc` As discussed in #97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast. r? ````@oli-obk````
2022-10-08Rollup merge of #101520 - oli-obk:transmute_lifetimes, r=compiler-errorsMatthias Krüger-22/+28
Allow transmutes between the same types after erasing lifetimes r? ````@compiler-errors```` on the impl fixes #101081 See discussion in the issue and at https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.23101081.3A.20Regression.20transmuting.20.60RwLockReadGuard.3CT.3A.20.3FSized.3E.E2.80.A6 I think this may need lang team signoff as its implications may go beyond the jurisdiction of T-types I'll write up a proper summary later
2022-10-08Auto merge of #100720 - camsteffen:representable, r=cjgillotbors-252/+188
Rewrite representability * Improve placement of `Box` in the suggestion * Multiple items in a cycle emit 1 error instead of an error for each item in the cycle * Introduce `representability` query to avoid traversing an item every time it is used. * Also introduce `params_in_repr` query to avoid traversing generic items every time it is used.
2022-10-08Stabilize half_open_range_patternsUrgau-368/+254
2022-10-08Split slice part of feature(half_open_range_patterns) to [...]_in_slicesUrgau-6/+25
2022-10-08don't ICE when normalizing closure input tysAli MJ Al-Nasrawy-0/+135
`normalize_and_add_constraints` doesn't add entries in `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes.
2022-10-08fix #102182, recover from impl Trait in type param boundyukang-0/+17
2022-10-07Auto merge of #102091 - RalfJung:const_err, r=oli-obkbors-5088/+1323
make const_err a hard error This lint has been deny-by-default with future incompat wording since [Rust 1.51](https://github.com/rust-lang/rust/pull/80394) and the stable release of this week starts showing it in cargo's future compat reports. I can't wait to finally get rid of at least some of the mess in our const-err-reporting-code. ;) r? `@oli-obk` Fixes https://github.com/rust-lang/rust/issues/71800 Fixes https://github.com/rust-lang/rust/issues/100114
2022-10-07typeck result is now affected by opaque type spansOli Scherer-1/+1
2022-10-07Add a regression testOli Scherer-0/+26
2022-10-07Check hidden types in dead codeOli Scherer-2/+16
2022-10-07Unconditionally encode hidden types in typeck resultsOli Scherer-4/+11
2022-10-07First batch of review feedback changes from #102110Nathan Stocks-2/+2
2022-10-07Update rustdoc-gui test to new browser-ui-test versionGuillaume Gomez-149/+149
2022-10-07Fix testGary Guo-10/+11
2022-10-07Rollup merge of #102779 - TaKO8Ki:fix-type-of-ice-102768, r=fee1-deadDylan DPC-0/+47
Fix `type_of` ICE Fixes #102768
2022-10-07Rollup merge of #102764 - compiler-errors:issue-102762, r=jackh726Dylan DPC-0/+46
Check `WhereClauseReferencesSelf` after all other object safety checks This fixes the ICE because it causes us to detect another *non-lint* `MethodViolationCode` first, instead of breaking on `WhereClauseReferencesSelf`. We could also approach this issue by instead returning a vector of *all* of the `MethodViolationCode`s, and just reporting the first one we see, but treating it as a hard error if we return both `WhereClauseReferencesSelf` and some other violation code -- let me know if this is desired. Fixes #102762
2022-10-07Allow transmutes between the same types after erasing lifetimesOli Scherer-22/+28
2022-10-07make const_err a hard errorRalf Jung-5088/+1323
2022-10-07Add regression test for #102124Hosshii-0/+20
2022-10-07Rewrite representabilityCameron Steffen-252/+188