diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-03 12:08:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-03 12:08:54 +0100 |
| commit | 1a0ab892cd2ccb75244c52d68e9db9abca0d1065 (patch) | |
| tree | 4bf5cb067d7a163f4d6b65b2696f5d24190da4cd /tests | |
| parent | 625264329f8019013172c158cec2068f6b162acc (diff) | |
| parent | 82f8b8f0e3f44c7280f21364b54840f59890610a (diff) | |
| download | rust-1a0ab892cd2ccb75244c52d68e9db9abca0d1065.tar.gz rust-1a0ab892cd2ccb75244c52d68e9db9abca0d1065.zip | |
Rollup merge of #132528 - compiler-errors:fallback-sugg-opt, r=jieyouxu
Use `*_opt` typeck results fns to not ICE in fallback suggestion Self-explanatory. Fixes #132517.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/never_type/suggestion-ice-132517.rs | 4 | ||||
| -rw-r--r-- | tests/ui/never_type/suggestion-ice-132517.stderr | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/never_type/suggestion-ice-132517.rs b/tests/ui/never_type/suggestion-ice-132517.rs new file mode 100644 index 00000000000..c1730d06f6b --- /dev/null +++ b/tests/ui/never_type/suggestion-ice-132517.rs @@ -0,0 +1,4 @@ +fn main() { + x::<_>(|_| panic!()) + //~^ ERROR cannot find function `x` in this scope +} diff --git a/tests/ui/never_type/suggestion-ice-132517.stderr b/tests/ui/never_type/suggestion-ice-132517.stderr new file mode 100644 index 00000000000..4f280a0e4f1 --- /dev/null +++ b/tests/ui/never_type/suggestion-ice-132517.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find function `x` in this scope + --> $DIR/suggestion-ice-132517.rs:2:5 + | +LL | x::<_>(|_| panic!()) + | ^ not found in this scope + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0425`. |
