Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1eab19d

Browse files
committedDec 6, 2016
Refactor ty::FnSig to privatize all fields
1 parent 0999124 commit 1eab19d

Some content is hidden

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

42 files changed

+237
-271
lines changed
 

‎src/librustc/middle/intrinsicck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for ExprVisitor<'a, 'gcx, 'tcx> {
178178
let typ = self.infcx.tcx.tables().node_id_to_type(expr.id);
179179
match typ.sty {
180180
ty::TyFnDef(.., ref bare_fn_ty) if bare_fn_ty.abi == RustIntrinsic => {
181-
let from = bare_fn_ty.sig.0.inputs[0];
182-
let to = bare_fn_ty.sig.0.output;
181+
let from = bare_fn_ty.sig.skip_binder().inputs()[0];
182+
let to = bare_fn_ty.sig.skip_binder().output();
183183
self.check_transmute(expr.span, from, to, expr.id);
184184
}
185185
_ => {

‎src/librustc/traits/object_safety.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,12 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
241241
// The `Self` type is erased, so it should not appear in list of
242242
// arguments or return type apart from the receiver.
243243
let ref sig = self.item_type(method.def_id).fn_sig();
244-
for &input_ty in &sig.0.inputs[1..] {
244+
for input_ty in &sig.skip_binder().inputs()[1..] {
245245
if self.contains_illegal_self_type_reference(trait_def_id, input_ty) {
246246
return Some(MethodViolationCode::ReferencesSelf);
247247
}
248248
}
249-
if self.contains_illegal_self_type_reference(trait_def_id, sig.0.output) {
249+
if self.contains_illegal_self_type_reference(trait_def_id, sig.output().skip_binder()) {
250250
return Some(MethodViolationCode::ReferencesSelf);
251251
}
252252

0 commit comments

Comments
 (0)
Please sign in to comment.