Skip to content

Commit aa14976

Browse files
thunderseethecopybara-github
authored andcommitted
Fix OSS build.
Fix up warnings that have been hanging around. PiperOrigin-RevId: 901367232
1 parent 45e85af commit aa14976

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

cc_bindings_from_rs/generate_bindings/database/code_snippet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use error_report::bail;
1414
use itertools::Itertools;
1515
use proc_macro2::TokenStream;
1616
use rustc_middle::ty::Ty;
17-
use rustc_span::def_id::{DefId, LOCAL_CRATE};
17+
use rustc_span::def_id::DefId;
1818
use rustc_span::Symbol;
1919
use std::cmp::Ordering;
2020
use std::collections::BTreeSet;

cc_bindings_from_rs/generate_bindings/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
#![feature(rustc_private)]
5-
#![feature(cfg_accessible)]
65
#![feature(stmt_expr_attributes)]
76
#![feature(proc_macro_hygiene)]
87

@@ -1553,12 +1552,6 @@ fn generate_doc_comment(db: &BindingsGenerator, def_id: DefId) -> TokenStream {
15531552
}
15541553
}
15551554

1556-
/// Returns the name of the item identified by `def_id`, or "<unknown>" if
1557-
/// the item can't be identified.
1558-
fn item_name(db: &BindingsGenerator<'_>, def_id: DefId) -> Symbol {
1559-
db.tcx().opt_item_name(def_id).unwrap_or_else(|| Symbol::intern("<unknown>"))
1560-
}
1561-
15621555
fn item_name_for_error_report(db: &BindingsGenerator<'_>, def_id: DefId) -> error_report::ItemName {
15631556
let crate_name = db.tcx().crate_name(def_id.krate);
15641557
let name = format!("{crate_name}::{}", db.tcx().def_path_str(def_id)).into();

cc_bindings_from_rs/generate_bindings/query_compiler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub fn has_non_lifetime_generics<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool
194194
}
195195

196196
pub fn post_analysis_typing_env(tcx: TyCtxt, def_id: DefId) -> ty::TypingEnv {
197-
ty::TypingEnv { typing_mode: ty::TypingMode::PostAnalysis, param_env: tcx.param_env(def_id) }
197+
ty::TypingEnv::post_analysis(tcx, def_id)
198198
}
199199

200200
/// Returns whether `ty` is copyable inside the given environment (e.g. fn or type def).

cc_bindings_from_rs/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5-
#![feature(never_type)]
65
#![feature(rustc_private)]
76

87
extern crate rustc_driver;

0 commit comments

Comments
 (0)