sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Borrow checker bug with double borrow
Labels: T-compiler,C-bug,fixed-by-polonius

<!--
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.
-->
Hi,

I came across following weird borrow check behaviour.
If you uncomment `elements = &mut elements[idx].children;` and comment line below, program compiles ok. I think this is a bug.

I tried this code:

```rust
struct Root {
    children: Vec<Node>,
}

struct Node {
    name: String,
    children: Vec<Node>,
}

fn merge_tree(root: &mut Root, path: Vec<String>) {
    let mut elements = &mut root.children;

    for p in path.iter() {
        for (idx, el) in elements.iter_mut().enumerate() {
            if el.name == *p {
                // elements = &mut elements[idx].children;
                elements = &mut el.children;
                break;
            }
        }
    }
}
```

I expected to see this happen: No compiler error.

Instead, this happened: Following compiler error:
```
error[E0499]: cannot borrow `*elements` as mutable more than once at a time
  --> src/main.rs:29:26
   |
29 |         for (idx, el) in elements.iter_mut().enumerate() {
   |                          ^^^^^^^^^^^^^^^^^^^
   |                          |
   |                          `*elements` was mutably borrowed here in the previous iteration of the loop
   |                          first borrow used here, in later iteration of loop
```

### Meta
<!--
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.
-->

`rustc --version --verbose`:
```
rustc 1.67.1 (d5a82bbd2 2023-02-07)
binary: rustc
commit-hash: d5a82bbd26e1ad8b7401f6a718a9c57c96905483
commit-date: 2023-02-07
host: aarch64-apple-darwin
release: 1.67.1
LLVM version: 15.0.6
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
N/A
```

</p>
</details>
Repository: vscode
Issue: Toggling Zen Mode makes terminal labels disappear
Labels: bug,terminal-tabs,terminal-persistence

Type: <b>Bug</b>

1. Create multiple terminals so that a label is shown to identify each terminal.
2. Enter Zen Mode.
3. Exit Zen Mode.

