Skip to content

Commit 8284035

Browse files
committed
Fallout in other crates.
1 parent 58b908d commit 8284035

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+491
-413
lines changed

src/librustc_lint/array_into_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare_lint_pass!(
2525
);
2626

2727
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIntoIter {
28-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
28+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr<'tcx>) {
2929
// We only care about method call expressions.
3030
if let hir::ExprKind::MethodCall(call, span, args) = &expr.kind {
3131
if call.ident.name != sym::into_iter {

src/librustc_lint/builtin.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxPointers {
142142
}
143143
}
144144

145-
fn check_expr(&mut self, cx: &LateContext<'_, '_>, e: &hir::Expr) {
145+
fn check_expr(&mut self, cx: &LateContext<'_, '_>, e: &hir::Expr<'_>) {
146146
let ty = cx.tables.node_type(e.hir_id);
147147
self.check_heap_type(cx, e.span, ty);
148148
}
@@ -157,8 +157,8 @@ declare_lint! {
157157
declare_lint_pass!(NonShorthandFieldPatterns => [NON_SHORTHAND_FIELD_PATTERNS]);
158158

159159
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonShorthandFieldPatterns {
160-
fn check_pat(&mut self, cx: &LateContext<'_, '_>, pat: &hir::Pat) {
161-
if let PatKind::Struct(ref qpath, ref field_pats, _) = pat.kind {
160+
fn check_pat(&mut self, cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>) {
161+
if let PatKind::Struct(ref qpath, field_pats, _) = pat.kind {
162162
let variant = cx
163163
.tables
164164
.pat_ty(pat)
@@ -901,7 +901,7 @@ declare_lint! {
901901
declare_lint_pass!(MutableTransmutes => [MUTABLE_TRANSMUTES]);
902902

903903
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutableTransmutes {
904-
fn check_expr(&mut self, cx: &LateContext<'_, '_>, expr: &hir::Expr) {
904+
fn check_expr(&mut self, cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>) {
905905
use rustc_target::spec::abi::Abi::RustIntrinsic;
906906

907907
let msg = "mutating transmuted &mut T from &T may cause undefined behavior, \
@@ -917,7 +917,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutableTransmutes {
917917

918918
fn get_transmute_from_to<'a, 'tcx>(
919919
cx: &LateContext<'a, 'tcx>,
920-
expr: &hir::Expr,
920+
expr: &hir::Expr<'_>,
921921
) -> Option<(Ty<'tcx>, Ty<'tcx>)> {
922922
let def = if let hir::ExprKind::Path(ref qpath) = expr.kind {
923923
cx.tables.qpath_res(qpath, expr.hir_id)
@@ -1840,7 +1840,7 @@ declare_lint! {
18401840
declare_lint_pass!(InvalidValue => [INVALID_VALUE]);
18411841

18421842
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
1843-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &hir::Expr) {
1843+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &hir::Expr<'_>) {
18441844
#[derive(Debug, Copy, Clone, PartialEq)]
18451845
enum InitKind {
18461846
Zeroed,
@@ -1852,7 +1852,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
18521852
type InitError = (String, Option<Span>);
18531853

18541854
/// Test if this constant is all-0.
1855-
fn is_zero(expr: &hir::Expr) -> bool {
1855+
fn is_zero(expr: &hir::Expr<'_>) -> bool {
18561856
use hir::ExprKind::*;
18571857
use syntax::ast::LitKind::*;
18581858
match &expr.kind {
@@ -1869,7 +1869,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
18691869
}
18701870

18711871
/// Determine if this expression is a "dangerous initialization".
1872-
fn is_dangerous_init(cx: &LateContext<'_, '_>, expr: &hir::Expr) -> Option<InitKind> {
1872+
fn is_dangerous_init(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>) -> Option<InitKind> {
18731873
// `transmute` is inside an anonymous module (the `extern` block?);
18741874
// `Invalid` represents the empty string and matches that.
18751875
// FIXME(#66075): use diagnostic items. Somehow, that does not seem to work

src/librustc_lint/nonstandard_style.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonSnakeCase {
344344
}
345345
}
346346

347-
fn check_pat(&mut self, cx: &LateContext<'_, '_>, p: &hir::Pat) {
347+
fn check_pat(&mut self, cx: &LateContext<'_, '_>, p: &hir::Pat<'_>) {
348348
if let &PatKind::Binding(_, _, ident, _) = &p.kind {
349349
self.check_snake_case(cx, "variable", &ident);
350350
}
@@ -410,7 +410,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonUpperCaseGlobals {
410410
}
411411
}
412412

413-
fn check_pat(&mut self, cx: &LateContext<'_, '_>, p: &hir::Pat) {
413+
fn check_pat(&mut self, cx: &LateContext<'_, '_>, p: &hir::Pat<'_>) {
414414
// Lint for constants that look like binding identifiers (#7526)
415415
if let PatKind::Path(hir::QPath::Resolved(None, ref path)) = p.kind {
416416
if let Res::Def(DefKind::Const, _) = path.res {

src/librustc_lint/types.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ fn lint_overflowing_range_endpoint<'a, 'tcx>(
6565
lit: &hir::Lit,
6666
lit_val: u128,
6767
max: u128,
68-
expr: &'tcx hir::Expr,
69-
parent_expr: &'tcx hir::Expr,
68+
expr: &'tcx hir::Expr<'tcx>,
69+
parent_expr: &'tcx hir::Expr<'tcx>,
7070
ty: &str,
7171
) -> bool {
7272
// We only want to handle exclusive (`..`) ranges,
@@ -150,7 +150,7 @@ fn get_bin_hex_repr(cx: &LateContext<'_, '_>, lit: &hir::Lit) -> Option<String>
150150

151151
fn report_bin_hex_error(
152152
cx: &LateContext<'_, '_>,
153-
expr: &hir::Expr,
153+
expr: &hir::Expr<'_>,
154154
ty: attr::IntType,
155155
repr_str: String,
156156
val: u128,
@@ -244,7 +244,7 @@ fn get_type_suggestion(t: Ty<'_>, val: u128, negative: bool) -> Option<&'static
244244
fn lint_int_literal<'a, 'tcx>(
245245
cx: &LateContext<'a, 'tcx>,
246246
type_limits: &TypeLimits,
247-
e: &'tcx hir::Expr,
247+
e: &'tcx hir::Expr<'tcx>,
248248
lit: &hir::Lit,
249249
t: ast::IntTy,
250250
v: u128,
@@ -284,7 +284,7 @@ fn lint_int_literal<'a, 'tcx>(
284284

285285
fn lint_uint_literal<'a, 'tcx>(
286286
cx: &LateContext<'a, 'tcx>,
287-
e: &'tcx hir::Expr,
287+
e: &'tcx hir::Expr<'tcx>,
288288
lit: &hir::Lit,
289289
t: ast::UintTy,
290290
) {
@@ -342,7 +342,7 @@ fn lint_uint_literal<'a, 'tcx>(
342342
fn lint_literal<'a, 'tcx>(
343343
cx: &LateContext<'a, 'tcx>,
344344
type_limits: &TypeLimits,
345-
e: &'tcx hir::Expr,
345+
e: &'tcx hir::Expr<'tcx>,
346346
lit: &hir::Lit,
347347
) {
348348
match cx.tables.node_type(e.hir_id).kind {
@@ -377,7 +377,7 @@ fn lint_literal<'a, 'tcx>(
377377
}
378378

379379
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
380-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx hir::Expr) {
380+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx hir::Expr<'tcx>) {
381381
match e.kind {
382382
hir::ExprKind::Unary(hir::UnNeg, ref expr) => {
383383
// propagate negation, if the negation itself isn't negated
@@ -425,8 +425,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
425425
fn check_limits(
426426
cx: &LateContext<'_, '_>,
427427
binop: hir::BinOp,
428-
l: &hir::Expr,
429-
r: &hir::Expr,
428+
l: &hir::Expr<'_>,
429+
r: &hir::Expr<'_>,
430430
) -> bool {
431431
let (lit, expr, swap) = match (&l.kind, &r.kind) {
432432
(&hir::ExprKind::Lit(_), _) => (l, r, true),

src/librustc_lint/unused.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ declare_lint! {
3737
declare_lint_pass!(UnusedResults => [UNUSED_MUST_USE, UNUSED_RESULTS]);
3838

3939
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
40-
fn check_stmt(&mut self, cx: &LateContext<'_, '_>, s: &hir::Stmt) {
40+
fn check_stmt(&mut self, cx: &LateContext<'_, '_>, s: &hir::Stmt<'_>) {
4141
let expr = match s.kind {
4242
hir::StmtKind::Semi(ref expr) => &**expr,
4343
_ => return,
@@ -123,7 +123,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
123123
fn check_must_use_ty<'tcx>(
124124
cx: &LateContext<'_, 'tcx>,
125125
ty: Ty<'tcx>,
126-
expr: &hir::Expr,
126+
expr: &hir::Expr<'_>,
127127
span: Span,
128128
descr_pre: &str,
129129
descr_post: &str,
@@ -245,7 +245,7 @@ declare_lint! {
245245
declare_lint_pass!(PathStatements => [PATH_STATEMENTS]);
246246

247247
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PathStatements {
248-
fn check_stmt(&mut self, cx: &LateContext<'_, '_>, s: &hir::Stmt) {
248+
fn check_stmt(&mut self, cx: &LateContext<'_, '_>, s: &hir::Stmt<'_>) {
249249
if let hir::StmtKind::Semi(ref expr) = s.kind {
250250
if let hir::ExprKind::Path(_) = expr.kind {
251251
cx.span_lint(PATH_STATEMENTS, s.span, "path statement with no effect");
@@ -637,7 +637,7 @@ declare_lint! {
637637
declare_lint_pass!(UnusedAllocation => [UNUSED_ALLOCATION]);
638638

639639
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAllocation {
640-
fn check_expr(&mut self, cx: &LateContext<'_, '_>, e: &hir::Expr) {
640+
fn check_expr(&mut self, cx: &LateContext<'_, '_>, e: &hir::Expr<'_>) {
641641
match e.kind {
642642
hir::ExprKind::Box(_) => {}
643643
_ => return,

src/librustc_metadata/rmeta/encoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ impl Visitor<'tcx> for EncodeContext<'tcx> {
15241524
fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'tcx> {
15251525
NestedVisitorMap::OnlyBodies(&self.tcx.hir())
15261526
}
1527-
fn visit_expr(&mut self, ex: &'tcx hir::Expr) {
1527+
fn visit_expr(&mut self, ex: &'tcx hir::Expr<'tcx>) {
15281528
intravisit::walk_expr(self, ex);
15291529
self.encode_info_for_expr(ex);
15301530
}
@@ -1587,7 +1587,7 @@ impl EncodeContext<'tcx> {
15871587
}
15881588
}
15891589

1590-
fn encode_info_for_expr(&mut self, expr: &hir::Expr) {
1590+
fn encode_info_for_expr(&mut self, expr: &hir::Expr<'_>) {
15911591
match expr.kind {
15921592
hir::ExprKind::Closure(..) => {
15931593
let def_id = self.tcx.hir().local_def_id(expr.hir_id);

src/librustc_mir/build/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1111
&mut self,
1212
destination: &Place<'tcx>,
1313
block: BasicBlock,
14-
ast_block: &'tcx hir::Block,
14+
ast_block: &'tcx hir::Block<'tcx>,
1515
source_info: SourceInfo,
1616
) -> BlockAnd<()> {
1717
let Block {

src/librustc_mir/build/mod.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ pub fn mir_build(tcx: TyCtxt<'_>, def_id: DefId) -> BodyAndCache<'_> {
2929

3030
// Figure out what primary body this item has.
3131
let (body_id, return_ty_span) = match tcx.hir().get(id) {
32-
Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(_, decl, body_id, _, _), .. })
33-
| Node::Item(hir::Item {
32+
Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(_, decl, body_id, _, _), .. }) => {
33+
(*body_id, decl.output.span())
34+
}
35+
Node::Item(hir::Item {
3436
kind: hir::ItemKind::Fn(hir::FnSig { decl, .. }, _, body_id),
3537
..
3638
})
@@ -529,7 +531,12 @@ fn should_abort_on_panic(tcx: TyCtxt<'_>, fn_def_id: DefId, _abi: Abi) -> bool {
529531
///////////////////////////////////////////////////////////////////////////
530532
/// the main entry point for building MIR for a function
531533
532-
struct ArgInfo<'tcx>(Ty<'tcx>, Option<Span>, Option<&'tcx hir::Param>, Option<ImplicitSelfKind>);
534+
struct ArgInfo<'tcx>(
535+
Ty<'tcx>,
536+
Option<Span>,
537+
Option<&'tcx hir::Param<'tcx>>,
538+
Option<ImplicitSelfKind>,
539+
);
533540

534541
fn construct_fn<'a, 'tcx, A>(
535542
hir: Cx<'a, 'tcx>,
@@ -738,7 +745,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
738745
fn_def_id: DefId,
739746
arguments: &[ArgInfo<'tcx>],
740747
argument_scope: region::Scope,
741-
ast_body: &'tcx hir::Expr,
748+
ast_body: &'tcx hir::Expr<'tcx>,
742749
) -> BlockAnd<()> {
743750
// Allocate locals for the function arguments
744751
for &ArgInfo(ty, _, arg_opt, _) in arguments.iter() {

src/librustc_mir/hair/cx/block.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc::ty;
88

99
use rustc_index::vec::Idx;
1010

11-
impl<'tcx> Mirror<'tcx> for &'tcx hir::Block {
11+
impl<'tcx> Mirror<'tcx> for &'tcx hir::Block<'tcx> {
1212
type Output = Block<'tcx>;
1313

1414
fn make_mirror(self, cx: &mut Cx<'_, 'tcx>) -> Block<'tcx> {
@@ -37,7 +37,7 @@ impl<'tcx> Mirror<'tcx> for &'tcx hir::Block {
3737
fn mirror_stmts<'a, 'tcx>(
3838
cx: &mut Cx<'a, 'tcx>,
3939
block_id: hir::ItemLocalId,
40-
stmts: &'tcx [hir::Stmt],
40+
stmts: &'tcx [hir::Stmt<'tcx>],
4141
) -> Vec<StmtRef<'tcx>> {
4242
let mut result = vec![];
4343
for (index, stmt) in stmts.iter().enumerate() {
@@ -101,7 +101,10 @@ fn mirror_stmts<'a, 'tcx>(
101101
return result;
102102
}
103103

104-
pub fn to_expr_ref<'a, 'tcx>(cx: &mut Cx<'a, 'tcx>, block: &'tcx hir::Block) -> ExprRef<'tcx> {
104+
pub fn to_expr_ref<'a, 'tcx>(
105+
cx: &mut Cx<'a, 'tcx>,
106+
block: &'tcx hir::Block<'tcx>,
107+
) -> ExprRef<'tcx> {
105108
let block_ty = cx.tables().node_type(block.hir_id);
106109
let temp_lifetime = cx.region_scope_tree.temporary_scope(block.hir_id.local_id);
107110
let expr = Expr {

src/librustc_mir/hair/cx/expr.rs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc::ty::{self, AdtKind, Ty};
1414
use rustc_index::vec::Idx;
1515
use syntax_pos::Span;
1616

17-
impl<'tcx> Mirror<'tcx> for &'tcx hir::Expr {
17+
impl<'tcx> Mirror<'tcx> for &'tcx hir::Expr<'tcx> {
1818
type Output = Expr<'tcx>;
1919

2020
fn make_mirror(self, cx: &mut Cx<'_, 'tcx>) -> Expr<'tcx> {
@@ -65,7 +65,7 @@ impl<'tcx> Mirror<'tcx> for &'tcx hir::Expr {
6565

6666
fn apply_adjustment<'a, 'tcx>(
6767
cx: &mut Cx<'a, 'tcx>,
68-
hir_expr: &'tcx hir::Expr,
68+
hir_expr: &'tcx hir::Expr<'tcx>,
6969
mut expr: Expr<'tcx>,
7070
adjustment: &Adjustment<'tcx>,
7171
) -> Expr<'tcx> {
@@ -129,7 +129,10 @@ fn apply_adjustment<'a, 'tcx>(
129129
Expr { temp_lifetime, ty: adjustment.target, span, kind }
130130
}
131131

132-
fn make_mirror_unadjusted<'a, 'tcx>(cx: &mut Cx<'a, 'tcx>, expr: &'tcx hir::Expr) -> Expr<'tcx> {
132+
fn make_mirror_unadjusted<'a, 'tcx>(
133+
cx: &mut Cx<'a, 'tcx>,
134+
expr: &'tcx hir::Expr<'tcx>,
135+
) -> Expr<'tcx> {
133136
let expr_ty = cx.tables().expr_ty(expr);
134137
let temp_lifetime = cx.region_scope_tree.temporary_scope(expr.hir_id.local_id);
135138

@@ -608,7 +611,7 @@ fn user_substs_applied_to_res(
608611

609612
fn method_callee<'a, 'tcx>(
610613
cx: &mut Cx<'a, 'tcx>,
611-
expr: &hir::Expr,
614+
expr: &hir::Expr<'_>,
612615
span: Span,
613616
overloaded_callee: Option<(DefId, SubstsRef<'tcx>)>,
614617
) -> Expr<'tcx> {
@@ -662,7 +665,7 @@ impl ToBorrowKind for hir::Mutability {
662665
}
663666
}
664667

665-
fn convert_arm<'tcx>(cx: &mut Cx<'_, 'tcx>, arm: &'tcx hir::Arm) -> Arm<'tcx> {
668+
fn convert_arm<'tcx>(cx: &mut Cx<'_, 'tcx>, arm: &'tcx hir::Arm<'tcx>) -> Arm<'tcx> {
666669
Arm {
667670
pattern: cx.pattern_from_hir(&arm.pat),
668671
guard: match arm.guard {
@@ -678,7 +681,7 @@ fn convert_arm<'tcx>(cx: &mut Cx<'_, 'tcx>, arm: &'tcx hir::Arm) -> Arm<'tcx> {
678681

679682
fn convert_path_expr<'a, 'tcx>(
680683
cx: &mut Cx<'a, 'tcx>,
681-
expr: &'tcx hir::Expr,
684+
expr: &'tcx hir::Expr<'tcx>,
682685
res: Res,
683686
) -> ExprKind<'tcx> {
684687
let substs = cx.tables().node_substs(expr.hir_id);
@@ -771,7 +774,7 @@ fn convert_path_expr<'a, 'tcx>(
771774

772775
fn convert_var(
773776
cx: &mut Cx<'_, 'tcx>,
774-
expr: &'tcx hir::Expr,
777+
expr: &'tcx hir::Expr<'tcx>,
775778
var_hir_id: hir::HirId,
776779
) -> ExprKind<'tcx> {
777780
let upvar_index = cx
@@ -914,7 +917,7 @@ fn bin_op(op: hir::BinOpKind) -> BinOp {
914917

915918
fn overloaded_operator<'a, 'tcx>(
916919
cx: &mut Cx<'a, 'tcx>,
917-
expr: &'tcx hir::Expr,
920+
expr: &'tcx hir::Expr<'tcx>,
918921
args: Vec<ExprRef<'tcx>>,
919922
) -> ExprKind<'tcx> {
920923
let fun = method_callee(cx, expr, expr.span, None);
@@ -923,7 +926,7 @@ fn overloaded_operator<'a, 'tcx>(
923926

924927
fn overloaded_place<'a, 'tcx>(
925928
cx: &mut Cx<'a, 'tcx>,
926-
expr: &'tcx hir::Expr,
929+
expr: &'tcx hir::Expr<'tcx>,
927930
place_ty: Ty<'tcx>,
928931
overloaded_callee: Option<(DefId, SubstsRef<'tcx>)>,
929932
args: Vec<ExprRef<'tcx>>,
@@ -963,7 +966,7 @@ fn overloaded_place<'a, 'tcx>(
963966

964967
fn capture_upvar<'tcx>(
965968
cx: &mut Cx<'_, 'tcx>,
966-
closure_expr: &'tcx hir::Expr,
969+
closure_expr: &'tcx hir::Expr<'tcx>,
967970
var_hir_id: hir::HirId,
968971
upvar_ty: Ty<'tcx>,
969972
) -> ExprRef<'tcx> {
@@ -1002,7 +1005,7 @@ fn capture_upvar<'tcx>(
10021005
/// Converts a list of named fields (i.e., for struct-like struct/enum ADTs) into FieldExprRef.
10031006
fn field_refs<'a, 'tcx>(
10041007
cx: &mut Cx<'a, 'tcx>,
1005-
fields: &'tcx [hir::Field],
1008+
fields: &'tcx [hir::Field<'tcx>],
10061009
) -> Vec<FieldExprRef<'tcx>> {
10071010
fields
10081011
.iter()

src/librustc_mir/hair/cx/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<'a, 'tcx> Cx<'a, 'tcx> {
151151
}
152152
}
153153

154-
pub fn pattern_from_hir(&mut self, p: &hir::Pat) -> Pat<'tcx> {
154+
pub fn pattern_from_hir(&mut self, p: &hir::Pat<'_>) -> Pat<'tcx> {
155155
let p = match self.tcx.hir().get(p.hir_id) {
156156
Node::Pat(p) | Node::Binding(p) => p,
157157
node => bug!("pattern became {:?}", node),

0 commit comments

Comments
 (0)