sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Using `&T` in where clause should suggest HRTB
Labels: A-diagnostics,A-lifetimes,T-compiler,A-suggestion-diagnostics,D-papercut

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0649baa344cf71ca09719ebebe1bf5d2

```rust
pub struct Foo;
pub struct Bar;

impl From<&Foo> for Bar {
    fn from(_: &Foo) -> Bar { Bar }
}

pub fn fails<E>(e: E) -> Bar where &E: Into<Bar> {
    (&e).into()
}
```

The current output is:

```
error[[E0637]](https://doc.rust-lang.org/stable/error-index.html#E0637): `&` without an explicit lifetime name cannot be used here
 --> src/lib.rs:8:36
  |
8 | pub fn fails<E>(e: E) -> Bar where &E: Into<Bar> {
  |                                    ^ explicit lifetime name needed here

error[[E0310]](https://doc.rust-lang.org/stable/error-index.html#E0310): the parameter type `E` may not live long enough
 --> src/lib.rs:8:40
  |
8 | pub fn fails<E>(e: E) -> Bar where &E: Into<Bar> {
  |                                        ^^^^^^^^^ ...so that the reference type `&'static E` does not outlive the data it points at
  |
help: consider adding an explicit lifetime bound...
  |
8 | pub fn fails<E: 'static>(e: E) -> Bar where &E: Into<Bar> {
  |               +++++++++
```

<!-- The following is not always necessary. -->
Ideally the output should suggest adding a HRTB like this:

```rust
pub fn works<E>(e: E) -> Bar where for<'e> &'e E: Into<Bar> {
    (&e).into()
}
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

TBH, HRTB are a very obscure feature to me, and it is not obvious in which circumstances I need to use them. This is one of those, and the compiler should suggest this to me.

I think there are quite some usecases when you have a `Into` / `From` that works with a reference, and you want to write code that is generic over that `Into` / `From` type.

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->
Repository: flutter
Issue: Improve the naming of `Menu` widgets.
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

Now that the new `DropDownMenu` widget landet, I am a bit surprised by its name choice. It seems to be inspired by the old `DropDownButton` widget, but it does not really make sense in my mind.

Now we have this:
| Widget | Description |
| - | - |
| `PopupMenuButton` | Menu that is triggered by a Widget or Icon |
| `DropDownMenu` | Menu that is triggered by an input field |

What I find confusing is that `Popup` bs `DropDown` ... Is both kinda the same. But then why does `DropDown` mean textfield as trigger?

## Use case

Confusing naming of widgets is a problem for new developers. So having more obvious names that align with the spec is good.

## Proposal
In general I think the "popup" is a word that does not appear in the material spec. So why not just remove it?
And then align the 2 widgets to each other: (This would be breaking, but could be done by just introducing new widgets):

| Widget | Description |
| - | - |
| `MenuButton` | Menu that is triggered by a Widget or Icon |
| `MenuTextField` | Menu that is triggered by an input field |
| `MenuTextField.autocomplete` | Menu that is triggered by an input field and enables text input by keyboard |
Repository: rust
Issue: Running `cargo test -- --logfile log.txt` overrides test results when running multiple testers 
Labels: A-libtest,C-bug,T-libs

### Problem

When running `cargo test -- --logfile log.txt`, all testers will write their logs into `log.txt`, meaning that for project with more than 1 test executable, this will result in `log.txt` being overridden by the last test run.

### Steps

Create a project with 2 different test modules. 2 different tester executables will be created when running `cargo --test`

### Possible Solution(s)

Introduce new command line argument such as `--logsuffix`  and `--logdir`. The tester will append a random string to the log name. Example:

```bash
mkdir out
cargo test -- --logdir "out" --logsuffix "-ut.txt"
# Tests running...
ls out/
{tester_name}-{random_1}-ut.txt {tester_name}-{random_2}-ut.txt {tester_name}-{random_3}-ut.txt
```

### Notes

The proposed solution will be especially useful when dealing with CI systems, needing to consume JUint reports (where piping result to a single file wouldn't work because it won't be a valid XML):

```bash
mkdir out
cargo test -- -Z unstable-options --format junit --report-time --logdir "out" --logsuffix "-ut.xml"
# Tests running
# Let CI digest out/ dir *-ut.xml files
```

