diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-12-10 14:15:38 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-12-10 14:15:38 -0800 |
| commit | 94ab9ec36bd3401b3185aff7b623ff0317b96356 (patch) | |
| tree | 1119f01aa3cd68f4cfeb516fe86c94b07708d234 /src/test | |
| parent | 860c7e425ba07a4f5f9a5d5990227a857378a8e0 (diff) | |
| download | rust-94ab9ec36bd3401b3185aff7b623ff0317b96356.tar.gz rust-94ab9ec36bd3401b3185aff7b623ff0317b96356.zip | |
Avoid invalid suggestion by checking the snippet in const fn call
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/issues/issue-54954.stderr | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/ui/issues/issue-54954.stderr b/src/test/ui/issues/issue-54954.stderr index 21909baf3ba..d99a5772e8a 100644 --- a/src/test/ui/issues/issue-54954.stderr +++ b/src/test/ui/issues/issue-54954.stderr @@ -8,10 +8,7 @@ error[E0283]: type annotations needed --> $DIR/issue-54954.rs:3:24 | LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | cannot infer type - | help: consider specifying the type argument in the function call: `Tt::const_val::<[i8; 123]>::<T>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type ... LL | const fn const_val<T: Sized>() -> usize { | --------- - required by this bound in `Tt::const_val` |
