sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Suggest dereferencing smart pointers to satisfy mismatched types [E0308] in match argument
Labels: A-diagnostics,T-compiler

<!--
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 -->

```rust
use std::pin::Pin;

enum ExampleEnum {
    First,
}
use ExampleEnum::*;

fn resume(mut var: Pin<&mut ExampleEnum>) {
    match var {
    ExampleEnum::First => ()
    };
}

fn main() {}

```
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=629109fcd26aa8757894e600bfe31f42

The current output is:

```

error[E0308]: mismatched types
  --> src/main.rs:10:5
   |
4  |     First,
   |     ----- unit variant defined here
...
9  |     match var {
   |           --- this expression has type `Pin<&mut ExampleEnum>`
10 |     ExampleEnum::First => ()
   |     ^^^^^^^^^^^^^^^^^^ expected struct `Pin`, found enum `ExampleEnum`
   |
   = note: expected struct `Pin<&mut ExampleEnum>`
                found enum `ExampleEnum`

For more information about this error, try `rustc --explain E0308`.
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```

error[E0308]: mismatched types
  --> src/main.rs:10:5
   |
4  |     First,
   |     ----- unit variant defined here
...
9  |     match var {
   |           --- this expression has type `Pin<&mut ExampleEnum>`
10 |     ExampleEnum::First => ()
   |     ^^^^^^^^^^^^^^^^^^ expected struct `Pin`, found enum `ExampleEnum`
   |
   = note: expected struct `Pin<&mut ExampleEnum>`
                found enum `ExampleEnum`

Hint: Try `match *var` to use `Pin<ExampleEnum`'s DeRef<Target=ExampleEnum> implementation to obtain a &ExampleEnum from Pin<ExampleEnum>.

For more information about this error, try `rustc --explain E0308`.
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
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: node
Issue: @hapi/hapi broken on master
Labels: regression

### Version

master at 9e904470f4755eeb122be27632ff1350c35af17a

### Platform

Linux mcws 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

### Subsystem

_No response_

### What steps will reproduce the bug?

Build Node.js from master, then

```
$ ../node/node ./node_modules/.bin/lab -a @hapi/code -t 100 -L -m 5000


  ..................................................
  ..................................................
  ..................................................
  ..........................-.......................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..................................................
  ..x...............................................
  ...........--.....................................
  .......................^C
``` 

The test hang for a while.

### How often does it reproduce? Is there a required condition?

every single time

### What is the expected behavior?

test should pass

### What do you see instead?

_No response_

### Additional information

_No response_
Repository: pytorch
Issue: waste too much time in first two pictures
Labels: needs reproduction,triaged

I don't know why, I set one picture after another. For some models, the first picture takes 7.8 seconds, and the second picture takes 1.2 seconds. For some models, the first picture takes several hundred milliseconds, and the second picture even takes 30 seconds.  But oddly enough, after the first two pictures, all of them were normal, and the total time was only a few tens of milliseconds.  
 
Do not know whether there is a same problem, find the reason, reasoning time to find the reason can not start ah!  
```
Device type is: cuda
过程1时间: 16 ms
过程2时间: 263 ms       <----
过程3时间: 12 ms
---------------------------------
过程1时间: 10 ms
过程2时间: 11477 ms    <----
过程3时间: 13 ms
---------------------------------
过程1时间: 12 ms
过程2时间: 7 ms
过程3时间: 16 ms
---------------------------------
过程1时间: 5 ms
过程2时间: 7 ms
过程3时间: 18 ms
---------------------------------

```
Repository: rust
Issue: `$pat` followed by a `:` is used in the language, but isn't allowed for MBE
Labels: A-macros,C-bug

<!--
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.
-->

I tried this code:

```rust
struct Struct {
    field: i32,
}

// Clearly patterns followed by a `:`
fn test(
    _: Struct,
    Struct { .. }: Struct,
    Struct { field }: Struct,
    Struct { field: _ }: Struct,
    Struct { field: aaaa }: Struct,
) {
    let _: Struct = panic!();
}

macro_rules! test {
    // This is allowed for both `let` and function arguments.
    // But not allowed for macros...
    (let $p:pat : $T:ty = $e:expr) => {}
}
```
([play](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b94b1f7026aea55367d39ec0bf786929))

I expected this code to compile, instead, it fails with the following error: 

```
error: `$p:pat` is followed by `:`, which is not allowed for `pat` fragments
  --> src/main.rs:20:17
   |
20 |     (let $p:pat : $T:ty = $e:expr) => {}
   |                 ^ not allowed after `pat` fragments
   |
   = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
```

It's very weird that the language uses patterns followed by a `:`, but macros-by-example (aka `macro_rules!`, declarative macros, etc) can't parse it.

### 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.56.0-nightly (2827db2b1 2021-08-01)
binary: rustc
commit-hash: 2827db2b137e899242e81f1beea39ae26e245153
commit-date: 2021-08-01
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1
```
Repository: yt-dlp
Issue: [Feature Request] Streamlined bug reporting
Labels: docs/meta/cleanup

I don’t like this project’s issue templates.  They are full of obnoxious boilerplate, which is annoying to scroll through when browsing reports and makes them less readable (it sometimes takes me half a minute to realise an issue report contains nothing but a blank template).  They abuse GitHub’s checkboxes feature (meant for progress tracking) for bug reporting checklists.  And the worst part is that they aren’t even particularly effective at what they are supposed to do.  People routinely screw up bug reports by:
- ignoring the template entirely
- leaving out the console output
- posting only part of the console output
- posting *screenshots* of the console output
- forgetting to use the `--verbose` option
- leaving out even *which site* they have a problem with
- leaving in placeholder text like ‘WRITE DESCRIPTION HERE’
- putting the `x` character in brackets *next to* the space instead of replacing the space, breaking checkbox rendering
- using Unicode checkmarks ‘✔’ instead of an ASCII `x`, breaking checkbox rendering

And as people are flocking in here from upstream, which is apparently completely dead now (they haven’t had a commit for a month), this is only going to get worse.  So I think this should be addressed promptly to avoid lots of wasted time, both on the maintainers’ part and reporters’.

So my idea is to add a `--bug-report` option that:
- automatically checks if yt-dlp is at the latest version
- automatically turns on `--verbose` (or even an extra-verbose mode that also lists all available formats)
- captures all console output into a variable
- uses `http.server` to serve up a simple HTML page which contains all captured information so far and a questionnaire for the user
- uses `webbrowser` to open this HTML page in the user’s browser, where the report is **validated** and then posted to GitHub

(Alternatively, we could use Tkinter instead opening a browser, but we would still have to open a web browser eventually to allow the user to log in and submit the report to GitHub.)

A pre-formatted bug report can be sent to GitHub in a GET parameter, e.g. <https://github.com/yt-dlp/yt-dlp/issues/new?title=foo&body=bar>.  This allows about 8K of data to fit in.  We could try to find a workaround if that proves too tight; in the worst case, we could copy the markup into the clipboard and tell the user to paste it into the issue report form.

The resulting report would have all the boilerplate hidden inside a `<details>` tag, to make it less obstructive.  We could then direct people to use the `--bug-report` option to report bugs instead of opening GitHub directly and messing with issue templates.

We could also have a GitHub Action script that checks if issue reports have all the necessary boilerplate in, and *promptly* asks the user to fill in missing information.
Repository: ant-design
Issue: Popover、Anchor 组合使用出现异常
Labels: Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/congfucengneiguanbi-antd41610-forked-5sp5f?file=/index.js)

### Steps to reproduce
1. 点击右下 Click me 按钮，Popover 内容正常出现
2. 再次点击 Click me 按钮，Popover 内容出现在异常位置后恢复

### What is expected?
每次点击后 Popover 内容出现位置正常

### What is actually happening?
第二次点击后 Popover 异常

| Environment | Info |
|---|---|
| antd | 4.16.10 |
| React | 16.14.0 |
| System | mac |
| Browser | chrome 92.0 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: Quick open scene should favor beginning of the name
Labels: enhancement,topic:editor,usability

### Godot version

3.4 beta / 3c21fc5

### System information

W10

### Issue description

This has bothered me for a while and I have a concrete example that illustrates the problem:
![image](https://user-images.githubusercontent.com/2223172/128015345-be78c140-89ae-4f20-9756-6e6b8397ff67.png)
I wanted to open the `Workshop.tscn`, which is 5th result on the list, even though I searched for it specifically. This is similar problem to #21726. The results should be sorted by relevance, i.e. better match near the beginning, instead of just alphabetically.

### Steps to reproduce

1. Have e.g. Workshop.tscn and IconWorkshop.tscn
2. Try to quick open Workshop.tscn

### Minimal reproduction project

_No response_
Repository: node
Issue: compile node with --dest-cpu=x86 on Linux x86_64 got error `recipe for target mksnapshot、node_g failed`
Labels: build

### Version

v10.24.0

### Platform

Linux thp3 4.14.0-kali3-amd64 #1 SMP Debian 4.14.17-1kali1 (2018-02-16) x86_64 GNU/Linux

### Subsystem

_No response_

### What steps will reproduce the bug?

```console
> ./configure --debug --dest-cpu=x86
> make -j4
```


### How often does it reproduce? Is there a required condition?

_No response_

### What is the expected behavior?

compile successfully

### What do you see instead?

```console
g++ -o /root/Documents/node-10.24.0/out/Debug/mksnapshot -pthread -rdynamic -m32 -m32  -Wl,--start-group /root/Documents/node-10.24.0/out/Debug/obj.host/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_base.a /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_init.a /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_libbase.a /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_libplatform.a /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_nosnapshot.a /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_libsampler.a /root/Documents/node-10.24.0/out/Debug/obj.host/tools/icu/libicutools.a /root/Documents/node-10.24.0/out/Debug/obj.host/deps/v8/gypfiles/libv8_initializers.a -ldl -lrt -Wl,--end-group
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
deps/v8/gypfiles/mksnapshot.host.mk:178: recipe for target '/root/Documents/node-10.24.0/out/Debug/mksnapshot' failed
make[1]: *** [/root/Documents/node-10.24.0/out/Debug/mksnapshot] Error 1
Makefile:103: recipe for target 'node_g' failed
make: *** [node_g] Error 2
```

### Additional information

_No response_
Repository: react
Issue: Question: Why `propagateContextChanges` not restore the `workInProgress.child.return` pointer?
Labels: Type: Discussion,React 18

<!--
  Ask a question or share feedback about the React 18 release here.
-->
This  is the code from `ReactFiberNewContext.old.js`

https://github.com/facebook/react/blob/19092ac8c354b92c2e0e27b73f391571ad452505/packages/react-reconciler/src/ReactFiberNewContext.old.js#L319-L333

In the function `propagateContextChanges` and `propagateContextChange_eager`, the `workInProgress.child.return` is changed in the beginning, but it is not restore in the end.

In case of `propagateContextChanges`:
```js
function propagateContextChanges<T>(
  workInProgress: Fiber,
  contexts: Array<any>,
  renderLanes: Lanes,
  forcePropagateEntireTree: boolean,
): void {
  // Only used by lazy implemenation
  if (!enableLazyContextPropagation) {
    return;
  }
  let fiber = workInProgress.child;
  if (fiber !== null) {
    //  caution:  before next line , fiber.return is workInProgress.alternate
    fiber.return = workInProgress;
   // after this line, fiber.return = workInProgress
  }
  
  // ... omit the other code
  // but in the end, there is no code to restore the  workInProgress.child.return
  // maybe like this:
  workInProgress.child.return = workInProgress.alternate;
}

```
I think the `workInProgress.child` is same as `workInProgress.alternate.child` at this time.

If the `workInProgress.child.return` not restore, though the `workInProgress tree` is no difference , but maybe the `current tree` is broken?

I'm confused about it some days, could anyone explain it?
Repository: pytorch
Issue: Feature request: Generate Sobol points directly on the GPU
Labels: module: distributions,feature,module: cuda,triaged,module: tensor creation

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
A method to generate a Tensor of Sobol points directly on the GPU, rather than the current implementation which creates the Sobol points on CPU which must then be transferred to GPU. 

## Motivation
Many PyTorch users utilizing Sobol points would like to perform simulations with their GPU, so it would be natural to be able to generate the points on the GPU.

The 'curand' CUDA library already has Sobol implementations that generates points directly on the GPU: https://docs.nvidia.com/cuda/curand/group__DEVICE.html. 


cc @fritzo @neerajprad @alicanb @nikitaved @ngimel @gchanan @mruberry @Balandat @mikemccourt-sigopt
Repository: vscode
Issue: Label activity bar icons so we can tell what they are
Labels: feature-request,ux,layout

<!-- ⚠️⚠️ 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. -->
I keep forgetting what all of the sidebar icons mean. It would be so much easier if they were labeled with words that I can read and instantly know what they do without having to waste time hovering a mouse over each icon in order to show tooltips that describe their functions. This would increase cognitive ease and let me spend my cognitive energy doing more important things like programming.  Labels should be visible by default with the option to remove labels for people want more sidebar density and have extra cognitive energy to spend on memorizing sidebar icons.

The advantages of this user interface design convention is well researched & documented. 

*   [Yes, icons need text labels](https://www.nngroup.com/videos/icon-text-labels/)
*   [The Importance Of Labels](https://blogs.msdn.microsoft.com/jensenh/2005/11/01/the-importance-of-labels/)
*   [The best icon is a text label](https://thomasbyttebier.be/blog/the-best-icon-is-a-text-label)
*   [Icon usability](https://www.nngroup.com/articles/icon-usability/)
*   [Do icons need labels?](https://uxdesign.cc/do-icons-need-labels-6cb4f4282c00)
*   [The Obvious UI is Often the Best UI](https://medium.com/google-design/the-obvious-ui-is-often-the-best-ui-7a25597d79fd)
Repository: youtube-dl
Issue: Ways for a beginner developer to help
Labels: question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

I've been donating for yt-dl for years, now there is not a monetary donation option anymore... But I'm studying to become a software developer, is there anyway a beginner dev could help? I've searched for easy issues to solve but I think I can't help with those... Probably no experience with python doesn't help much, in my case I know C and I'm starting with Java.

What would be the main concepts in python or other technologies what would be useful to contribute to the project? Thx in advance.
Repository: storybook
Issue: Docs page not scrolling to Anchor doc block
Labels: bug,mdx,block: other,needs triage

**Describe the bug**

Adding an `<Anchor>` in an MDX page does not have any effect and does not get scrolled to.
 
**To Reproduce**

Add an anchor to an MDX page

```
<Anchor storyId="my-button--primary">
<h3>Primary</h3>
<Canvas>
    <Story id="my-button--primary" />
</Canvas>
</Anchor>
```

generates this

```
<div id="anchor--my-button-primary">
<h3>Primary</h3>
  ...
  <div id="story--my-button--primary>
  ...
</div>
```

When I click "Primary" in the sidenav menu it scrolls to  `<div id="story--my-button--primary>` and my header disappears out the top of the screen

I'm using this workaround in my MDX which works. 
```
<div id="story--my-button--primary>
<h3>Primary</h3>
<Canvas>
    <Story id="my-button--primary" />
</Canvas>
</div>
```

I would expect a check for an anchor id which would override the story id for scroll purposes

**System**

Angular 12.6.2

Environment Info:

  System:
    OS: macOS 11.5
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.5/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm
  Browsers:
    Chrome: 92.0.4515.107
    Edge: 92.0.902.55
    Firefox: 89.0.2
    Safari: 14.1.2
  npmPackages:
    @storybook/addon-a11y: ^6.4.0-alpha.22 => 6.4.0-alpha.22 
    @storybook/addon-actions: ^6.4.0-alpha.22 => 6.4.0-alpha.22 
    @storybook/addon-essentials: ^6.4.0-alpha.22 => 6.4.0-alpha.22 
    @storybook/addon-links: ^6.4.0-alpha.22 => 6.4.0-alpha.22 
    @storybook/angular: ^6.4.0-alpha.22 => 6.4.0-alpha.22 
    @storybook/builder-webpack5: ^6.4.0-alpha.22 => 6.4.0-alpha.22 
    @storybook/manager-webpack5: ^6.4.0-alpha.22 => 6.4.0-alpha.22
Repository: pytorch
Issue: Error while importing torch: libtorch_python.so: undefined symbol: PyThread_tss_alloc
Labels: module: abi,triaged

## 🐛 Bug

With libtorch in the LD_LIBRARY_PATH, import torch fails and yields the following error:
``` 
~/.local/lib/python3.6/site-packages/torch/__init__.py in <module>
    193     if USE_GLOBAL_DEPS:
    194         _load_global_deps()
--> 195     from torch._C import *
    196 
    197 # Appease the type checker; ordinarily this binding is inserted by the

ImportError: /home/weixuan/Documents/Code/libtorch/lib/libtorch_python.so: undefined symbol: PyThread_tss_alloc
```
To me, it seems that pytorch is linking against the wrong shared library (in libtorch) instead looking at its own local install.

## To Reproduce

Steps to reproduce the behavior:

1. install pytorch 1.81 + cu111 using pip install. 
2. Downlod the libtorch from https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.8.1%2Bcpu.zip
3. Execute export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/the/libtorch/lib in the command line.
4. In IPython, import torch

## Expected behavior
Successful import, which fails

## Environment

PyTorch version: 1.8.1+cu111
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.6 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce RTX 3060 Ti
Nvidia driver version: 460.39
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] raisim-gym-torch==0.0.0
[pip3] torch==1.8.1+cu111
[pip3] torchaudio==0.8.1
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.9.1+cu111
[conda] Could not collect
Repository: vscode
Issue: Find widget: renders "? of 5" 
Labels: bug,editor-find

I often end up in a state where the find widget renders "? of 5" for the find results.
I am not 100% sure what are the repro steps, but I can find them, just let me know.

![Screenshot 2021-08-03 at 17 32 33](https://user-images.githubusercontent.com/1926584/128043691-9403ac64-f9d7-44e7-9ebf-4ddeca79fbe5.png)