diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/indexing/point-at-index-for-obligation-failure.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/indexing/point-at-index-for-obligation-failure.rs b/tests/ui/indexing/point-at-index-for-obligation-failure.rs new file mode 100644 index 000000000..e9c429b53 --- /dev/null +++ b/tests/ui/indexing/point-at-index-for-obligation-failure.rs @@ -0,0 +1,7 @@ +fn main() { + let a = std::collections::HashMap::<String,String>::new(); + let s = "hello"; + let _b = a[ + &s //~ ERROR E0277 + ]; +} |