Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lifetime annotations
Browse files Browse the repository at this point in the history
NobodyXu authored Nov 28, 2024
1 parent 69d615d commit 0270aff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/flags.rs
Original file line number Diff line number Diff line change
@@ -22,9 +22,9 @@ pub(crate) struct RustcCodegenFlags<'a> {
soft_float: Option<bool>,
}

impl RustcCodegenFlags {
impl RustcCodegenFlags<'_> {
// Parse flags obtained from CARGO_ENCODED_RUSTFLAGS
pub(crate) fn parse(rustflags_env: &str) -> Result<RustcCodegenFlags, Error> {
pub(crate) fn parse(rustflags_env: &str) -> Result<RustcCodegenFlags<'_>, Error> {
fn is_flag_prefix(flag: &str) -> bool {
[
"-Z",
@@ -94,7 +94,7 @@ impl RustcCodegenFlags {
(flag, None)
};

fn flag_ok_or(flag: Option<&str>, msg: &'static str) -> Result<&str, Error> {
fn flag_ok_or<'flag>(flag: Option<&'flag str>, msg: &'static str) -> Result<&'flag str, Error> {
flag.ok_or(Error::new(ErrorKind::InvalidFlag, msg))
}

0 comments on commit 0270aff

Please sign in to comment.