### Version

```text
cargo 1.65.0 (4bc8f24d3 2022-10-20)
```
Repository: go
Issue: net/http/httptest: TestServer failures with `Unexpected response after close`
Labels: NeedsInvestigation

```
#!watchflakes
post <- pkg == "net/http/httptest" && test == "TestServer" && `[Uu]nexpected response after close`
```

https://build.golang.org/log/8c4d32d4bbf0da2fa412f833d30a774d5e83c9d6:
```
--- FAIL: TestServer (0.27s)
    --- FAIL: TestServer/NewServer (0.04s)
        --- FAIL: TestServer/NewServer/GetAfterClose (0.01s)
            server_test.go:98: Unexpected response after close: 404 Not Found, map[Content-Length:[19] Content-Type:[text/plain; charset=utf-8] Date:[Tue, 06 Dec 2022 23:47:03 GMT] X-Content-Type-Options:[nosniff]], 404 page not found
FAIL
FAIL	net/http/httptest	0.548s
```
Repository: PowerToys
Issue: Fancy Zones span across monitors does not disable for multiple DPIs
Labels: Idea-Enhancement,Product-FancyZones

### Microsoft PowerToys version

0.65.0

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

I have 2 identical external monitors connected to my laptop... I vary between running those 2 monitors only and running 1 monitor with the notebook screen (which is different resolution & DPI from the monitors)

When I run the 2 monitors, I like to have 3 zones split evenly across the 2 screens (I use VSCode with 2 columns in the middle third)

To make that work, I have to enable zones going across monitors, which says right in the setting is only supported for identical DPIs (implying the setting should be ignored/disabled when my DPIs differ)

### ✔️ Expected Behavior

when I switch to 1 monitor & the notebook screen, because the monitor DPIs are no longer identical, I should see zones as if that setting were off until I switch back to identical DPIs again

### ❌ Actual Behavior

the setting is still honored even though the hardware doesn't match its requirements & I have to manually turn it on & off every time I switch (once I flip that setting, the zone map does switch automatically... it's just so annoying to have to open the settings at the beginning & end of every work day)

### Other Software

_No response_
Repository: godot
Issue: BitMap.opaque_to_polygons can still create invalid polygons
Labels: bug,topic:core,topic:2d

### Godot version

4.0.dev (30800d20f452015c054dc7d1d7cfd38362fe28ff)

### System information

Windows 10, Forward+, NVIDIA GeForce GTX 1050 Ti (31.0.15.1694)

### Issue description

`BitMap.opaque_to_polygons` can create invalid polygons when epsilon is higher than 0; which if added as a child to a collision node will produce the following error
```
Convex decomposing failed!
<C++ Source>   core\math\geometry_2d.cpp:53 @ Geometry2D::decompose_polygon_in_convex()
```

Some examples of images that produced invalid polygons with Epsilon = 2. The polygons can be seen by the red lines. Some of these examples include shapes that didn't even produce a single polygon. These will not throw an error, but I believe they are part of the same bug.

