diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-30 09:04:15 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-30 09:04:15 +0000 |
| commit | 91f422dfda98b17688986cca817dbff9a4f8b9cb (patch) | |
| tree | 0af0334240959c1499456cb94065e8ea9a127157 /src/test/ui/polymorphization | |
| parent | 9a98c63b30bd8419be662b8fb3f3b22ba33d72c5 (diff) | |
| download | rust-91f422dfda98b17688986cca817dbff9a4f8b9cb.tar.gz rust-91f422dfda98b17688986cca817dbff9a4f8b9cb.zip | |
Also report the call site of PME errors locally.
Note this does not produce a full stack all the way to the first call that specifies all monomorphic parameters, it's just shallowly mentioning the last call site.
Diffstat (limited to 'src/test/ui/polymorphization')
| -rw-r--r-- | src/test/ui/polymorphization/generators.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/polymorphization/predicates.stderr | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/polymorphization/generators.stderr b/src/test/ui/polymorphization/generators.stderr index 9cabb21e784..5edbb119f78 100644 --- a/src/test/ui/polymorphization/generators.stderr +++ b/src/test/ui/polymorphization/generators.stderr @@ -19,6 +19,12 @@ LL | | 2 LL | | } | |_____^ +note: the above error was encountered while instantiating `fn finish::<[generator@$DIR/generators.rs:35:5: 39:6], u32, u32>` + --> $DIR/generators.rs:86:5 + | +LL | finish(unused_type::<u32>()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: item has unused generic parameters --> $DIR/generators.rs:60:5 | @@ -31,5 +37,11 @@ LL | | 2 LL | | } | |_____^ +note: the above error was encountered while instantiating `fn finish::<[generator@$DIR/generators.rs:60:5: 64:6], u32, u32>` + --> $DIR/generators.rs:89:5 + | +LL | finish(unused_const::<1u32>()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: aborting due to 2 previous errors; 1 warning emitted diff --git a/src/test/ui/polymorphization/predicates.stderr b/src/test/ui/polymorphization/predicates.stderr index 5fc51e58d72..dc6ebceae21 100644 --- a/src/test/ui/polymorphization/predicates.stderr +++ b/src/test/ui/polymorphization/predicates.stderr @@ -41,5 +41,11 @@ error: item has unused generic parameters LL | fn bar<I>() { | ^^^ - generic parameter `I` is unused +note: the above error was encountered while instantiating `fn foo::<std::slice::Iter<u32>, T>` + --> $DIR/predicates.rs:85:5 + | +LL | foo(x.iter()); + | ^^^^^^^^^^^^^ + error: aborting due to 6 previous errors |
