Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change for desugaring & make refutable pattern errors more precise #14444

Merged
merged 3 commits into from
May 27, 2014

Conversation

huonw
Copy link
Member

@huonw huonw commented May 26, 2014

Change for desugaring & make refutable pattern errors more precise

This changes for to desugar to the let-based pattern match as described in #14390, and adjusts the compiler to use this information for error messages that even mention that it's in a for loop.

Also, it makes the compiler record the exact positions of refutable parts of a pattern, to point to exactly them in error messages.

@sfackler
Copy link
Member

Legit Travis failure

huonw added 2 commits May 27, 2014 09:24
messages when the pattern is refutable.

This means the compiler points directly to the pattern and said that the
problem is the pattern being refutable (rather than just saying that
some value isn't covered in the `match` as it did previously).

Fixes rust-lang#14390.
The compiler now points exactly which part(s) of a pattern are
refutable, rather than just highlighting the whole pattern.
@huonw
Copy link
Member Author

huonw commented May 27, 2014

Passes travis now.

bors added a commit that referenced this pull request May 27, 2014
Change `for` desugaring & make refutable pattern errors more precise

This changes for to desugar to the `let`-based pattern match as described in #14390, and adjusts the compiler to use this information for error messages that even mention that it's in a `for` loop.

Also, it makes the compiler record the exact positions of refutable parts of a pattern, to point to exactly them in error messages.
@bors bors closed this May 27, 2014
@bors bors merged commit 0df221e into rust-lang:master May 27, 2014
@huonw huonw deleted the nice-for-errors branch June 27, 2014 06:47
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…ng-properly, r=Veykril

Missing runnable env on debug target

Fix bug in Rust Analyzer VSCode where runnable debugging did not pass
environment variable from configuration to child process of Cargo on binary build stage

There is a missing env passing along to `cargo` in debug target which give an in-consistent result from debug and run target

For example
```json
{
    "rust-analyzer.runnableEnv": {
        "OUT_DIR": "/test/path2"
    }
}
```

## run
![image](https://user-images.githubusercontent.com/4373581/228749503-fa55f62c-13d3-4d3c-bee6-1cfbe042bdd0.png)
## debug
compiling binary is failed. Missing env
![image](https://user-images.githubusercontent.com/4373581/228749688-3fe42efb-b5ca-41be-862d-f2d97ecab7be.png)

## debug (after fix)
![image](https://user-images.githubusercontent.com/4373581/228750057-1db60051-3465-47db-8b18-4159ec58cfdb.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants