diff options
Diffstat (limited to 'src/test/ui/span/typo-suggestion.rs')
-rw-r--r-- | src/test/ui/span/typo-suggestion.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/span/typo-suggestion.rs b/src/test/ui/span/typo-suggestion.rs new file mode 100644 index 000000000..e9d7bc65e --- /dev/null +++ b/src/test/ui/span/typo-suggestion.rs @@ -0,0 +1,9 @@ +fn main() { + let foo = 1; + + // `foo` shouldn't be suggested, it is too dissimilar from `bar`. + println!("Hello {}", bar); //~ ERROR cannot find value + + // But this is close enough. + println!("Hello {}", fob); //~ ERROR cannot find value +} |