1
Fork 0

Remove needless Cow

This commit is contained in:
Oli Scherer 2022-12-01 08:38:47 +00:00
parent c2166ec628
commit 66797fa54f
5 changed files with 12 additions and 26 deletions

View file

@ -1,6 +1,5 @@
//! This pass just dumps MIR at a specified point.
use std::borrow::Cow;
use std::fs::File;
use std::io;
@ -13,8 +12,8 @@ use rustc_session::config::{OutputFilenames, OutputType};
pub struct Marker(pub &'static str);
impl<'tcx> MirPass<'tcx> for Marker {
fn name(&self) -> Cow<'_, str> {
Cow::Borrowed(self.0)
fn name(&self) -> &str {
self.0
}
fn run_pass(&self, _tcx: TyCtxt<'tcx>, _body: &mut Body<'tcx>) {}