![broken-polygons](https://user-images.githubusercontent.com/10490534/206214819-2733140e-f666-442a-9ff9-a203e304bc4f.jpg)
![broken-polygons-2](https://user-images.githubusercontent.com/10490534/206214839-45a2d3b1-a32f-4e19-9825-8c52b9f6c720.jpg)
![invalid-polygons](https://user-images.githubusercontent.com/10490534/206214875-08fafccc-c76a-4315-afc3-eba012f671fb.png)

### Steps to reproduce

- Create an Image node with opaque pixels in certain configurations
- Create a BitMap node
- Use BitMap.create_from_image_alpha to create an bitmap based on the image
- Use BitMap.opaque_to_polygons with Epsilon higher than 0 (I have used 2 in my tests) to create polygons based on the opaque pixels in the image
- Add the polygons as children to a collision object like Area2D, RigidBody2d, etc
- If the image contained configurations that lead to invalid polygons, Godot will throw the error listed above.

### Minimal reproduction project

This project is a drawing tool that lets you draw on a 16x16 canvas and have the polygons be generated on the fly. This makes it easy to produce broken polygons, and see the errors thrown by the game. Create any of the shapes in the images above, or try to draw your own.

Shortcuts:
- F - fill the square with Color.WHITE
- C - fill the square with Color.TRANSPARANT
- Left Mouse - draw a pixel
- Right Mouse - remove a pixel

[Opaque To Polygons Bug.zip](https://github.com/godotengine/godot/files/10177243/Opaque.To.Polygons.Bug.zip)
Repository: ant-design
Issue: Having an option to make the action triggers on submenu both hover and click and make the title for submenu interactive
Labels: Inactive

### What problem does this feature solve?

Currently i was working on a navbar that required where i was building a nested submenu where sometimes i wanted to trigger the submenu by hover and sometimes by click 

### What does the proposed API look like?

In each submenu we can keep an optional api that specifies the trigger action for a submenu

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: Emmet Wrap with Abbreviation Does Not Remember Previous Value
Labels: feature-request,emmet

Type: <b>Feature Request</b>

Each time the Wrap with Abbreviation command is executed, you must retype the abbreviation.

This requires extra effort when performing multiple "wrap" operations.

I would like VS Code to populate the abbreviation field with the last-used value.

VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No


<!-- generated by issue reporter -->
Repository: stable-diffusion-webui
Issue: [Feature Request]: SD Image Variations
Labels: enhancement,extension-request

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Implement @buntworthy's SD Image Variation Pipeline

![image](https://user-images.githubusercontent.com/7775917/206236422-a9dcef58-61c7-47cc-ad94-c66360d8a371.png)


https://twitter.com/Buntworthy/status/1600518238240055296

https://huggingface.co/lambdalabs/sd-image-variations-diffusers

### Proposed workflow

1. Go to img2img
2. Press "variations"
3. Get results


### Additional information

_No response_
Repository: PowerToys
Issue: [Peek] Investigate need for mouse and touch navigation
Labels: Product-Peek
Repository: PowerToys
Issue: [Peek] Drag & Drop
Labels: Product-Peek

Enable dragging the preview and dropping it into external apps.
Repository: pytorch
Issue: FX graph mode quant: backendconfig configuration missing for torch.nn.GRU
Labels: oncall: quantization,triaged

### 🐛 Describe the bug

`torch.nn.GRU` should be in https://pytorch.org/docs/1.13/quantization-backend-configuration.html, for dynamic quantization but it is not.  We should add it.  Note: other recurrent layers are already there.

This was reported in https://discuss.pytorch.org/t/quantization-not-decreasing-model-size-static-and-qat/87319/11

### Versions

master

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @jgong5 @Xia-Weiwen @leslie-fang-intel
Repository: vscode
Issue: Filter completion client-side even if the LSP returns incomplete results
Labels: suggest,under-discussion

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Using [rust-analyzer](https://github.com/rust-lang/rust-analyzer), the LSP server could return partial results for completions, where typing additional characters could cause more completions to show that were not visible in the first batch.

Currently, the completion popup looks like this:

https://user-images.githubusercontent.com/24739403/200195434-a77e619b-ed20-41a2-959d-fe88b44fcf7f.mov

There would be a discrepancy between the user's expectations and the actual completions shown, since the filter operation is noticeably delayed.

If the completion results were not marked as incomplete, it would look like this:

https://user-images.githubusercontent.com/24739403/200195443-1b9c5c57-9e68-4eb9-9d86-39a4e2f7e332.mov

The client would filter the results directly.

Ideally, the client would filter the results directly even if the server returns an incomplete set, while showing a loading indicator. Then, once the server responds with the next batch of completions after server-side filtering is complete, the completion results would be updated with the final value. This would behave similar to IntelliJ's completion display.
Repository: PowerToys
Issue: [Peek] Context menu
Labels: Product-Peek

Add context menu on previews.



![Image](https://user-images.githubusercontent.com/16784153/206256091-163eedf5-bfc7-45be-9dbb-5758dd41598a.png)
Repository: PowerToys
Issue: [Peek] Print command
Labels: Product-Peek

Enable print functionality for any previewer.
Repository: PowerToys
Issue: [Peek] Copy as path command
Labels: Product-Peek
Repository: PowerToys
Issue: [Peek] Share command
Labels: Product-Peek
Repository: PowerToys
Issue: [Peek] Open with command
Labels: Product-Peek
Repository: PowerToys
Issue: [Peek] Properties command
Labels: Product-Peek

Open File Explorer properties dialog
Repository: PowerToys
Issue: [Peek] Click on file name to rename command
Labels: Product-Peek
Repository: PowerToys
Issue: [Peek] Accessibility (narrator + tabbing order)
Labels: Product-Peek
Repository: PowerToys
Issue: [Peek] Investigate if we can open on secondary monitor
Labels: Product-Peek
Repository: pytorch
Issue: IValue(c10::List<IValue>) constructor is confusing and undocumented
Labels: module: internals,triaged

### 📚 The doc issue

Constructing `IValue` from `std::vector<IValue>` is not possible at the moment, or otherwise esoteric and undocumented.

For collections of tensors, one can simply create a vector<Tensor> and pass them in to an overloaded IValue constructor. For instance, assuming `data` is a C-style Tensor array whose length is described by `num_datums`, one can write:

```
std::vector<torch::Tensor> inputs;
for (int i = 0; i < num_datums; i++) inputs.push_back(*data[i]);
*output = new torch::IValue(inputs);
```

My expectation is that the same would be true for vector<IValue>, i.e., assuming data is now a C-style IValue array, I would expect to be able to write:

```
std::vector<torch::IValue> inputs;
for (int i = 0; i < num_datums; i++) inputs.push_back(*data[i]);
*output = new torch::IValue(inputs);
```

However, this results in a compilation error:

```
static_assert(!std::is_same<T, IValue>::value, "This constructor is not valid for List<IValue>. Please use c10::impl::GenericList(elementType) instead.");
```

It is likewise impossible to replace vector with any form of `c10::List` or `c10::GenericList` for the exact same reason. A basic stack allocation of either of those structures, such as

```
c10::impl::GenericList inputs;
```

yields the exact same compilation error.

What is the expected way to create an IValue with a list of other IValue instances?

### Suggest a potential alternative/fix

_No response_

cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh
Repository: next.js
Issue: import '@docsearch/css' not working in Next.js 13 appDir
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 18.12.1
      npm: N/A
      Yarn: N/A
      pnpm: 7.18.0
    Relevant packages:
      next: 13.0.7-canary.1
      eslint-config-next: 13.0.7-canary.1
      react: 18.2.0
      react-dom: 18.2.0

### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue

\\/

### To Reproduce

## Steps to reproduce

1. `npm i @docsearch/react`
2. `import '@docsearch/css'` in `layout.tsx`
3. `import { DocSearch } from '@docsearch/react'` in `page.tsx`
4. See error

### Describe the Bug

I am importing `@docsearch/css` in a `layout.tsx` file in the `/app` directory. The CSS is not being loaded.

### Expected Behavior

I would expect it to work the same as in `_app.tsx` in the `/pages` directory.

### Which browser are you using? (if relevant)

Chrome 108.0.5359.99

### How are you deploying your application? (if relevant)

Vercel
Repository: PowerToys
Issue: [Peek] Optimize file querying for large folders
Labels: Product-Peek

### Description of the new feature / enhancement

Make file querying faster when navigation has folder-wide scope.

### Scenario when this would be used?

Peek's navigation feature can be take a very long time to be enabled upon peek activation in folders with 1000s of items.

### Supporting information

_No response_
Repository: PowerToys
Issue: [Shortcut Guide] Improve duration settings names
Labels: Idea-Enhancement,Product-Settings,Area-User Interface

### Microsoft PowerToys version

0.65.0

### Installation method

GitHub

### Running as admin

No

### Area(s) with issue?

Settings, Shortcut Guide

### Steps to reproduce

The two duration settings in Shortcut Guide are looking nearly like the same.

### ✔️ Expected Behavior

Improved settings names that are short and clearly different.

### ❌ Actual Behavior

![image](https://user-images.githubusercontent.com/61519853/206262983-121e0e69-8df8-4c4a-8eac-5d879611ce07.png)


### Other Software

_No response_
Repository: PowerToys
Issue: create shortcuts to turn off features or be able to pass parameters to the .exe of the application
Labels: Needs-Triage

### Description of the new feature / enhancement

Hi how are things? I come to know if it can be done or if not to propose this idea, to be able to turn off and on functionalities through a direct access or if not to pass them parameters through the console to do the same previously commented task,
since it would be great to avoid having to write on behalf of an executable if it is a game or application that we are testing. I hope you understand what I am trying to say. The parameter in console would be useful to create .
bat to run those parameters so you don't have to open Power Toys and search for the functionality to turn it off as it gets tedious. It would even be nice if you try to turn off a feature when it's already turned off or vice versa, it returns an error to make a shortcut that is a switch on your desktop for that feature.

### Scenario when this would be used?

when you are testing an application you don't know if you are going to stay and automate actions

### Supporting information

_No response_
Repository: godot
Issue: Godot 4 terrain set auto-tiles not updating adjacent tiles consistently
Labels: bug,topic:editor,regression,topic:2d

### Godot version

v4.0.beta7.mono.official [0bb1e89fb]

### System information

Windows 11 Pro

### Issue description

Godot 4's auto-tiling/terrain sets appears to behave significantly worse than those of Godot 3.

When painting using auto-tiling in Godot 3, surrounding tiles adapt and update to the correct versions according to the bitmask correctly. In Godot 4, I have to go over them multiple times, which makes the process needlessly tedious. I've attached videos demonstrating how it works in Godot 3, and how it currently works in Godot 4.

[Godot 3 example](https://user-images.githubusercontent.com/69521518/206269789-8b0e8cea-ac61-4e5c-a185-5ec0218568b5.mp4)
[Godot 4 example](https://user-images.githubusercontent.com/69521518/206269784-e124c60a-44fe-4ca7-bf9c-1309abdcdc69.mp4)

### Steps to reproduce

See the videos linked in the issue for more detail, but simply draw various shapes, and note how in Godot 4, adjacent tiles seem to rarely update to the correct tiles according to the specified bitmask.

### Minimal reproduction project

[GD4Tilemap.zip](https://github.com/godotengine/godot/files/10179141/GD4Tilemap.zip)

I've also included the Godot 3 test project as a point of illustration.
[GD3Tilemap.zip](https://github.com/godotengine/godot/files/10179149/GD3Tilemap.zip)
Repository: flutter
Issue: [integration_test] Allow integration tests to share app instance
Labels: framework,c: proposal,f: integration_test,P3,team-framework,triaged-framework

Hi :) Recently I tried to add some integration tests to my project, and so I tried to follow the official docs [(link)](https://docs.flutter.dev/testing/integration-tests).

Is there a possibility to maintain the app state (a.k.a keep the app running) between different tests?

Imagine the following tests scenario:

```
group('LoginFlow -', () {
  final emailInput = find.byKey(const Key('email_input'));
  final passwordInput = find.byKey(const Key('password_input'));
  final startButton = find.byKey(const Key('start_button'));
  final submitButton = find.byKey(const Key('submit_button'));
  final homeScreen = find.byKey(const Key('home_screen'));

  testWidgets('can go to login form from the start screen', (tester) async {
    await app.main();
    await tester.pumpAndSettle();

    expect(startButton, findsOneWidget);

    await tester.tap(startButton);
    await tester.pumpAndSettle();

    expect(emailInput, findsOneWidget);
    expect(passwordInput, findsOneWidget);
  });

  testWidgets('can fill login form and go to home screen', (tester) async {
    await tester.enterText(emailInput, 'example@email.com');
    await tester.enterText(passwordInput, 'Password123');

    await tester.tap(submitButton);
    await tester.pumpAndSettle();

    expect(homeScreen, findsOneWidget);
  });
});
```

This scenario doesn't work, because the app is terminated after the first `testWidgets(...)` ends. In order to make it work, we have to run `app.main()` again in the second test, and go through all the steps that we did in the first test, which is not optimal (we are now duplicating the code). 

With flutter_driver this was the default behaviour (the second test would start where the first one ended) which makes sense for e2e integration testing, as the next test usually depends on the result of the previous one.

Is achieving something like this possible with the new integration_test api? I though I could maybe have the `app.main()` be called from outside the testWidgets (like in the `group()` or even at the top of `main` function in the test file) but that causes even the first test to fail.

I do have to call app.main() instead of just passing a widget to pumpWidgets since I have some important setup code that runs in the real app before the `runApp` method.