about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-06-30Auto merge of #98691 - matthiaskrgr:rollup-ymsa64p, r=matthiaskrgrbors-171/+376
Rollup of 6 pull requests Successful merges: - #96727 (Make TAIT behave exactly like RPIT) - #98681 (rustdoc-json: Make default value of blanket impl assoc types work) - #98682 (add tests for ICE 94432) - #98683 (add test for ice 68875) - #98685 (Replace `sort_modules_alphabetically` boolean with enum) - #98687 (add test for 47814) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-30Rollup merge of #98687 - matthiaskrgr:test_47814, r=compiler-errorsMatthias Krüger-0/+27
add test for 47814 not sure if the issue should actually get closed though, hm r? ``@compiler-errors``
2022-06-30Rollup merge of #98683 - matthiaskrgr:ice-test-68875, r=compiler-errorsMatthias Krüger-0/+19
add test for ice 68875 Fixes #68875
2022-06-30Rollup merge of #98682 - matthiaskrgr:test-94432, r=compiler-errorsMatthias Krüger-0/+10
add tests for ICE 94432 Fixes #94432
2022-06-30Rollup merge of #98681 - ↵Matthias Krüger-0/+9
Enselic:rustdoc-json-default-assoc-type-blanket-impl, r=GuillaumeGomez rustdoc-json: Make default value of blanket impl assoc types work Closes #98658 r? ``@GuillaumeGomez`` ``@rustbot`` labels +A-rustdoc-json
2022-06-30Rollup merge of #96727 - oli-obk:no_expect, r=lcnrMatthias Krüger-171/+311
Make TAIT behave exactly like RPIT fixes https://github.com/rust-lang/rust/issues/96552 This makes type-alias-impl-trait behave like return-position-impl-trait. Unfortunately it also causes some cases to stop compiling due to "needing type annotations" and makes panicking cause fallback for the hidden type to `()`. All of these are addressable, but we should probably address them for RPIT and TAIT together r? ``@lcnr``
2022-06-29Auto merge of #98520 - RalfJung:invalid, r=compiler-errorsbors-192/+192
interpret: adjust error from constructing an invalid value
2022-06-29add test for 47814Matthias Krüger-0/+27
not sure if the issue should actually get closed though, hm r? @compiler-errors
2022-06-29add test for ice 68875Matthias Krüger-0/+19
Fixes #68875
2022-06-29add tests for ICE 94432Matthias Krüger-0/+10
Fixes #94432
2022-06-29rustdoc-json: Make default value of blanket impl assoc types workMartin Nordholts-0/+9
2022-06-29Rollup merge of #98665 - ChrisDenton:deprecated-suggestion, r=compiler-errorsMatthias Krüger-5/+27
Use verbose help for deprecation suggestion Fixes #98631 r? `@compiler-errors`
2022-06-29Rollup merge of #98660 - eddyb:invalid-punct-stage1, r=lqdMatthias Krüger-14/+6
Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`. #98188 broke `./x.py test --stage 1` (which I thought we ran in PR CI, cc `@rust-lang/infra)` i.e. the default `./x.py test` in dev checkouts, as the panic in `src/test/ui/proc-macro/invalid-punct-ident-1.rs` moved from the server (`rustc`) to the client (proc macro), and that means it's now affected by #59998. I made the test look like `src/test/ui-fulldeps/issue-76270-panic-in-libproc-macro.rs` tho I'm a bit confused why that one is in `src/test/ui-fulldeps`, it should still work in `src/test/ui`, no? (cc `@Aaron1011)`
2022-06-29Rollup merge of #98652 - ojeda:warning-free-no_global_oom_handling, ↵Matthias Krüger-1/+1
r=joshtriplett `alloc`: clean and ensure `no_global_oom_handling` builds are warning-free Rust 1.62.0 introduced a couple new `unused_imports` warnings in `no_global_oom_handling` builds, making a total of 5 warnings. <details> ```txt warning: unused import: `Unsize` --> library/alloc/src/boxed/thin.rs:6:33 | 6 | use core::marker::{PhantomData, Unsize}; | ^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `from_fn` --> library/alloc/src/string.rs:51:18 | 51 | use core::iter::{from_fn, FusedIterator}; | ^^^^^^^ warning: unused import: `core::ops::Deref` --> library/alloc/src/vec/into_iter.rs:12:5 | 12 | use core::ops::Deref; | ^^^^^^^^^^^^^^^^ warning: associated function `shrink` is never used --> library/alloc/src/raw_vec.rs:424:8 | 424 | fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> { | ^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: associated function `forget_remaining_elements` is never used --> library/alloc/src/vec/into_iter.rs:126:19 | 126 | pub(crate) fn forget_remaining_elements(&mut self) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ ``` </details> This PR cleans them and ensures no new ones are introduced so that projects compiling `alloc` without infallible allocations do not see them (and may want to enable `-Dwarnings`). The couple `dead_code` ones may be reverted when some fallible allocation support starts using them.
2022-06-29Rollup merge of #98646 - notriddle:notriddle/main.js, r=GuillaumeGomezMatthias Krüger-0/+19
rustdoc: fix bugs in main.js popover help and settings
2022-06-29Rollup merge of #98643 - voidc:valtree-ref-pretty, r=lcnrMatthias Krüger-0/+48
Improve pretty printing of valtrees for references This implements the changes outlined in https://github.com/rust-lang/rust/issues/66451#issuecomment-1168859638. r? `@lcnr` Fixes #66451
2022-06-29Rollup merge of #98642 - yanchen4791:issue-98260-fix, r=spastorinoMatthias Krüger-0/+21
Fix #98260 Fixes https://github.com/rust-lang/rust/issues/98260
2022-06-29fix stderr by hand since that test is not run on my systemRalf Jung-4/+4
2022-06-29interpret: adjust error from constructing an invalid valueRalf Jung-188/+188
2022-06-29Rollup merge of #98625 - RalfJung:retag, r=oli-obkDylan DPC-0/+2
emit Retag for compound types with reference fields I want to add an option to Miri to do retagging inside reference fields. But that means we first have to even emit `Retag` for types that *contain* references (rather than being of reference types). :) Stacked Borrows originally did that, but we stopped doing it when hitting bunch of issues in the standard library. However I have since realized that we actually do emit `noalias` for newtypes references, which means for soundness we should recurse into fields. Also it'd probably be bad news if newtypes lose out on optimizations (and they don't, for anything else). I want to add an option for that to Miri so that we can start experimenting with those semantics. r? ``@oli-obk``
2022-06-29Rollup merge of #98607 - compiler-errors:tuple-wrap-suggestion, r=oli-obkDylan DPC-17/+104
Clean up arg mismatch diagnostic, generalize tuple wrap suggestion This is based on top of #97542, so just look at the last commit which contains the relevant changes. 1. Remove `final_arg_types` which was one of the last places we were using raw (`usize`) indices instead of typed indices in the arg mismatch suggestion code. 2. Improve the tuple wrap suggestion, now we suggest things like `call(a, b, c, d)` -> `call(a, (b, c), d)` :smiley_cat: 3. Folded in fix #98645
2022-06-29Rollup merge of #98499 - JulianKnodt:erase_lifetime, r=lcnrDylan DPC-0/+33
Erase regions in New Abstract Consts When an abstract const is constructed, we previously included lifetimes in the set of substitutes, so it was not able to unify two abstract consts if their lifetimes did not match but the values did, despite the values not depending on the lifetimes. This caused code that should have compiled to not compile. Fixes #98452 r? ```@lcnr```
2022-06-29Rollup merge of #98415 - ↵Dylan DPC-18/+18
compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic` Self-explanatory r? ```@davidtwco```
2022-06-29Add more testsOli Scherer-2/+28
2022-06-29Make RPIT and TAIT work exactly the sameOli Scherer-183/+297
2022-06-29Use verbose help for deprecation suggestionChris Denton-5/+27
2022-06-29Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.Eduard-Mihai Burtescu-14/+6
2022-06-29Rollup merge of #98603 - compiler-errors:minor-borrowck-diagnostic-fixes, ↵Dylan DPC-25/+108
r=davidtwco Some borrowck diagnostic fixes 1. Remove some redundant `.as_ref` suggestion logic from borrowck, this has the consequence of also not suggesting `.as_ref` after `Option` methods, but (correctly) before. 2. Fix a bug where we were replacing a binding's name with a type. Instead, make it a note. This is somewhat incomplete. See `src/test/ui/borrowck/suggest-as-ref-on-mut-closure.rs` for more improvements.
2022-06-29Rollup merge of #98525 - JohnTitor:issue-79224, r=compiler-errorsDylan DPC-0/+53
Add regression test for #79224 Closes #79224 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-29Rollup merge of #98277 - compiler-errors:issue-93596, r=estebankDylan DPC-48/+83
Fix trait object reborrow suggestion Fixes #93596 Slightly generalizes the logic we use to suggest fix first implemented in #95609, specifically when we have a `Sized` obligation that comes from a struct's unsized tail.
2022-06-29Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726Dylan DPC-48/+47
Use typed indices in argument mismatch algorithm I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array. Other drive-by changes: 1. Factor this logic into a new function, so we don't need to `break 'label` to escape it. 1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`. 1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`. ~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557 cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR. fixes #97484
2022-06-29Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiaskoDylan DPC-133/+133
Simplify memory ordering intrinsics This changes the names of the atomic intrinsics to always fully include their memory ordering arguments. ```diff - atomic_cxchg + atomic_cxchg_seqcst_seqcst - atomic_cxchg_acqrel + atomic_cxchg_acqrel_release - atomic_cxchg_acqrel_failrelaxed + atomic_cxchg_acqrel_relaxed // And so on. ``` - `seqcst` is no longer implied - The failure ordering on chxchg is no longer implied in some cases, but now always explicitly part of the name. - `release` is no longer shortened to just `rel`. That was especially confusing, since `relaxed` also starts with `rel`. - `acquire` is no longer shortened to just `acq`, such that the names now all match the `std::sync::atomic::Ordering` variants exactly. - This now allows for more combinations on the compare exchange operations, such as `atomic_cxchg_acquire_release`, which is necessary for #68464. - This PR only exposes the new possibilities through unstable intrinsics, but not yet through the stable API. That's for [a separate PR](https://github.com/rust-lang/rust/pull/98383) that requires an FCP. Suffixes for operations with a single memory order: | Order | Before | After | |---------|--------------|------------| | Relaxed | `_relaxed` | `_relaxed` | | Acquire | `_acq` | `_acquire` | | Release | `_rel` | `_release` | | AcqRel | `_acqrel` | `_acqrel` | | SeqCst | (none) | `_seqcst` | Suffixes for compare-and-exchange operations with two memory orderings: | Success | Failure | Before | After | |---------|---------|--------------------------|--------------------| | Relaxed | Relaxed | `_relaxed` | `_relaxed_relaxed` | | Relaxed | Acquire | :x: | `_relaxed_acquire` | | Relaxed | SeqCst | :x: | `_relaxed_seqcst` | | Acquire | Relaxed | `_acq_failrelaxed` | `_acquire_relaxed` | | Acquire | Acquire | `_acq` | `_acquire_acquire` | | Acquire | SeqCst | :x: | `_acquire_seqcst` | | Release | Relaxed | `_rel` | `_release_relaxed` | | Release | Acquire | :x: | `_release_acquire` | | Release | SeqCst | :x: | `_release_seqcst` | | AcqRel | Relaxed | `_acqrel_failrelaxed` | `_acqrel_relaxed` | | AcqRel | Acquire | `_acqrel` | `_acqrel_acquire` | | AcqRel | SeqCst | :x: | `_acqrel_seqcst` | | SeqCst | Relaxed | `_failrelaxed` | `_seqcst_relaxed` | | SeqCst | Acquire | `_failacq` | `_seqcst_acquire` | | SeqCst | SeqCst | (none) | `_seqcst_seqcst` |
2022-06-29Erase regions in new abstract constskadmin-0/+33
2022-06-29alloc: ensure `no_global_oom_handling` builds are warning-freeMiguel Ojeda-1/+1
Rust 1.62.0 introduced a couple new `unused_imports` warnings in `no_global_oom_handling` builds, making a total of 5 warnings. To avoid accumulating more over time, let's keep the builds warning-free. This ensures projects compiling `alloc` without infallible allocations do not see the warnings in the future and that they can keep enabling `-Dwarnings`. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-06-28Don't point at another arg if we're already pointing at oneMichael Goulet-10/+47
2022-06-28rustdoc: add assertion for missing popover divMichael Howell-1/+3
2022-06-28rustdoc: make keyboard commands work when checkboxes are selectedMichael Howell-0/+1
2022-06-28rustdoc: fix keyboard shortcuts bug in settings menuMichael Howell-0/+11
This commit fixes the keyboard shorts code to call localStorage every time a key is pressed. This matters because you're supposed to be able to change a setting and have it immediately take effect.
2022-06-29Auto merge of #98376 - nnethercote:improve-derive-PartialEq, r=petrochenkovbors-0/+1163
Improve some deriving code and add a test The `.stdout` test is particularly useful. r? `@petrochenkov`
2022-06-28rustdoc: fix help menu popover togglingMichael Howell-0/+5
2022-06-28Migrate some rustc_borrowck diagnostics to SessionDiagnosticMichael Goulet-18/+18
2022-06-28Do not use a suggestion to change a binding's name to a typeMichael Goulet-17/+15
2022-06-28Remove redundant logic to suggest `as_ref`Michael Goulet-10/+95
2022-06-28Fix #98260, added the test caseYan Chen-0/+21
2022-06-28Note concrete type being coerced into objectMichael Goulet-49/+49
2022-06-28Fix trait object reborrow suggestionMichael Goulet-0/+35
2022-06-28Address code review commentsDominik Stolz-1/+1
2022-06-28Improve pretty printing of valtrees for referencesDominik Stolz-0/+48
2022-06-28Auto merge of #98632 - matthiaskrgr:rollup-peg868d, r=matthiaskrgrbors-0/+100
Rollup of 11 pull requests Successful merges: - #98548 (rustdoc-json: Allow Typedef to be different in sanity assert) - #98560 (Add regression test for #85907) - #98564 (Remove references to `./tmp` in-tree) - #98602 (Add regression test for #80074) - #98606 (:arrow_up: rust-analyzer) - #98609 (Fix ICE for associated constant generics) - #98611 (Fix glob import ICE in rustdoc JSON format) - #98617 (Remove feature `const_option` from std) - #98619 (Fix mir-opt wg name) - #98621 (llvm-wrapper: adapt for removal of the ASanGlobalsMetadataAnalysis LLVM API) - #98623 (fix typo in comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-28Rollup merge of #98611 - GuillaumeGomez:rustdoc-json-glob-ice, r=notriddleMatthias Krüger-0/+24
Fix glob import ICE in rustdoc JSON format Fixes #98003. r? `@notriddle`