rust/src/libsyntax/print
Mazdak Farrokhzad 37333b5131
Rollup merge of #63492 - eddyb:cvarargs, r=nagisa,matthewjasper
Remove redundancy from the implementation of C variadics.

This cleanup was first described in https://github.com/rust-lang/rust/issues/44930#issuecomment-497163539:

* AST doesn't track `c_variadic: bool` anymore, relying solely on a trailing `CVarArgs` type in fn signatures
* HIR doesn't have a `CVarArgs` anymore, relying solely on `c_variadic: bool`
  * same for `ty::FnSig` (see tests for diagnostics improvements from that)
  * `{hir,mir}::Body` have one extra argument than the signature when `c_variadic == true`
  * `rustc_typeck` and `rustc_mir::{build,borrowck}` need to give that argument the right type (which no longer uses a lifetime parameter, but a function-internal scope)
* `rustc_target::abi::call` doesn't need special hacks anymore (since it never sees the `VaListImpl` now, it's all inside the body)

r? @nagisa / @rkruppe cc @dlrobertson @oli-obk
2019-09-29 04:35:58 +02:00
..
pprust syntax: don't keep a redundant c_variadic flag in the AST. 2019-09-28 17:38:59 +03:00
helpers.rs Move pp::Printer helpers to direct impl 2019-07-10 07:13:20 -04:00
pp.rs Move pp::Printer helpers to direct impl 2019-07-10 07:13:20 -04:00
pprust.rs Filter out stmts made for the redundant_semicolon lint when pretty-printing 2019-09-27 21:06:10 -04:00