1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10 #![allow(non_camel_case_types, non_snake_case)]
12 use rustc::ty::{self, Ty, TyCtxt};
13 use syntax_pos::DUMMY_SP;
16 pub fn type_needs_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>) -> bool {
17 ty.needs_drop(tcx, ty::ParamEnv::reveal_all())
20 pub fn type_is_sized<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>) -> bool {
21 ty.is_sized(tcx.at(DUMMY_SP), ty::ParamEnv::reveal_all())
24 pub fn type_is_freeze<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>) -> bool {
25 ty.is_freeze(tcx, ty::ParamEnv::reveal_all(), DUMMY_SP)
28 pub enum IntPredicate {
43 pub enum RealPredicate {
62 pub enum AtomicRmwBinOp {
76 pub enum AtomicOrdering {
81 // Consume, // Not specified yet.
85 SequentiallyConsistent,
88 pub enum SynchronizationScope {
89 // FIXME: figure out if this variant is needed at all.
96 #[derive(Copy, Clone, PartialEq, Debug)]