Skip to content

Commit

Permalink
Insert FIXME links to issue rust-lang#19925: fn item types should be …
Browse files Browse the repository at this point in the history
…zero-sized.
  • Loading branch information
nikomatsakis committed Dec 22, 2014
1 parent fad1423 commit 39be95c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/librustc_trans/trans/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ pub fn const_expr<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, e: &ast::Expr)
format!("unexpected static function: {}",
store).as_slice())
}
ty::AdjustReifyFnPointer(_def_id) => {
// FIXME(#19925) once fn item types are
// zero-sized, we'll need to do something here
}
ty::AdjustDerefRef(ref adj) => {
let mut ty = ety;
// Save the last autoderef in case we can avoid it.
Expand Down
3 changes: 3 additions & 0 deletions src/librustc_trans/trans/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
AdjustAddEnv(def_id, _) => {
datum = unpack_datum!(bcx, add_env(bcx, def_id, expr, datum));
}
AdjustReifyFnPointer(_def_id) => {
// FIXME(#19925) once fn item types are
// zero-sized, we'll need to do something here
}
AdjustDerefRef(ref adj) => {
let (autoderefs, use_autoref) = match adj.autoref {
Expand Down
4 changes: 3 additions & 1 deletion src/librustc_trans/trans/type_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ pub fn type_of_fn_from_ty<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, fty: Ty<'tcx>)
f.sig.0.output,
f.abi)
}
ty::ty_bare_fn(ref f) => {
ty::ty_bare_fn(_, ref f) => {
// FIXME(#19925) once fn item types are
// zero-sized, we'll need to do something here
if f.abi == abi::Rust || f.abi == abi::RustCall {
type_of_rust_fn(cx,
None,
Expand Down

0 comments on commit 39be95c

Please sign in to comment.