Module rustc::traits::object_safety[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

"Object safety" refers to the ability for a trait to be converted to an object. In general, traits may only be converted to an object if all of their methods meet certain criteria. In particular, they must:

Re-exports

use super::elaborate_predicates;
use hir::def_id::DefId;
use traits;
use ty;
use ty::Ty;
use ty::TyCtxt;
use ty::TypeFoldable;
use ty::subst::Substs;
use ty::util::ExplicitSelf;
use std::borrow::Cow;
use syntax::ast;

Enums

MethodViolationCode [
Experimental
]

Reasons a method might not be object-safe.

ObjectSafetyViolation [
Experimental
]

Functions

is_object_safe_provider [
Experimental
]