rust/src/test/parse-fail
bors fedce67cd2 Auto merge of #48326 - RalfJung:generic-bounds, r=petrochenkov
Warn about ignored generic bounds in `for`

This adds a new lint to fix #42181. For consistency and to avoid code duplication, I also moved the existing "bounds in type aliases are ignored" here.

Questions to the reviewer:
* Is it okay to just remove a diagnostic error code like this? Should I instead keep the warning about type aliases where it is? The old code provided a detailed explanation of what's going on when asked, that information is now lost. On the other hand, `span_warn!` seems deprecated (after this patch, it has exactly one user left!).
* Did I miss any syntactic construct that can appear as `for` in the surface syntax? I covered function types (`for<'a> fn(...)`), generic traits (`for <'a> Fn(...)`, can appear both as bounds as as trait objects) and bounds (`for<'a> F: ...`).
* For the sake of backwards compatibility, this adds a warning, not an error. @nikomatsakis suggested an error in https://github.com/rust-lang/rust/issues/42181#issuecomment-306924389, but I feel that can only happen in a new epoch -- right?

Cc @eddyb
2018-03-09 10:45:29 +00:00
..
2017-03-14 04:39:21 +00:00
2018-01-27 22:37:30 +03:00
2017-07-23 22:48:01 +07:00
2017-11-22 10:56:17 -07:00
2018-01-27 22:37:30 +03:00
2018-01-30 12:41:04 -06:00
2017-09-22 22:05:18 +02:00
2017-11-24 07:34:33 -08:00
2017-11-24 07:34:33 -08:00