diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-15 16:43:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-15 16:43:26 +0100 |
| commit | 69904192578e079ebb4bf9534ada3dc6f3e25447 (patch) | |
| tree | 338d4575dd2f09b9ecb04d3ae505dee02ab2b7f2 /src | |
| parent | a2fcdc47527699e1773ffb6ab76cb76ba90b8be8 (diff) | |
| parent | 4c1addfcb77b4699be409112075cf3e33e8b5ea7 (diff) | |
| download | rust-69904192578e079ebb4bf9534ada3dc6f3e25447.tar.gz rust-69904192578e079ebb4bf9534ada3dc6f3e25447.zip | |
Rollup merge of #80016 - jyn514:imports, r=GuillaumeGomez
Use imports instead of rewriting the type signature of `RustcOptGroup::stable` This was an adventure; see https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/'higher.20ranked.20subtype.20error' r? `@GuillaumeGomez`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/lib.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 286a29edd95..94b6617a071 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -117,21 +117,9 @@ fn get_args() -> Option<Vec<String>> { .collect() } -fn stable<F>(name: &'static str, f: F) -> RustcOptGroup -where - F: Fn(&mut getopts::Options) -> &mut getopts::Options + 'static, -{ - RustcOptGroup::stable(name, f) -} - -fn unstable<F>(name: &'static str, f: F) -> RustcOptGroup -where - F: Fn(&mut getopts::Options) -> &mut getopts::Options + 'static, -{ - RustcOptGroup::unstable(name, f) -} - fn opts() -> Vec<RustcOptGroup> { + let stable: fn(_, fn(&mut getopts::Options) -> &mut _) -> _ = RustcOptGroup::stable; + let unstable: fn(_, fn(&mut getopts::Options) -> &mut _) -> _ = RustcOptGroup::unstable; vec