Skip to content

Commit 714ed90

Browse files
committed
Make hidden lifetimes explicit.
Mainline rustc has deprecated hidden lifetime parameters. This change is required to build rustc with your own cc-rs fork.
1 parent 966183e commit 714ed90

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl<'this> RustcCodegenFlags<'this> {
157157
}
158158

159159
// Rust and clang/cc don't agree on what equivalent flags should look like.
160-
pub(crate) fn cc_flags(&self, build: &Build, tool: &mut Tool, target: &TargetInfo) {
160+
pub(crate) fn cc_flags(&self, build: &Build, tool: &mut Tool, target: &TargetInfo<'_>) {
161161
let family = tool.family;
162162
// Push `flag` to `flags` if it is supported by the currently used CC
163163
let mut push_if_supported = |flag: OsString| {

src/lib.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,11 @@ impl Build {
24372437
Ok(())
24382438
}
24392439

2440-
fn add_inherited_rustflags(&self, cmd: &mut Tool, target: &TargetInfo) -> Result<(), Error> {
2440+
fn add_inherited_rustflags(
2441+
&self,
2442+
cmd: &mut Tool,
2443+
target: &TargetInfo<'_>,
2444+
) -> Result<(), Error> {
24412445
let env_os = match self.getenv("CARGO_ENCODED_RUSTFLAGS") {
24422446
Some(env) => env,
24432447
// No encoded RUSTFLAGS -> nothing to do
@@ -3760,7 +3764,7 @@ impl Build {
37603764
Ok(Arc::from(OsStr::new(sdk_path.trim())))
37613765
}
37623766

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

37663770
if let Some(ret) = self

0 commit comments

Comments
 (0)