The terminal labels disappear. If cmd-` is pressed, instead of closing the terminal panel like it normally would, it causes the terminal labels to reappear.

![Kapture 2023-03-03 at 10 30 36](https://user-images.githubusercontent.com/7798945/222801066-f340d25a-676a-4d76-8923-32d5835e0c10.gif)

VS Code version: Code 1.75.1 (Universal) (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:34:59.000Z)
OS version: Darwin arm64 22.3.0
Modes:
Sandboxed: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Apple M2 Max (12 x 24)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|2, 2, 2|
|Memory (System)|64.00GB (25.92GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (29)</summary>

Extension|Author (truncated)|Version
---|---|---
gltf-vscode|ces|2.3.16
vscode-markdownlint|Dav|0.49.0
gitlens|eam|13.3.1
prettier-vscode|esb|9.10.4
go|gol|0.38.0
isort|ms-|2022.8.0
python|ms-|2023.4.0
vscode-pylance|ms-|2023.3.10
jupyter|ms-|2023.1.2010391206
jupyter-keymap|ms-|1.1.0
jupyter-renderers|ms-|1.0.14
vscode-jupyter-cell-tags|ms-|0.1.6
vscode-jupyter-slideshow|ms-|0.1.5
remote-containers|ms-|0.282.0
remote-ssh|ms-|0.98.0
remote-ssh-edit|ms-|0.84.0
remote-wsl|ms-|0.75.3
cpptools|ms-|1.14.4
remote-explorer|ms-|0.2.0
vscode-commons|red|0.0.6
vscode-yaml|red|1.11.0
vscode-sort-json|ric|1.20.0
rust-analyzer|rus|0.3.1418
crates|ser|0.5.10
shader|sle|1.1.5
rewrap|stk|1.16.3
cmake|twx|0.0.17
vim|vsc|1.25.2
clang-format|xav|1.9.0


</details>
<!-- generated by issue reporter -->
Repository: godot
Issue: Editor: Unable to set export_exp_easing variable to 0
Labels: bug,topic:editor

### Godot version

4.0.stable

### System information

Pop!_OS 22.04

### Issue description

When using @export_exp_easing, the editor doesn't allow the value to be set to 0. When trying to drag the curve to the left most position or directly entering the value 0 in the input field, the value is actually 0.0001 or something similar.


### Steps to reproduce

1. Create a node with script
2. Use @export_exp_easing on a variable
3. Set the value to something else than 0 and save
4. Try setting the value to 0 again in the editor

[Screencast from 03-03-2023 08:12:15 PM.webm](https://user-images.githubusercontent.com/29783330/222807250-aa5ed957-21d9-404d-8178-9d431ef7378e.webm)


### Minimal reproduction project

[ExportExpEasingIssue.zip](https://github.com/godotengine/godot/files/10885424/ExportExpEasingIssue.zip)
Repository: flutter
Issue: How is ImmutableBuffer intended to be used?
Labels: framework,d: api docs,a: images,P2,team-framework,triaged-framework

See https://stackoverflow.com/q/73580628/.

[`ImageProvider.load`](https://api.flutter.dev/flutter/painting/ImageProvider/load.html) is deprecated in favor of [`ImageProvider.loadBuffer`](https://api.flutter.dev/flutter/painting/ImageProvider/loadBuffer.html).  One of the things that `ImageProvider.load` allowed people to do was to provide a `DecoderCallback` that manipulated the byte data first.  `ImageProvider.loadBuffer`'s `DecoderBufferCallback`, however, is invoked with an [`ImmutableBuffer`](https://api.flutter.dev/flutter/dart-ui/ImmutableBuffer-class.html), which is an opaque class.  It has a `length` accessor to get the length of the underlying data but provides no obvious means to actually access the underlying data.  What is the `DecoderBufferCallback` supposed to do with it?

The example cited by the StackOverflow question is probably questionable (it decodes the image data, manipulates pixels, and re-encodes it for it to be decoded again).  But nevertheless, it's not clear how a `DecoderBufferCallback` is supposed to be implemented.  The [migration instructions](https://docs.flutter.dev/release/breaking-changes/image-provider-load-buffer) don't show that.
Repository: storybook
Issue: [Feature Request]: Configurable sentence casing for auto titles
Labels: feature request

### Is your feature request related to a problem? Please describe

The content guidelines we have for the Carbon Design System outline that our content, including our own documentation, should always be [sentence cased](https://carbondesignsystem.com/guidelines/content/writing-style/#use-sentence-case-capitalization):

> Use sentence–case capitalization for all UI text elements. This style is predominantly lowercase. Capitalize only the initial letter of the first word in the text and other words that require capitalization, such as proper nouns. For example, labels in a form would be written as “First name” and “Email address”.

Story exports are automatically "start cased" (myStory becomes "My Story"), with no option to reconfigure this (that I'm aware of).

### Describe the solution you'd like

It would be nice if there was a way to globally configure all story exports to be sentence cased instead of start cased.

### Describe alternatives you've considered

To make sure our story names to adhere to this we have to rename every story via `myName.storyName` or in upcoming v7 with

```
export const myStory = {
  name: 'My story',
}
```

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

_No response_
Repository: go
Issue: x/pkgsite: missing `added in` label for type in runtime/cgo package
Labels: pkgsite

<!--
Please answer these questions before submitting your issue. Thanks!

If you would like to have your package removed, please file an issue at https://golang.org/s/pkgsite-package-removal.
-->
 
### What is the URL of the page with the issue?
 
 https://pkg.go.dev/runtime/cgo

### Screenshot
 
<!--
Please paste a screenshot of the page.
-->
 
<img width="570" alt="Screenshot 2023-03-03 at 2 33 28 PM" src="https://user-images.githubusercontent.com/18269441/222810343-e1cacdc1-d14b-4672-8e75-6b090019dec3.png">
  
### What did you expect to see?
 
 A label indicating that `type Handle` was added in go1.17.
 
### What did you see instead?

No label.
Repository: terminal
Issue: We should add an option to paste and switch the slashes around
Labels: Area-Settings,Product-Terminal,Issue-Task

This was in a mail thread earlier this week:

> Say that I copy this path
> `onecore/foo/bar/baz.dll`
> 
> I want it to end up like this:
> `onecore\foo\bar\baz.dll`
> 
> Or vice versa. Is there a specific keyboard shortcut that would allow me to translate the path in the clipboard to the final format easily, without having to pop into an editor and an S&R?
> 


At first I was like "I mean that's kinda silly" 

But I've had to copy/paste paths out of `git status` back into `del` commands a few times since then and you know what? I think this is a good idea now. 

Questions:

* What do we name it?
* Do we support `\` -> `/`? 
* Presumably we don't want to do this just for _paths_, since `onecore/foo/bar/baz.dll` might not be a local path we can sanitize. In fact let's not confuse this with path sanitation at all
* this is literally just `"replaceSlashes": "\"`
Repository: PowerToys
Issue: Implement time period reset in PowerToys Awake
Labels: Idea-Enhancement,Product-Awake

