Avoid cloning RenderOptions.
By moving `RenderOptions` out of `Option`, because the two structs' uses are almost entirely separate. The only complication is that `unstable_features` is needed in both structs, but it's a tiny `Copy` type so its duplication seems fine.
This commit is contained in:
parent
38988e62bc
commit
ca2561a07b
5 changed files with 48 additions and 47 deletions
|
|
@ -430,7 +430,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
|
|||
extension_css,
|
||||
resource_suffix,
|
||||
static_root_path,
|
||||
unstable_features,
|
||||
generate_redirect_map,
|
||||
show_type_layout,
|
||||
generate_link_to_definition,
|
||||
|
|
@ -511,7 +510,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
|
|||
resource_suffix,
|
||||
static_root_path,
|
||||
fs: DocFS::new(sender),
|
||||
codes: ErrorCodes::from(unstable_features.is_nightly_build()),
|
||||
codes: ErrorCodes::from(options.unstable_features.is_nightly_build()),
|
||||
playground,
|
||||
all: RefCell::new(AllTypes::new()),
|
||||
errors: receiver,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue