It was [replaced with the renderer service][1]. 

    $render_service = \Drupal::service('renderer');

As mpdonadio and 4k4 have pointed out in the comments, to prevent metadata from bubbling up to the main request, you should execute this in a new render context. You can do so by using the `renderPlain` method, rather than the usual `render` method (unless you're returning this from a controller, in which case use `renderRoot` instead).

    $rendered = $render_service->renderPlain($build);

[1]: https://www.drupal.org/node/2939099