Adjust some pub
s.
This commit is contained in:
parent
8dc84fa7d1
commit
30d6f63b4e
32 changed files with 81 additions and 81 deletions
|
@ -1,7 +1,7 @@
|
|||
//! A mini version of ast::Ty, which is easier to use, and features an explicit `Self` type to use
|
||||
//! when specifying impls to be derived.
|
||||
|
||||
pub use Ty::*;
|
||||
pub(crate) use Ty::*;
|
||||
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::{self as ast, Expr, GenericArg, GenericParamKind, Generics, SelfKind};
|
||||
|
@ -14,14 +14,14 @@ use thin_vec::ThinVec;
|
|||
/// A path, e.g., `::std::option::Option::<i32>` (global). Has support
|
||||
/// for type parameters.
|
||||
#[derive(Clone)]
|
||||
pub struct Path {
|
||||
pub(crate) struct Path {
|
||||
path: Vec<Symbol>,
|
||||
params: Vec<Box<Ty>>,
|
||||
kind: PathKind,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum PathKind {
|
||||
pub(crate) enum PathKind {
|
||||
Local,
|
||||
Global,
|
||||
Std,
|
||||
|
@ -72,7 +72,7 @@ impl Path {
|
|||
|
||||
/// A type. Supports pointers, Self, and literals.
|
||||
#[derive(Clone)]
|
||||
pub enum Ty {
|
||||
pub(crate) enum Ty {
|
||||
Self_,
|
||||
/// A reference.
|
||||
Ref(Box<Ty>, ast::Mutability),
|
||||
|
@ -83,7 +83,7 @@ pub enum Ty {
|
|||
Unit,
|
||||
}
|
||||
|
||||
pub fn self_ref() -> Ty {
|
||||
pub(crate) fn self_ref() -> Ty {
|
||||
Ref(Box::new(Self_), ast::Mutability::Not)
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ fn mk_ty_param(
|
|||
|
||||
/// Bounds on type parameters.
|
||||
#[derive(Clone)]
|
||||
pub struct Bounds {
|
||||
pub(crate) struct Bounds {
|
||||
pub bounds: Vec<(Symbol, Vec<Path>)>,
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ impl Bounds {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_explicit_self(cx: &ExtCtxt<'_>, span: Span) -> (P<Expr>, ast::ExplicitSelf) {
|
||||
pub(crate) fn get_explicit_self(cx: &ExtCtxt<'_>, span: Span) -> (P<Expr>, ast::ExplicitSelf) {
|
||||
// This constructs a fresh `self` path.
|
||||
let self_path = cx.expr_self(span);
|
||||
let self_ty = respan(span, SelfKind::Region(None, ast::Mutability::Not));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue