about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
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`
2022-06-28Rollup merge of #98609 - TaKO8Ki:fix-ice-for-associated-constant-generics, ↵Matthias Krüger-0/+23
r=lcnr Fix ICE for associated constant generics Fixes #98432
2022-06-28Rollup merge of #98602 - TaKO8Ki:add-regression-test-for-issue-80074, ↵Matthias Krüger-0/+14
r=Mark-Simulacrum Add regression test for #80074 closes #80074
2022-06-28Rollup merge of #98560 - TaKO8Ki:add-regression-test-for-85907, ↵Matthias Krüger-0/+17
r=Mark-Simulacrum Add regression test for #85907 closes #85907
2022-06-28Rollup merge of #98548 - Enselic:allow-typedef-diff-for-rustdoc-json, ↵Matthias Krüger-0/+22
r=GuillaumeGomez rustdoc-json: Allow Typedef to be different in sanity assert Closes #98547 This fix is a natural extension of #98053. r? `@notriddle` (Since you reviewed the other PR.) CC `@GuillaumeGomez` `@rustbot` labels +A-rustdoc-json +T-rustdoc
2022-06-28Fix test for non-prefer-dynamic targetGary Guo-3/+2
2022-06-28Auto merge of #98188 - mystor:fast_group_punct, r=eddybbors-1/+1
proc_macro/bridge: stop using a remote object handle for proc_macro Punct and Group This is the third part of https://github.com/rust-lang/rust/pull/86822, split off as requested in https://github.com/rust-lang/rust/pull/86822#pullrequestreview-1008655452. This patch transforms the `Punct` and `Group` types into structs serialized over IPC rather than handles, making them more efficient to create and manipulate from within proc-macros.
2022-06-28emit Retag for compound types with reference fieldsRalf Jung-0/+2
2022-06-28Auto merge of #98612 - Dylan-DPC:rollup-7tasikc, r=Dylan-DPCbors-44/+197
Rollup of 9 pull requests Successful merges: - #97346 (Remove a back-compat hack on lazy TAIT) - #98261 (Remove `MAX_SUGGESTION_HIGHLIGHT_LINES`) - #98337 ([RFC 2011] Optimize non-consuming operators) - #98384 (Fix RSS reporting on macOS) - #98420 (translation: lint fix + more migration) - #98430 (Refactor iter adapters with less macros) - #98555 (Hermit: Fix initializing lazy locks) - #98595 (Implement `Send` and `Sync` for `ThinBox<T>`) - #98597 (Remove unstable CStr/CString change from 1.62 release note) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-28Rollup merge of #98337 - c410-f3r:assert-compiler, r=oli-obkDylan DPC-38/+179
[RFC 2011] Optimize non-consuming operators Tracking issue: https://github.com/rust-lang/rust/issues/44838 Fifth step of https://github.com/rust-lang/rust/pull/96496 The most non-invasive approach that will probably have very little to no performance impact. ## Current behaviour Captures are handled "on-the-fly", i.e., they are performed in the same place expressions are located. ```rust // `let a = 1; let b = 2; assert!(a > 1 && b < 100);` if !( { ***try capture `a` and then return `a`*** } > 1 && { ***try capture `b` and then return `b`*** } < 100 ) { panic!( ... ); } ``` As such, some overhead is likely to occur (Specially with very large chains of conditions). ## New behaviour for non-consuming operators When an operator is known to not take `self`, then it is possible to capture variables **AFTER** the condition. ```rust // `let a = 1; let b = 2; assert!(a > 1 && b < 100);` if !( a > 1 && b < 100 ) { { ***try capture `a`*** } { ***try capture `b`*** } panic!( ... ); } ``` So the possible impact on the runtime execution time will be diminished. r? ````@oli-obk````
2022-06-28Rollup merge of #97346 - JohnTitor:remove-back-compat-hacks, r=oli-obkDylan DPC-6/+18
Remove a back-compat hack on lazy TAIT This PR's motivation is here: https://github.com/rust-lang/rust/issues/72614#issuecomment-1134595446 ~~But removing a hack doesn't seem to reject the code on the issue, there're some more hacks?~~ r? ``@oli-obk``
2022-06-28Auto merge of #98396 - cjgillot:iwfchir, r=petrochenkovbors-19/+16
Do not access HIR to check impl wf. r? `@ghost`
2022-06-28Add regression test for glob import ICE in rustdoc JSONGuillaume Gomez-0/+24
2022-06-28fix `emit_inference_failure_err` ICElcnr-0/+100
2022-06-28fix ice for associated constant genericsTakayuki Maeda-0/+23
2022-06-28test/rustdoc-json/assoc_type.rs: Maximize chance of detecting future ICEsMartin Nordholts-0/+6
2022-06-28rustdoc-json: Add assoc type ICE regression testMartin Nordholts-0/+16
2022-06-28Remove `final_arg_types`, improve tuple wrapping suggestionMichael Goulet-7/+57
2022-06-28Rename/restructure memory ordering intrinsics.Mara Bos-133/+133
2022-06-27Use typed indices in argument mismatch algorithmMichael Goulet-48/+47
2022-06-28Auto merge of #98222 - cjgillot:single-wf, r=michaelwoeristerbors-265/+149
Only keep a single query for well-formed checking There are currently 3 queries to perform wf checks on different item-likes. This complexity is not required. This PR replaces the query by: - one query per item; - one query to invoke it for a whole module. This allows to remove HIR `ParItemLikeVisitor`.
2022-06-28add regression test for #80074Takayuki Maeda-0/+14
2022-06-27Rollup merge of #98577 - GuillaumeGomez:associated-items, r=notriddleMatthias Krüger-0/+29
Fix "kind" for associated types in trait implementations in rustdoc JSON Fixes https://github.com/rust-lang/rust/issues/81340. Contrary to what is suggested in the issue, I really think we should distinguish between associated items and "normal" constants and types. cc `@CraftSpider` `@SimonSapin` r? `@notriddle`
2022-06-27Rollup merge of #98506 - compiler-errors:object-safety-suggestions, r=oli-obkMatthias Krüger-3/+47
Fix span issues in object safety suggestions Fixes #98500
2022-06-27Rollup merge of #98331 - GuillaumeGomez:rustdoc-arg-error, r=notriddleMatthias Krüger-24/+590
Fix rustdoc argument error Fixes #88756. It's a take over of #88831. I cherry-picked the commits, fixed the merge conflict and the failing test. cc `@inashivb` `@jyn514` r? `@notriddle`
2022-06-27Add test for associated items in rustdoc JSONGuillaume Gomez-0/+29
2022-06-27Remove a back-compat hack on lazy TAITYuki Okushi-6/+18
2022-06-27Finish rustdoc error improvementGuillaume Gomez-29/+201
2022-06-27Add test for help output with -WShivani Bhardwaj-0/+195
2022-06-27Add test for default rustdoc runShivani Bhardwaj-0/+199
2022-06-27Rollup merge of #98530 - davidkna:known-bug-ref, r=Mark-SimulacrumMatthias Krüger-16/+16
compiletest: add issue number param to `known-bug` I was getting some errors while testing this, but I'm pretty sure that was unrelated to my changes. Closes #98436 > Basically, instead of `// known-bug`, do `// known-bug #00000` or maybe `// known-bug chalk#00`? > > From: https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.2398095.3A.20NLL.3A.20unsound.20verification.20of.20higher.20ranked.20outlives.E2.80.A6/near/287258738 I also added an `unknown` escape-hatch because I didn't find corresponding issues for every `// known-bug`. The syntax also ended up being `// known-bug: `, because of `set_name_value_directive`.
2022-06-27Rollup merge of #97780 - compiler-errors:field-wfcheck-before-sized, r=jackh726Matthias Krüger-24/+40
Check ADT field is well-formed before checking it is sized Fixes #96810. There is one diagnostics regression, in [`src/test/ui/generic-associated-types/bugs/issue-80626.stderr`](https://github.com/rust-lang/rust/pull/97780/files#diff-53795946378e78a0af23a10277c628ff79091c18090fdc385801ee70c1ba6963). I am not super concerned about it, since it's GAT related. We _could_ fix it, possibly by using the `FieldSized` obligation cause code instead of `BuiltinDerivedObligation`. But that would require changing `Sized` trait confirmation and the `adt_sized_constraint` query.
2022-06-27Rollup merge of #97389 - m-ou-se:memory-ordering-diagnostics, r=estebankMatthias Krüger-228/+246
Improve memory ordering diagnostics Before: ![image](https://user-images.githubusercontent.com/783247/170234545-891cac30-eaa2-4186-847b-35cd51e00f2b.png) After: ![image](https://user-images.githubusercontent.com/783247/170239684-645f186f-5a02-4eb9-8651-2e5fe9591352.png) --- Before this change, the compiler suggests the failure ordering is too strong and suggests choosing a weaker ordering. After this change, it instead suggests the success ordering is not strong enough, and suggests chosing a stronger one. This is more likely to be correct. Also, before this change, the compiler suggested downgrading an invalid AcqRel failure ordering to Relaxed, without mentioning Acquire as an option.