diff options
| author | Michael Goulet <michael@errs.io> | 2023-01-08 19:57:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-08 19:57:56 -0800 |
| commit | 5e8e97f98115191bca09600491d3687e9cf2e8fb (patch) | |
| tree | 70970b8d512c1f88c62d13cfbec27794a1879f02 /src/test/ui | |
| parent | bb6a88ad5edee0812f61b41a5d41ca794eb3f979 (diff) | |
| parent | 6fdb54d2f103dc21197037e6b1ad0b51073b9627 (diff) | |
| download | rust-5e8e97f98115191bca09600491d3687e9cf2e8fb.tar.gz rust-5e8e97f98115191bca09600491d3687e9cf2e8fb.zip | |
Rollup merge of #106606 - estebank:bad-nested-turbofish, r=compiler-errors
Do not emit structured suggestion for turbofish with wrong span Fix #79161.
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/parser/nested-bad-turbofish.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/parser/nested-bad-turbofish.stderr | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/parser/nested-bad-turbofish.rs b/src/test/ui/parser/nested-bad-turbofish.rs new file mode 100644 index 00000000000..02099fde212 --- /dev/null +++ b/src/test/ui/parser/nested-bad-turbofish.rs @@ -0,0 +1,3 @@ +fn main() { + foo<<S as T>::V>(); //~ ERROR +} diff --git a/src/test/ui/parser/nested-bad-turbofish.stderr b/src/test/ui/parser/nested-bad-turbofish.stderr new file mode 100644 index 00000000000..d82fa80e594 --- /dev/null +++ b/src/test/ui/parser/nested-bad-turbofish.stderr @@ -0,0 +1,11 @@ +error: comparison operators cannot be chained + --> $DIR/nested-bad-turbofish.rs:2:16 + | +LL | foo<<S as T>::V>(); + | ^ ^ + | + = help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + = help: or use `(...)` if you meant to specify fn arguments + +error: aborting due to previous error + |