### Description of the new feature / enhancement

Love this feature! I use it every day.

I have two suggestions on how to improve it. 
1) Instead of / in addition to the on-off toggle, have a "reset" button which refreshes the period which will start the period again. This will save turning off then on every time I want a new 3hrs
2) Create a Chrome widget to save having the PowerToys window open all the time. Probably more work than it's worth - but I'd love it if you did do this.

I have also foun FancyZone and Color Picker to be useful, 

### Scenario when this would be used?

As described, the "refresh" will reduce key strokes when I want to start the awake period.

The widget will help keep my taskbar neat.

### Supporting information

_No response_
Repository: flutter
Issue: Update `TestPlatformDispatcher` to use the same API as `TestFlutterView`
Labels: a: tests,framework,P2,team-framework,triaged-framework

`TestPlatformDispatcher` is using the same API patterns as `TestWindow`, which are a little cumbersome. With 
#121549, we introduced some cleaner patterns for `TestFlutterView`, namely:

* Instead of the setters all using `<propertyName>TestValue`,  setters were added for each of the property names
* Instead of using `clear<properyName>TestValue` to reset values, the names are `reset<propertyName>`
  * This was to be more explicit that the value wasn't being clear, but reset to the backing item's value
* `clearAllTestValues` was replaced with `reset`
  * Similar reasoning to the clear method name justifications above

## Proposal

Update `TestPlatformDispatcher` to use the same patterns as `TestFlutterView` for the improved readability, usability, and consistency.
Repository: opencv
Issue: when building the project without IPP_IW error occurs (sorry for non structured bug report but I really don't have time for it)
Labels: bug,category: imgproc,category: build/install,platform: win32

### System Information

opencv git repo: https://github.com/opencv/opencv/tree/4.7.0
Branch: 4.X
Building X64 with CMake 3.15.3 for Visual Studio 2019 on Windows 10



### Detailed description
Error when building opencv_imgproc.vcxproj
19>D:\source\opencv\modules\imgproc\src\imgwarp.cpp(2664): error C4716: 'cv::ipp_warpAffine': must return a value

imgwarp.cpp    line 2602    function:
static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation, int borderType, InputArray _M, int flags )
{
#ifdef HAVE_IPP_IW
    ...
    ...
   ..
    return true;
#endif
    return false;      -> **_this return fixes it_**
}
#endif


### Steps to reproduce

