about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-11-12Auto merge of #103150 - joboet:remove_lock_wrappers, r=m-ou-sebors-2/+2
Remove lock wrappers in `sys_common` This moves the lazy allocation to `sys` (SGX and UNIX). While this leads to a bit more verbosity, it will simplify future improvements by making room in `sys_common` for platform-independent implementations. This also removes the condvar check on SGX as it is not necessary for soundness and will be removed anyway once mutex has been made movable. For simplicity's sake, `libunwind` also uses lazy allocation now on SGX. This will require an update to the C definitions before merging this (CC `@raoulstrackx).` r? `@m-ou-se`
2022-11-11Auto merge of #104293 - Manishearth:rollup-xj92d0k, r=Manishearthbors-92/+678
Rollup of 8 pull requests Successful merges: - #95292 (Allow specialized const trait impls.) - #100386 (Make `Sized` coinductive, again) - #102215 (Implement the `+whole-archive` modifier for `wasm-ld`) - #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code) - #103531 (Suggest calling the instance method of the same name when method not found) - #103960 (piece of diagnostic migrate) - #104051 (update Miri) - #104129 (rustdoc: use javascript to layout notable traits popups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-11Auto merge of #104289 - Dylan-DPC:rollup-v7wei2t, r=Dylan-DPCbors-93/+264
Rollup of 9 pull requests Successful merges: - #100633 (Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`) - #103445 (`#[test]`: Point at return type if `Termination` bound is unsatisfied) - #103924 (Fix broken link in description of error code E0706) - #104146 (Retry binding TCP Socket in remote-test-server) - #104169 (Migrate `:target` rules to use CSS variables) - #104202 (Fix ICE #103748) - #104216 (Don't ICE on operator trait methods with generic methods) - #104217 (Display help message when fluent arg was referenced incorrectly) - #104245 (Reduce default configuration's dependency upon static libstdcpp library (#103606)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-11Rollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait, ↵Manish Goregaokar-16/+108
r=Manishearth rustdoc: use javascript to layout notable traits popups Fixes #102576 Preview: https://notriddle.com/notriddle-rustdoc-demos/102576-js-notable-trait/std/iter/trait.Iterator.html#method.step_by ## Before ![image](https://user-images.githubusercontent.com/1593513/200432713-23aa8d49-ba2b-469f-9eab-089e0c174039.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200432735-edd5b53d-e99d-4fc5-9410-8a79e0efdc9d.png)
2022-11-11Rollup merge of #103531 - chenyukang:yukang/fix-103474, r=estebankManish Goregaokar-4/+76
Suggest calling the instance method of the same name when method not found Fixes #103474
2022-11-11Rollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, ↵Manish Goregaokar-0/+97
r=estebank Fix unused lint and parser caring about spaces to won't produce invalid code Fixes #103435
2022-11-11Rollup merge of #100386 - compiler-errors:sized-coinductive-redux, r=lcnrManish Goregaokar-69/+113
Make `Sized` coinductive, again A revival of #83647 --- What exactly makes co-induction sound? Better question: are there any unsoundness risks from this? `Sized` can't be implemented by custom `impl` blocks, nor can it be conditionally implemented based on anything other than child fields being `Sized`, right? r? `@nikomatsakis` for whenever he gets back from vacation
2022-11-11Rollup merge of #95292 - BGR360:const-trait-specialize, r=lcnrManish Goregaokar-3/+284
Allow specialized const trait impls. Fixes #95186. Fixes #95187. I've done my best to create a comprehensive test suite for the interaction between `min_specialization` and `const_trait_impls`. I wouldn't be surprised if there are interesting cases I haven't tested, please let me know.
2022-11-11Rollup merge of #104216 - Nilstrieb:dont-ice-invalid-operator-traits, r=estebankDylan DPC-0/+31
Don't ICE on operator trait methods with generic methods Emit a fatal error instead. fixes #104213
2022-11-11Rollup merge of #104202 - camsteffen:103748, r=estebankDylan DPC-0/+59
Fix ICE #103748 Fixes #103748
2022-11-11Rollup merge of #104169 - GuillaumeGomez:migrate-css-target, r=notriddleDylan DPC-0/+35
Migrate `:target` rules to use CSS variables There should be no GUI changes. r? `@notriddle`
2022-11-11Rollup merge of #103445 - fmease:fix-50291, r=estebankDylan DPC-7/+5
`#[test]`: Point at return type if `Termination` bound is unsatisfied Together with #103142 (already merged) this fully fixes #50291. I don't consider my current solution of changing a few spans “here and there” very clean since the failed obligation is a `FunctionArgumentObligation` and we point at a type instead of a function argument. If you agree with me on this point, I can offer to keep the spans of the existing nodes and instead inject `let _: AssertRetTyIsTermination<$ret_ty>;` (type to be defined in `libtest`) similar to `AssertParamIsEq` etc. used by some built-in derive-macros. I haven't tried that approach yet though and cannot promise that it would actually work out or be “cleaner” for that matter. ````@rustbot```` label A-libtest A-diagnostics r? ````@estebank````
2022-11-11Rollup merge of #100633 - estebank:must_use_async_fn_return, r=tmandryDylan DPC-86/+134
Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output` No longer lint against `#[must_use] async fn foo()`. When encountering a statement that awaits on a `Future`, check if the `Future`'s parent item is annotated with `#[must_use]` and emit a lint if so. This effectively makes `must_use` an annotation on the `Future::Output` instead of only the `Future` itself. Fix #78149.
2022-11-11rustc_codegen_ssa: Better code generation for niche discriminants.Michael Benfield-0/+226
In some cases we can avoid arithmetic before checking whether a niche represents an untagged variant. This is relevant to #101872
2022-11-10Oops, bless this test.Ben Reeves-1/+1
2022-11-10Fix tests after rebaseEsteban Küber-2/+2
2022-11-11Auto merge of #99918 - WaffleLapkin:fnFnfun, r=estebankbors-0/+154
Recover wrong-cased keywords that start items (_this pr was inspired by [this tweet](https://twitter.com/Azumanga/status/1552982326409367561)_) r? `@estebank` We've talked a bit about this recovery, but I just wanted to make sure that this is the right approach :) For now I've only added the case insensitive recovery to `use`s, since most other items like `impl` blocks, modules, functions can start with multiple keywords which complicates the matter.
2022-11-10review commentsEsteban Küber-4/+4
2022-11-10Consider `#[must_use]` annotation on `async fn` as also affecting the ↵Esteban Küber-30/+78
`Future::Output` No longer lint against `#[must_use] async fn foo()`. When encountering a statement that awaits on a `Future`, check if the `Future`'s parent item is annotated with `#[must_use]` and emit a lint if so. This effectively makes `must_use` an annotation on the `Future::Output` instead of only the `Future` itself. Fix #78149.
2022-11-10Tweak span for `#[must_use]`Esteban Küber-55/+55
Do not point at whole statement, only at the expression (skip pointing at `;`)
2022-11-10More nitsMichael Goulet-0/+14
2022-11-10bless testsMichael Goulet-70/+23
2022-11-10add some more testslcnr-0/+35
2022-11-10make `Sized` coinductivelcnr-0/+42
2022-11-10Apply PR feedback.Ben Reeves-1/+1
2022-11-10Require `~const` qualifier on trait bounds in specializing impls if present ↵Ben Reeves-8/+94
in base impl.
2022-11-10Add #[const_trait] where needed in tests.Ben Reeves-1/+10
2022-11-10Disallow specializing on const impls with non-const impls.Ben Reeves-76/+20
2022-11-10Allow specialized const trait impls.Ben Reeves-0/+242
Fixes #95186. Fixes #95187.
2022-11-10Add GUI test for :targetGuillaume Gomez-0/+35
2022-11-10update debuginfo checkjoboet-2/+2
2022-11-10Rollup merge of #104233 - compiler-errors:issue-104209, r=lcnrManish Goregaokar-0/+14
Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor` Fixes #104209
2022-11-10Rollup merge of #104186 - chenyukang:yukang/fix-104086-let-binding-issue, ↵Manish Goregaokar-0/+165
r=oli-obk Tighten the 'introduce new binding' suggestion Fixes #104086
2022-11-10Rollup merge of #104077 - nicholasbishop:bishop-uefi-aapcs, r=nagisaManish Goregaokar-1/+1
Use aapcs for efiapi calling convention on arm On arm, [llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets](https://github.com/rust-lang/compiler-builtins/issues/116#issuecomment-261057422). UEFI specifies in the arm calling convention that [floating point extensions aren't used](https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention), so always translate `efiapi` to `aapcs` on arm. https://github.com/rust-lang/rust/issues/65815
2022-11-10Rollup merge of #104036 - compiler-errors:option-sugg, r=petrochenkovManish Goregaokar-0/+25
Suggest `is_some` when we've found `Option` but expected `bool` Thanks `@lunasorcery` for the suggestion.
2022-11-10Rollup merge of #103863 - compiler-errors:fulfillcx-less, r=wesleywiserManish Goregaokar-0/+4
Use `TraitEngine` in more places, restrict visibility of `FulfillmentCtxt` constructor Most places that are constructing a `FulfillmentContext` should be constructing a `TraitEngine` generically, so later on if/when we're transitioning it'll be easier. Logical extension of #99746
2022-11-10Auto merge of #104236 - compiler-errors:rollup-adjshd6, r=compiler-errorsbors-0/+128
Rollup of 9 pull requests Successful merges: - #102763 (Some diagnostic-related nits) - #103443 (Parser: Recover from using colon as path separator in imports) - #103675 (remove redundent "<>" for ty::Slice with reference type) - #104046 (bootstrap: add support for running Miri on a file) - #104115 (Migrate crate-search element to CSS variables) - #104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame) - #104201 (Add check in GUI test for file loading failure) - #104211 (:arrow_up: rust-analyzer) - #104231 (Update mailmap) Failed merges: - #104169 (Migrate `:target` rules to use CSS variables) r? `@ghost` `@rustbot` modify labels: rollup
2022-11-09Rollup merge of #104201 - GuillaumeGomez:gui-test-check-file-errors, r=notriddleMichael Goulet-0/+25
Add check in GUI test for file loading failure Since https://github.com/rust-lang/rust/pull/101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like https://github.com/rust-lang/rust/pull/104114 to happen again. The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case. cc ```@jsha``` r? ```@notriddle```
2022-11-09Rollup merge of #104115 - GuillaumeGomez:migrate-crate-search-div, r=notriddleMichael Goulet-0/+40
Migrate crate-search element to CSS variables There should no UI changes. r? ```@notriddle```
2022-11-09Rollup merge of #103675 - lyming2007:issue-103271-fix, r=fee1-deadMichael Goulet-0/+24
remove redundent "<>" for ty::Slice with reference type this fix #103271
2022-11-09Rollup merge of #103443 - mucinoab:recover-colon-as-path-separetor, ↵Michael Goulet-0/+39
r=compiler-errors Parser: Recover from using colon as path separator in imports I don't know if this is the right approach, any feedback is welcome. r? ```@compiler-errors``` Fixes #103269
2022-11-10Auto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, ↵bors-0/+72
r=jackh276,davidtwco Recover from common if let syntax mistakes/typos Fixes #103587
2022-11-10Don't ICE when encountering ConstKind::Error in RequiredConstsVisitorMichael Goulet-0/+14
2022-11-10bless a chalk testMichael Goulet-0/+4
2022-11-10Auto merge of #101990 - clubby789:dont-machine-apply-placeholder-method, ↵bors-15/+165
r=compiler-errors Fix auto-application of associated generic functions with placeholders Fixes #101920
2022-11-09remove redundent "<>" for ty::Slice with reference typeYiming Lei-0/+24
this fix #103271
2022-11-09Don't ICE on operator trait methods with generic methodsNilstrieb-0/+31
Emit a fatal error instead.
2022-11-09rustdoc: sort output to make it deterministicMichael Howell-1/+1
2022-11-09Rollup merge of #104020 - nicholasbishop:bishop-limit-efiapi, r=nagisaManish Goregaokar-99/+127
Limit efiapi calling convention to supported arches Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions https://github.com/rust-lang/rust/issues/65815
2022-11-09Rollup merge of #103464 - JakobDegen:mir-parsing, r=oli-obkManish Goregaokar-0/+159
Add support for custom mir This implements rust-lang/compiler-team#564 . Details about the design, motivation, etc. can be found in there. r? ```@oli-obk```