diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index 69e99a0..88578d6 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -98,14 +98,14 @@ public function __construct(ControllerResolverInterface $controller_resolver, Th
   /**
    * {@inheritdoc}
    */
-  public function renderRoot(&$elements) {
+  public function renderRoot($elements) {
     return $this->render($elements, TRUE);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function renderPlain(&$elements) {
+  public function renderPlain($elements) {
     $current_stack = static::$stack;
     $this->resetStack();
     $output = $this->renderRoot($elements);
@@ -116,7 +116,7 @@ public function renderPlain(&$elements) {
   /**
    * {@inheritdoc}
    */
-  public function render(&$elements, $is_root_call = FALSE) {
+  public function render($elements, $is_root_call = FALSE) {
     // Since #pre_render, #post_render, #post_render_cache callbacks and theme
     // functions/templates may be used for generating a render array's content,
     // and we might be rendering the main content for the page, it is possible
@@ -140,7 +140,7 @@ public function render(&$elements, $is_root_call = FALSE) {
   /**
    * See the docs for ::render().
    */
-  protected function doRender(&$elements, $is_root_call = FALSE) {
+  protected function doRender($elements, $is_root_call = FALSE) {
     if (!isset($elements['#access']) && isset($elements['#access_callback'])) {
       if (is_string($elements['#access_callback']) && strpos($elements['#access_callback'], '::') === FALSE) {
         $elements['#access_callback'] = $this->controllerResolver->getControllerFromDefinition($elements['#access_callback']);
@@ -399,12 +399,12 @@ protected function resetStack() {
   /**
    * Updates the stack.
    *
-   * @param array &$element
+   * @param array $element
    *   The element of the render array that has just been rendered. The stack
    *   frame for this element will be updated with the bubbleable rendering
    *   metadata of this element.
    */
-  protected function updateStack(&$element) {
+  protected function updateStack($element) {
     // The latest frame represents the bubbleable metadata for the subtree.
     $frame = static::$stack->pop();
     // Update the frame, but also update the current element, to ensure it
@@ -447,10 +447,10 @@ protected function bubbleStack() {
    * implicitly idempotent: a placeholder that has been replaced can't be
    * replaced again, and duplicate attachments are ignored.
    *
-   * @param array &$elements
+   * @param array $elements
    *   The structured array describing the data being rendered.
    */
-  protected function processPostRenderCache(array &$elements) {
+  protected function processPostRenderCache(array $elements) {
     if (isset($elements['#post_render_cache'])) {
 
       // Call all #post_render_cache callbacks, passing the provided context.
@@ -512,7 +512,7 @@ protected function cacheGet(array $elements) {
    *
    * @see ::getFromCache()
    */
-  protected function cacheSet(array &$elements) {
+  protected function cacheSet(array $elements) {
     // Form submissions rely on the form being built during the POST request,
     // and render caching of forms prevents this from happening.
     // @todo remove the isMethodSafe() check when
diff --git a/core/lib/Drupal/Core/Render/RendererInterface.php b/core/lib/Drupal/Core/Render/RendererInterface.php
index 418298b..50d0099 100644
--- a/core/lib/Drupal/Core/Render/RendererInterface.php
+++ b/core/lib/Drupal/Core/Render/RendererInterface.php
@@ -31,7 +31,7 @@
    *
    * @see ::render()
    */
-  public function renderRoot(&$elements);
+  public function renderRoot($elements);
 
   /**
    * Renders final HTML in situations where no assets are needed.
@@ -59,7 +59,7 @@ public function renderRoot(&$elements);
    * @see ::renderRoot()
    * @see ::render()
    */
-  public function renderPlain(&$elements);
+  public function renderPlain($elements);
 
   /**
    * Renders HTML given a structured array tree.
@@ -267,7 +267,7 @@ public function renderPlain(&$elements);
    * @see drupal_process_attached()
    * @see ::renderRoot()
    */
-  public function render(&$elements, $is_root_call = FALSE);
+  public function render($elements, $is_root_call = FALSE);
 
   /**
    * Gets a cacheable render array for a render array and its rendered output.
diff --git a/core/lib/Drupal/Core/Utility/LinkGenerator.php b/core/lib/Drupal/Core/Utility/LinkGenerator.php
index a6e8326..63b12a9 100644
--- a/core/lib/Drupal/Core/Utility/LinkGenerator.php
+++ b/core/lib/Drupal/Core/Utility/LinkGenerator.php
@@ -129,11 +129,9 @@ public function generate($text, Url $url) {
     // Move attributes out of options. generateFromRoute(() doesn't need them.
     $attributes = new Attribute($variables['options']['attributes']);
     unset($variables['options']['attributes']);
-    $url->setOptions($variables['options']);
 
     // The result of the url generator is a plain-text URL. Because we are using
     // it here in an HTML argument context, we need to encode it properly.
-    $url = String::checkPlain($url->toString());
 
     // Sanitize the link text if necessary.
     $text = $variables['options']['html'] ? $variables['text'] : String::checkPlain($variables['text']);
