Skip to content

librustc: offer suggestions for unresolved names.#5096

Closed
luqmana wants to merge 3 commits into
rust-lang:incomingfrom
luqmana:spell
Closed

librustc: offer suggestions for unresolved names.#5096
luqmana wants to merge 3 commits into
rust-lang:incomingfrom
luqmana:spell

Conversation

@luqmana

@luqmana luqmana commented Feb 23, 2013

Copy link
Copy Markdown
Contributor

Address #2281

-> % cat foo.rs
fn foo() -> int {
    let bar = 10;

    bad
}
-> % rustc foo.rs
foo.rs:4:4: 4:7 error: unresolved name: `bad`. Did you mean: `bar`?
foo.rs:4     bad
             ^~~
error: aborting due to previous error

@bstrie

bstrie commented Feb 23, 2013

Copy link
Copy Markdown
Contributor

This looks really cool.

@jdm

jdm commented Feb 23, 2013

Copy link
Copy Markdown
Contributor

\o/

@luqmana

luqmana commented Feb 27, 2013

Copy link
Copy Markdown
Contributor Author

r? @catamorphism

bors added a commit that referenced this pull request Feb 27, 2013
Address #2281


```
-> % cat foo.rs
fn foo() -> int {
    let bar = 10;

    bad
}
```

```
-> % rustc foo.rs
foo.rs:4:4: 4:7 error: unresolved name: `bad`. Did you mean: `bar`?
foo.rs:4     bad
             ^~~
error: aborting due to previous error
```
@bors bors closed this Feb 27, 2013
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
Don't use ExpnKind::descr to get the name of a bang macro.

This is the same change as the first commit in rust-lang#68407, but applied to clippy.
The new code should work both before and after the changes in rust-lang#68407.

changelog: none
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 12, 2026
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.

5 participants