[CMakeCache.txt](https://github.com/opencv/opencv/files/10885924/CMakeCache.txt)


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: godot
Issue: RigidBody2d not respecting changes in position triggered by signals
Labels: documentation,topic:physics

### Godot version

v4.0.stable.official [92bee43ad]

### System information

Window 10

### Issue description

Here's a rigidBody2d ball.  Every 4 bounces it's supposed to return to the starting position.  As you can see, it does, but only for 1 frame.

https://user-images.githubusercontent.com/89282845/222824775-067b4a20-a931-4b87-909d-409cbf9aa917.mp4

Basically, if you use signals to change positions of a rigidbody2d, it doesn't work; the object teleports to the correct position for 1 frame, then teleports back.  While the documentation says you shouldn't change the position of a Rigidbody2D 'every frame' or 'very often', it seems like if this behavior is working as intended, the documentation should instead say 'you cannot directly change the position under any circumstances'.

In principle it's possible to work around this (by caching your new position or velocity or whatever and putting it into the rigid body physics _integrate_forces function), but that makes working with signals a lot more cumbersome.  It would be a lot better if godot handled this gracefully, or (failing that) if there was a built-in cache variable (self.nextTickPosition?) or function (self.moveTo()?) to make it move to the right location on the next physics calculation.  No need to have everyone reimplement them on every rigidBody2d in their project.

### Steps to reproduce

Change the position of a rigidbody2d in a signal.  It will move to that position for exactly one frame, then return to where it was.

### Minimal reproduction project

[ballTeleportBug.zip](https://github.com/godotengine/godot/files/10885887/ballTeleportBug.zip)

Here's a minimal project.  Every 4 bounces it's supposed to return to the starting position.  As you can see, it does, but only for 1 frame.
Repository: PowerToys
Issue: Keyboard Shortcut enhancement
Labels: Needs-Triage

### Description of the new feature / enhancement

I'd like the ability to ctrl+e and have it type my email address. There are several times per day where I use my email address. Websites, logins, etc.

### Scenario when this would be used?

There are several times per day where I use my email address. Websites, logins, etc.

### Supporting information

_No response_
Repository: terminal
Issue: Port the Reflow/UIA test adapter for table-based testing to share it in-common
Labels: Product-Meta,Issue-Task,Area-CodeHealth,Priority-3

Brief and incomplete list of tests that would benefit from being table-driven:

- `ScreenBufferTests::DelayedWrapReset` introudced in #14936
Repository: flutter
Issue: [Windows] UIA Regression with Windows Narrator
Labels: a: accessibility,platform-windows,a: desktop,P2,team-windows,triaged-windows

Hitting TAB to move the focus with UIA when using Windows Narrator does not read out the newly focused item, though NVDA does.
Repository: flutter
Issue: Autogenerate launch.json
Labels: tool,P3,team-tool,triaged-tool

## Use case

For someone unfamiliar with VSCode, when following the instructions for [debugging the flutter command line tool](https://github.com/flutter/flutter/wiki/The-flutter-tool#debugging-the-flutter-command-line-tool-in-vs-code), it was not initially clear where the launch.json file resided on the file system (Note: the wiki is now updated with the missing information). In addition, any updates to the file need to be done manually. So there is potential for human error when copying and pasting.

## Proposal
Implement a package to automatically create a new and/or update an existing launch.json file.
Repository: terminal
Issue: Our MinMaxCloseControl's resources are all messed up
Labels: Help Wanted,Issue-Bug,Product-Terminal,Issue-Task,Needs-Tag-Fix,Priority-3,Area-i18n

### Windows Terminal version

 1.16.10262.0

### Windows build number

10.0.22621.0

### Other Software

_No response_

### Steps to reproduce

Hover the center of the windows' close button.


### Expected Behavior

A tooltip should appear in the local language's equivalent of "Close".

### Actual Behavior

Hovering the button shows two tooltips fade in, first the English one, then the local language's one.

![image](https://user-images.githubusercontent.com/24683548/222844614-a1996e5e-7ff6-41bb-ae21-836e01730ecc.png)

https://user-images.githubusercontent.com/24683548/222845299-ac3d37c1-e5fb-4a34-997a-f71d086ca9cd.mp4
Repository: godot
Issue: MultiplayerSpawner doesn't despawn scene ("non-dynamic") nodes
Labels: bug,topic:network

### Godot version

4.0.stable.mono.official

### System information

Windows 11

### Issue description

If the spawn path for a MultiplayerSpawner contains nodes they won't be despawned on other peers. Maybe I'm not understanding exactly how the spawner works but this makes it awkward to create levels with nodes that will eventually be removed (eg collectibles, enemies, etc).
![image](https://user-images.githubusercontent.com/6880264/222845859-d6090b08-cb02-4916-a4ce-265750ce4f71.png)
For example with SphereSpawner.spawn_path set to Objects those two spheres won't despawn when freed on the authority.

The despawning works fine if you create the nodes dynamically (eg instantiate the node and add_child on the spawn path)

### Steps to reproduce

Open the sample project, set Debug | Run Multiple Instances to 2, and start debugging. Click Host on one window and Connect on the other. Ensure the bouncing spheres are visible in both windows, focus the host's window, and press the "ui_end" key. You'll see the spheres are freed on the host but not despawned on the client.

### Minimal reproduction project

[spawner-repro.zip](https://github.com/godotengine/godot/files/10886692/spawner-repro.zip)
This is the sample project from https://godotengine.org/article/multiplayer-in-godot-4-0-scene-replication with 2 modifications:
1. Added script to sphere to `queue_free()` when multiplayer authority presses "ui_end"
2. Added a MultiplayerSpawner to `level.tscn` with SpawnPath set to `Objects`
Repository: godot
Issue: FastNoiseLite returning 0 when far from the origin
Labels: topic:core,documentation

### Godot version

4.0.stable

### System information

Arch Linux, All backends, AMD Radeon RX 6400, mesa 22.3.6-1 and vulkan-radeon 22.3.6-1

### Issue description

Trying to get noise really far away from the origin returns 0 past a certain point. This is the same for all of the types of noise and rendering backends, the only difference being the distance at which the issue happens.

As you get further away from (0, 0) the noise is lower quality, which is expected (I think?) because floats have lower precision at big values.

Close:
![image](https://user-images.githubusercontent.com/40290244/222843095-345eab87-fa1c-4777-ba0a-9e245b985b59.png)

vs Far:
![image](https://user-images.githubusercontent.com/40290244/222843291-a54761ad-4620-4e93-b9c5-a6cc590939cb.png)

However when the offset or the input to the `get_noise_Xd` functions is big enough it looks like this:
![image](https://user-images.githubusercontent.com/40290244/222844610-659ce6ee-30b1-423c-95f5-5b1728a7b1a2.png)

Increasing the frequency also lowers this radius of usable noise.

I'm not sure if this is fixable, or just needs to be pointed out in the documentation.

This could be what is causing #73574

### Steps to reproduce

1. Create a Sprite2D
2. Set it's texture to a NoiseTexture2D
3. Set the noise to FastNoiseLite
4. Increase the offset until the texture goes black. (Or I guess you could increase the texture's width/height as well)

### Minimal reproduction project

[minimal_reproduction.zip](https://github.com/godotengine/godot/files/10886760/minimal_reproduction.zip)
Repository: flutter
Issue: Reorganize `TestWindow`, `TestFlutterView`, and `TestPlatformDispatcher`
Labels: a: tests,framework,P2,team-framework,triaged-framework

Currently, all of these file exist in `window.dart`. With window being deprecated, it'd be a good idea to move these classes into a better file structure.

## Proposal

* Move `TestWindow` and `TestFlutterView` into `view.dart`
* Move `TestPlatformDispatcher` into `platform_dispatcher.dart`
* Update all references to `window.dart` to point to the new locations.
Repository: next.js
Issue: App folder: styles applied after delay on prefetched pages
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.13.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.2.4-canary.1
      eslint-config-next: N/A
      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

https://github.com/Arctomachine/next-prefetch-css-modules-bug

### To Reproduce

1. `next build` && `next start`
2. Navigate to /posts page

### Describe the Bug

Prefetched pages are not applying styles instantly after transition. At first only raw html is loaded without any styles. Then styles are loaded and applied. It makes visible flickering on such pages.
It happens with css modules, as style files for modules are only loaded when their respective components are accessed. But since prefetched page already has required data, it can show page contents faster than styles are being loaded.
The further server is from user, the longer it takes for styles to be applied.

Hosted reproduction: https://next-prefetch-css-modules-bug.vercel.app/

### Expected Behavior

Transition to prefetched page should apply styles before showing page contents.

### Which browser are you using? (if relevant)

any

### How are you deploying your application? (if relevant)

next start