diff options
| author | David Wood <david@davidtw.co> | 2020-06-22 13:57:03 +0100 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2020-07-20 19:35:30 +0100 |
| commit | 2989fea88a489a01b3e2243bb84b0ec20b8a0e28 (patch) | |
| tree | 3fc7bedb5e5c8531c204b79510f7d61dd33f1e65 /src/librustc_session | |
| parent | 47756bb0faaf49be5c4086fd0fdbdd57f055781b (diff) | |
mir: `unused_generic_params` query
This commit implements the `unused_generic_params` query, an initial version of polymorphization which detects when an item does not use generic parameters and is being needlessly monomorphized as a result. Signed-off-by: David Wood <david@davidtw.co>
Diffstat (limited to 'src/librustc_session')
| -rw-r--r-- | src/librustc_session/options.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index 8c1f6a77497..11fc40998b1 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -949,6 +949,10 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, (default: PLT is disabled if full relro is enabled)"), polonius: bool = (false, parse_bool, [UNTRACKED], "enable polonius-based borrow-checker (default: no)"), + polymorphize: bool = (true, parse_bool, [TRACKED], + "perform polymorphization analysis"), + polymorphize_errors: bool = (false, parse_bool, [TRACKED], + "emit errors from polymorphization analysis for debugging"), pre_link_arg: (/* redirected to pre_link_args */) = ((), parse_string_push, [UNTRACKED], "a single extra argument to prepend the linker invocation (can be used several times)"), pre_link_args: Vec<String> = (Vec::new(), parse_list, [UNTRACKED], |
