diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-10-15 18:57:24 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-10-15 20:14:52 +0530 |
| commit | e184c2daf16f7d77ed82c673de0b0a6e3949e661 (patch) | |
| tree | 8f54c862e81dd4549a18a60efb6ed2a6fcc45ed0 | |
| parent | 1ad1b7d947b389d71b5d150d2fe92a6311c21c28 (diff) | |
| download | rust-e184c2daf16f7d77ed82c673de0b0a6e3949e661.tar.gz rust-e184c2daf16f7d77ed82c673de0b0a6e3949e661.zip | |
Add docs for `ast_ty_to_prim_ty`
Confusion about what this does caused a bug in Servo's lints.
| -rw-r--r-- | src/librustc/middle/astconv_util.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/middle/astconv_util.rs b/src/librustc/middle/astconv_util.rs index 3b837277203..2bf749d93ce 100644 --- a/src/librustc/middle/astconv_util.rs +++ b/src/librustc/middle/astconv_util.rs @@ -60,6 +60,8 @@ pub fn prim_ty_to_ty<'tcx>(tcx: &ty::ctxt<'tcx>, } } +/// If a type in the AST is a primitive type, return the ty::Ty corresponding +/// to it. pub fn ast_ty_to_prim_ty<'tcx>(tcx: &ty::ctxt<'tcx>, ast_ty: &ast::Ty) -> Option<Ty<'tcx>> { if let ast::TyPath(None, ref path) = ast_ty.node { |
