rust/src/libsyntax/ext
bors 5dc91a74b1 Auto merge of #30064 - fhartwig:macro-suggestions, r=sanxiyn
Fixes #13677
This does the same sort of suggestion for misspelt macros that we already do for misspelt identifiers.
Example. Compiling this program:

```rust
macro_rules! foo {
    ($e:expr) => ( $e )
}

fn main() {
    fob!("hello!");
}
```

gives the following error message:

```
/Users/mcp/temp/test.rs:7:5: 7:8 error: macro undefined: 'fob!'
/Users/mcp/temp/test.rs:7     fob!("hello!");
                              ^~~
/Users/mcp/temp/test.rs:7:5: 7:8 help: did you mean `foo`?
/Users/mcp/temp/test.rs:7     fob!("hello!");
```

I had to move the levenshtein distance function into libsyntax for this. Maybe this should live somewhere else (some utility crate?), but I couldn't find a crate to put it in that is imported by libsyntax and the other rustc crates.
2015-11-27 18:41:53 +00:00
..
deriving Auto merge of #29887 - sanxiyn:match-ref-pats, r=sfackler 2015-11-17 20:10:25 +00:00
tt Fix "Cannot fill in a NT" ICE 2015-11-25 20:58:57 +01:00
asm.rs Rename _nopanic methods to remove the suffix. 2015-11-10 16:10:31 -08:00
base.rs Introduce max_suggestion_distance function to avoid duplicating the heuristic 2015-11-27 17:52:29 +01:00
build.rs Remove PatWildMulti 2015-10-31 03:44:43 +03:00
cfg.rs Use deref coercions 2015-11-10 20:16:28 +09:00
concat.rs Use consistent terminology for byte string literals 2015-09-03 10:54:53 +03:00
concat_idents.rs remove Tt prefix from TokenType variants 2015-11-06 14:52:02 +01:00
env.rs syntax: Implement #![no_core] 2015-08-03 17:23:01 -07:00
expand.rs Add suggestion of similar macro names to macro undefined error message 2015-11-26 00:21:38 +01:00
format.rs Auto merge of #29761 - eefriedman:rename-nopanic, r=sanxiyn 2015-11-13 10:28:25 +00:00
log_syntax.rs Allow tracking issues for lang features. 2015-09-08 11:01:42 +10:00
mtwt.rs Add comment for the use of Ident in hash map in mtwt 2015-10-06 01:47:35 +03:00
quote.rs Fix match_ref_pats flagged by Clippy 2015-11-17 23:24:49 +09:00
source_util.rs Rename _nopanic methods to remove the suffix. 2015-11-10 16:10:31 -08:00
trace_macros.rs remove Tt prefix from TokenType variants 2015-11-06 14:52:02 +01:00