Skip to content

Commit

Permalink
Make hidden lifetimes explicit.
Browse files Browse the repository at this point in the history
Mainline rustc has deprecated hidden lifetime parameters.

This change is required to build rustc with your own cc-rs fork.
  • Loading branch information
tnewsome-lynx committed Jan 14, 2025
1 parent 966183e commit 97daacd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl<'this> RustcCodegenFlags<'this> {
}

// Rust and clang/cc don't agree on what equivalent flags should look like.
pub(crate) fn cc_flags(&self, build: &Build, tool: &mut Tool, target: &TargetInfo) {
pub(crate) fn cc_flags(&self, build: &Build, tool: &mut Tool, target: &TargetInfo<'_>) {
let family = tool.family;
// Push `flag` to `flags` if it is supported by the currently used CC
let mut push_if_supported = |flag: OsString| {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@ impl Build {
Ok(())
}

fn add_inherited_rustflags(&self, cmd: &mut Tool, target: &TargetInfo) -> Result<(), Error> {
fn add_inherited_rustflags(&self, cmd: &mut Tool, target: &TargetInfo<'_>) -> Result<(), Error> {
let env_os = match self.getenv("CARGO_ENCODED_RUSTFLAGS") {
Some(env) => env,
// No encoded RUSTFLAGS -> nothing to do
Expand Down Expand Up @@ -3760,7 +3760,7 @@ impl Build {
Ok(Arc::from(OsStr::new(sdk_path.trim())))
}

fn apple_sdk_root(&self, target: &TargetInfo) -> Result<Arc<OsStr>, Error> {
fn apple_sdk_root(&self, target: &TargetInfo<'_>) -> Result<Arc<OsStr>, Error> {
let sdk = target.apple_sdk_name();

if let Some(ret) = self
Expand Down

0 comments on commit 97daacd

Please sign in to comment.