]> git.lizzy.rs Git - rust.git/commit
Auto merge of #42850 - estebank:unwanted-return-rotj, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 28 Jun 2017 20:16:13 +0000 (20:16 +0000)
committerbors <bors@rust-lang.org>
Wed, 28 Jun 2017 20:16:13 +0000 (20:16 +0000)
commit69c65d29615c391c958ebf75dd65258ec23e175c
treec4f6da0a7863832c4285a7772b671f10fb2beafe
parent47faf1d51952ecd9d4c8a7325332fba34fbe00bd
parent7dad2958be59801881fb3db7544de423420dabd0
Auto merge of #42850 - estebank:unwanted-return-rotj, r=nikomatsakis

Detect missing `;` on methods with return type `()`

 - Point out the origin of a type requirement when it is the return type
   of a method
 - Point out possibly missing semicolon when the return type is `()` and
   the implicit return makes sense as a statement
 - Suggest changing the return type of methods with default return type
 - Don't suggest changing the return type on `fn main()`
 - Don't suggest changing the return type on impl fn
 - Suggest removal of semicolon (instead of being help)
src/librustc/ty/mod.rs
src/librustc_typeck/check/coercion.rs
src/librustc_typeck/check/demand.rs
src/librustc_typeck/check/mod.rs