message: Fail when dealing with io fails
  Is the user does not have permissions or a folder/file
  can't be created or deleted, Cargo will fail and return
  an Error indicating the problem.
diff: @@ -83,9 +83,9 @@ pub fn doc(ws: &Workspace<'_>, options: &DocOptions) -> CargoResult<()> {
  // already compiled, they were compiled with the same Rustc version that we're currently
  // using. Otherways we must remove the `doc/` folder and compile again.
  //
  - // This is important because the .js/.html&.css files that are generated by Rustc don't have
  - // any versioning. Therefore, we can fall in weird bugs and behaviours if we mix different
  - // compiler versions of these js/.html&.css files.
  + // This is important because the `.js`/`.html` & `.css` files that are generated by Rustc don't have
  + // any versioning. Therefore, we can end up with weird bugs and behaviours if we mix different
  + // compiler versions of these files.
  check_rustdoc_appropiate_versioning(ws, &target_data)?;
  let compilation = ops::compile(ws, &options.compile_opts)?;
  @@ -156,7 +156,11 @@ fn check_rustdoc_appropiate_versioning(
  Err(_) => {
  // Check if `doc/` folder exists and remove it. Otherways, simply create
  // `.rustdoc_fingerprint.json` file.
  - remove_doc_directory(ws)?;
  + match remove_doc_directory(ws) {
  + // If the folder does not exist, we don't care since our goal was to
  + // delete it.
  + _ => (),
  + }
  let rustdoc_fingerprint_file =
  File::create(RustDocTargetData::path_to_fingerprint(ws))?;
  // We write the actual `Rustc` version to it so that we just need to compile it straight
  @@ -173,23 +177,17 @@ fn check_rustdoc_appropiate_versioning(
  remove_doc_directory(ws)?;
  // Remove `rustdoc_fingerprint_file` contents and write the new version used
  // to compile the docs.
  - rustdoc_fingerprint_file.set_len(0)?;
  + //rustdoc_fingerprint_file.set_len(0)?;
  to_writer(&rustdoc_fingerprint_file, &actual_rustdoc_target_data)?;
  };
  Ok(())
  }
  -/// Tries to remove the Workspace's `target/doc/` directory wit all of it's contents
  +/// Tries to remove the Workspace's `target/doc/` directory with all of it's contents
  /// returning an error if it's not possible.
  fn remove_doc_directory(ws: &Workspace<'_>) -> std::io::Result<()> {
  - let doc_path = &ws.root().join("target").join("doc");
  - if doc_path.exists() {
  // Try to remove the `doc/` folder if exists.
  - // XXX: What should we do if the op fails?
  - std::fs::remove_dir_all(doc_path)
  - } else {
  - Ok(())
  - }
  + std::fs::remove_dir_all(&ws.root().join("target").join("doc")).into()
  }
  #[derive(Debug, Serialize, Deserialize)]
  